M Dixon 1 Web-Application Development Workshop. M Dixon 2 Session Aims & Objectives Aims –to introduce the main concepts involved in creating web-applications.

Slides:



Advertisements
Similar presentations
Introduction to HTML
Advertisements

Chapter 1: Introduction. Contents Whats New in Dreamweaver CS4? The Dreamweaver CS4 Interface Setting Up a Site Creating a Web Page Adding Text to Your.
Html: getting started HTML is hyper text markup language. It is what web browsers look at on the Internet. HTML documents should be created in a simple.
Mark Dixon Page 1 SOFT – Module Introduction.
Mark Dixon, SoCCE SOFT 131Page 1 SOFT – Module Introduction.
Mark Dixon, SoCCE SOFT 131Page 1 20 – Web applications: HTML and Client-side code.
Mark Dixon Page 1 02 – Dynamic HTML (client-side scripting)
Mark Dixon, SoCCE SOFT 131Page 1 16 – Web applications: HTML and Client-side code.
CIS101 Introduction to Computing
1 Static Web Pages Websites on Servers (The Big Picture) –Apache Tomcat can support static web pages –Primarily intended to support servlets and JSP –Some.
Mark Dixon, SoCCE SOFT 131Page 1 SOFT – Module Introduction.
HTML Introduction HTML
Mark Dixon Page 1 SOFT131 / Tech – Module Introduction.
Mark Dixon, SoCCE SOFT 131Page 1 08 – Web applications: HTML and ActiveX controls.
Mark Dixon Page 1 Tech – HTML. Mark Dixon Page 2 Admin Attendance Register: –log in to your profile.
Tutorial: Introduction to ASP.NET Internet Technologies and Web Application 4 th February 2010.
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
Mark Dixon 1 20 – Persistent data storage: relational databases and ADO.
Mark Dixon Page 1 5 – Persistent data storage: relational databases.
How to create a website with HTML and PHP The very basics By Alexander Niehoff.
M Dixon 1 Web-Application Development Workshop. M Dixon 2 Session Aims & Objectives Aims –to introduce the main concepts involved in creating web-applications.
XHTML Introductory1 Forms Chapter 7. XHTML Introductory2 Objectives In this chapter, you will: Study elements Learn about input fields Use the element.
Basic HTML Hyper text markup Language. Re-cap  … - The tag tells the browser that this is an HTML document The html element is the outermost element.
Programming with Microsoft Visual Basic 2012 Chapter 12: Web Applications.
M Dixon 1 Soft – Module Introduction and HTML.
1 Essential HTML coding By Fadi Safieddine (Week 2)
Understanding Web Sites. What is a Web Site A collection of Web pages which you can view on the Internet Contains text, graphics, sound, and video to.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Tutorial 30 – Bookstore Application: Client Tier Introducing.
CP2022 Multimedia Internet Communication1 HTML and Hypertext The workings of the web Lecture 7.
Chapter 2 HTML Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
Section 4.1 Format HTML tags Identify HTML guidelines Section 4.2 Organize Web site files and folder Use a text editor Use HTML tags and attributes Create.
Html Basic Codes Week Two. Start Your Text Editor Windows use 'Notepad’ Macintosh use 'Simple Text'
Mark Dixon 1 22 – Web applications: Writing data to Databases using ASP.Net.
Introduction to HTML. What is a HTML File?  HTML stands for Hyper Text Markup Language  An HTML file is a text file containing small markup tags  The.
What is Markup and Markup Languages? What is HTML? A Basic HTML Document Basic HTML Tags Tag Attributes and Text Formatting Tags Insert Hyperlinks Add.
HTML Hyper Text Markup Language. What is an HTML File?  HTML stands for Hyper Text Markup Language  An HTML file is a text file containing small markup.
HTML INTRODUCTION. What is HTML?  HTML stands for Hypertext Markup Language  Developed in 1990  Hidden code that helps us communicate with others on.
Computer Information Technology – Section 3-4. HTML – The Language of the Internet Objectives: The Student will: 1. Look at HTML 2. Understand the basic.
Mark Dixon 1 18 – Web applications: Server-side code (ASP.Net)
Mark Dixon Page 1 18 – Web applications: Server-side code (ASP)
INTRODUCTORY Tutorial 1 Using HTML Tags to Create Web Pages.
HTML. Hypertext Markup Language Lesson Objectives 1. We will be able to understand the need for HTML and where it is used 2. We will be edit HTML to.
Dreamweaver MX. 2 Overview of Templates n Templates represent a web page design or _______ that will be common to multiple pages. n There are two situations.
Mark Dixon Page 1 Soft – Module Introduction and HTML.
Mark Dixon Page 1 Web-Application Development Workshop.
Mark Dixon Page 1 03 – Dynamic HTML (client-side scripting)
EFolio Intermediate Adding Content Adding Content Images Images Documents Documents Audio and Video Files. Audio and Video Files. Sidebar - Hyperlinks.
Mark Dixon Page 1 03 – Dynamic HTML (client-side scripting)
Creating Your First Web Page – Topic: Creating a wiki, blog, image blog and podcast Click Arrow - Next Slide 1.
M Dixon 1 Tech HTML. M Dixon 2 Admin Attendance Register: –log in to your profile.
Mark Dixon Page 1 Soft – HTML. Mark Dixon Page 2 Admin Attendance Register: –log in to your profile.
Mark Dixon Page 1 Tech – HTML. Mark Dixon Page 2 Admin Attendance Register: –log in to your profile.
HTML. Hyper Text Markup Language Markup your text document The markup is the tag Hyper text means you can jump from place to place.
4 HTML Basics Section 4.1 Format HTML tags Identify HTML guidelines Section 4.2 Organize Web site files and folder Use a text editor Use HTML tags and.
CITA 310 Section 7 Installing and Testing a Programming Environment (Textbook Chapter 7)
Chapter 27 Getting “Web-ified” (Web Applications) Clearly Visual Basic: Programming with Visual Basic nd Edition.
1111 Creating HTML Programatically Objectives You will be able to Invoke C# code on the server from an ASP.NET page. Write C# code to create HTML.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
HTML-I Basic HTML Elements. HTML (Hyper Text Markup Language) HTML is a document layout and hyperlink- specification language. i.e. a language used to.
Creating Web Pages with Links, Images, and Embedded Style Sheets
HTML. Hyper Text Markup Language Markup your text document The markup is the tag Hyper text means you can jump from place to place Programming language.
Before We Begin Please download the files from as we will be using them in our walkthroughs.
Week-11 (Lecture-1) Introduction to HTML programming: A web based markup language for web. Ex.
Section 4.1 Section 4.2 Format HTML tags Identify HTML guidelines
USING DREAMWEAVER Contents: Assigning a Root Folder
Understanding Web Sites
USING DREAMWEAVER MX 2004 Contents: Assigning a Root Folder
Static and Dynamic Web Pages
SOFT – Module Introduction
Computer communications
Presentation transcript:

M Dixon 1 Web-Application Development Workshop

M Dixon 2 Session Aims & Objectives Aims –to introduce the main concepts involved in creating web-applications Objectives, by end of this week’s sessions, you should be able to: –create an html page –create objects by adding html tags –create an asp page –make your page interactive respond to events, read in form input and display dynamic output –connect to a database – display data –create a php page

M Dixon 3 Admin Attendance Register: –log in to your profile

M Dixon 4 HTML: Elements & Tags Hyper-Text Markup Language text files – edited with notepad tags, e.g. element = start tag + content + end tag –bold: This will be in bold –italic: This will be in italic work like brackets –start/open –end/close

M Dixon 5 Questions: Tags How many tags are in the following: Hello Soft

M Dixon 6 Questions: Elements How many elements are in the following: Hello Soft

M Dixon 7 HTML: Nesting Elements Nesting – puts one element inside another: Hello Cannot overlap elements: Hello 

M Dixon 8 Questions: HTML Elements Which of the following are valid elements? Title Good morning. Soft 131  

M Dixon 9 HTML: page structure Test This is a test page. head (info) body (content) every HTML page has 2 sections:

M Dixon 10 Test This is a test page. spaces are used to move lines in from left helps see structure Indentation Test This is a test page. head (is inside html) title (is inside head)

M Dixon 11 HTML: Attributes Some tags need extra information to work: –Anchor (hyper-link) element: Next Page –Image element: –Embedded object element: attribute (page to jump to) attribute (filename of picture to display) attribute (filename of music to play)

M Dixon 12 Attributes go inside the start tag: Next Page not anywhere else href=“nextpage.htm”Next Page HTML: Attributes (where) attribute start tag 

M Dixon 13 Questions: HTML attributes Consider the following HTML: Next Page a)Give an example of an attribute b)Is the following an attribute? c)How many attributes are there in: href="next.htm" No (start tag) 2

M Dixon 14 HTML Tags: Reference Lots of info available on-line, e.g.: Short list of tags: – : new paragraph – : bold text – : italic text – : anchor (link) to another web page – : image/picture (.bmp,.jpg,.gif) – : embedded object (.avi.mpg.wav.mp3)

M Dixon 15 How to: Environment Settings If you install Visual Studio on your laptop: –Choose VB settings (same as my laptop):

M Dixon 16 How to: Create Web Site 1. Click File menu 2. Click New Web Site menu item 3. Click Empty Web Site item 4. Click File System item 5. Click Visual Basic item 6. Click Browse button

M Dixon 17 How to: Create Web Site 7. Navigate to C:\Projects menu (or your USB stick) 8. Type name in folder box (e.g. \MySummer) 9. Click Open button 10. Click Yes button 11. Click OK button

M Dixon 18 How to: Create Web page 12. Click Add New Item button 13. Click HTML Page icon 14. Change page name (e.g. MySummer.htm) 15. Click Add button

M Dixon 19 How to: Edit code 16. Click Source button

M Dixon 20 How to: View page (Run) 17. Click Play button 18. Click OK button

M Dixon 21 How To: Create Web-Site Project 1. Click File menu 2. Click New Project menu item 3. Click Java Web item 4. Click Web Application item 5. Click Next button

M Dixon 22 How To: Create Web-Site Project 6. Type Project Name in textbox 7. Click Browse button, and select location 8. Click Next button 9. Select Apache Tomcat 10. Select Java EE Click Next button

M Dixon 23 How To: Create Web-Site Project 12. Clear all checkboxes 13. Click Finish button 14. Edit code 15. Run page (press Play button)

M Dixon 24 Example: Default.aspx (VB) Sub Page_Load() End Sub

M Dixon 25 Example: Default.aspx (C#) void Page_Load(){ };

M Dixon 26 Example: Date.aspx Sub Page_Load() lblDate.InnerHtml = Format(Now(), "ddd dd MMM yyyy") lblTime.InnerHtml = Format(Now(), "hh:mm:ss") End Sub

M Dixon 27 Example: Temperature.aspx Sub btnCalc_ServerClick(ByVal s As Object, ByVal e As EventArgs) lblCel.InnerHtml = ((txtFah.Value - 32) * 5) / 9 End Sub Temperature Conversion

M Dixon 28 Example: Loan.aspx Sub btnCalc_ServerClick(ByVal s As Object, ByVal e As EventArgs) lblPayAn.InnerHtml = (txtSal.Value ) * 0.09 lblPayMo.InnerHtml = lblPayAn.InnerHtml / 12 End Sub Student Loan

M Dixon 29 Example: PACS_VB.aspx Sub Page_Load() Dim cs As String = "Provider=Microsoft.Jet.OLEDB.4.0;" + _ "Data Source=" + Server.MapPath(" PACS.mdb ") + ";" + _ "Persist Security Info=False" Dim sql As String = " SELECT * FROM [Image] ORDER BY [Date] DESC; " Dim cn As New OleDbConnection(cs) Dim cmd As New OleDbCommand(sql, cn) Dim r As OleDbDataReader Dim s As String cn.Open() r = cmd.ExecuteReader() s = "" Do While r.Read() s = s + r("Title") + " " Loop cn.Close() lblRes.InnerHtml = s End Sub

M Dixon 30 Example: PACS_CS.aspx void Page_Load(){ string cs = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + Server.MapPath("PACS.mdb") + ";" + "Persist Security Info=False"; string sql = "SELECT * FROM [Image] ORDER BY [Date] DESC;"; OleDbConnection cn = new OleDbConnection(cs); OleDbCommand cmd = new OleDbCommand(sql, cn); OleDbDataReader r; string s; cn.Open(); r = cmd.ExecuteReader(); s = ""; while(r.Read()){ s = s + r["Title"] + " "; }; cn.Close(); lblRes.InnerHtml = s; }

M Dixon 31 Control Panel -> Administrative Tools -> Data Sources (ODBC) How To: Data Source (JSP & PhP) Use System DSN

M Dixon 32 How To: Data Source (JSP & PhP) Data source name as used in the code Optional description Choose database file

M Dixon 33 Example PACS.jsp <% Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection cn = DriverManager.getConnection("jdbc:odbc:PACSdb", "", ""); Statement st = cn.createStatement(); ResultSet r = st.executeQuery("SELECT * FROM [Image] ORDER BY [Date] DESC;;"); String html = ""; while(r.next()){ html += r.getString("Title") + " "; } cn.close(); %>

M Dixon 34 Example: PACS.php (MS Access) <?php $c = odbc_connect('PACSdb', '', ''); $r = odbc_exec($c, 'SELECT * FROM [Image] ORDER BY [Date] DESC;'); $s = ''; while(odbc_fetch_row($r)){ $s = $s. odbc_result($r, 'Title'). ' '; } odbc_close($c); ?> <?php echo $s; ?>

M Dixon 35 Example: PACS.php (MySQL) <?php $c = mysql_connect('localhost', 'root', ''); mysql_select_db('PACS'); $q = mysql_query('SELECT * FROM [Image] ORDER BY [Date] DESC;'); mysql_close($c); $s = ''; while ($r = mysql_fetch_array($q)){ $s = $s. $r['Title']. ' '; } mysql_free_result($q); ?> <?php echo $s; ?>