1 Our New Home ng/WebProgramming.htm Any comments or suggestions, please send them to me or TAs!

Slides:



Advertisements
Similar presentations
Chapter 1 © 2014 by Pearson Education A Brief Intro to the Internet - Origins - ARPAnet - late 1960s and early 1970s - Network reliability - For.
Advertisements

PART 6 Application Layer
Project 1 Introduction to HTML.
© 2010, Robert K. Moniot Chapter 1 Introduction to Computers and the Internet 1.
Chapter 1 © 2002 by Addison Wesley Longman, Inc. 1 Chapter 1 Sebesta: Programming the World Wide Web.
World Wide Web1 Applications World Wide Web. 2 Introduction What is hypertext model? Use of hypertext in World Wide Web (WWW) – HTML. WWW client-server.
IST 221 Internet Concepts and Applications Internet, WWW and HTML 1.
COS 381 Internet/Intranet Programming DAY 1. © 2006 Pearson Addison-Wesley. All rights reserved. 1-2 Agenda Roll Call Introductions Blackboard Syllabus.
WWW and Internet The Internet Creation of the Web Languages for document description Active web pages.
© 2004, Robert K. Moniot Chapter 1 Introduction to Computers and the Internet.
1st Project Introduction to HTML.
Chapter 2 Introduction to HTML5 Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
Lecture 4 Web browsers, servers and HTTP Boriana Koleva Room: C54
HTML 1 Introduction to HTML. 2 Objectives Describe the Internet and its associated key terms Describe the World Wide Web and its associated key terms.
Chapter ONE Introduction to HTML.
Web Design Basic Concepts.
Chapter 9 Collecting Data with Forms. A form on a web page consists of form objects such as text boxes or radio buttons into which users type information.
Presenting Information on WWW using HTML. Presenting Information on the Web with HTML How Web sites are organized and implemented A brief introduction.
CSCI 323 – Web Development Chapter 1 - Setting the Scene We’re going to move through the first few chapters pretty quick since they are a review for most.
INTRODUCTION TO WEB DATABASE PROGRAMMING
G51WPS Web Programming and Scripting Boriana Koleva Room: C54 Phone:
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
Introduction to Web Programming ICS213, 1 / 2011 Dr. Seung Hwan Kang.
Copyright © cs-tutorial.com. Introduction to Web Development In 1990 and 1991,Tim Berners-Lee created the World Wide Web at the European Laboratory for.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1 Fundamentals.
Chapter 1: Introduction to Web
Chapter 1 © 2003 by Addison-Wesley, Inc A Brief Intro to the Internet - Origins - ARPAnet - late 1960s and early 1970s - Funded by DoD - Purpose:
Chapter 1 © 2003 by Addison-Wesley, Inc A Brief Intro to the Internet - Origins - ARPAnet - late 1960s and early 1970s - Network reliability - For.
2013Dr. Ali Rodan 1 Handout 1 Fundamentals of the Internet.
Chapter 1 © 2005 by Addison Wesley Longman, Inc A Brief Intro to the Internet - Origins - ARPAnet - late 1960s and early 1970s - Network reliability.
1Computer Sciences Department. Web Design 3Computer Sciences Department.
2440: 211 Interactive Web Programming Introduction to the Internet & the World Wide Web.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1 Fundamentals.
HTML, XHTML, and CSS Sixth Edition Chapter 1 Introduction to HTML, XHTML, and CSS.
CIS 1310 – HTML & CSS 1 Introduction to the Internet.
HTML. Principle of Programming  Interface with PC 2 English Japanese Chinese Machine Code Compiler / Interpreter C++ Perl Assembler Machine Code.
Chapter 8 Introduction to HTML and Applets Fundamentals of Java.
1 Week 1 l HTML l Applets Applets and HTML. 2 Overview l Applets: Java programs designed to run from a document on the Internet l HTML: Hypertext Markup.
Chapter 13. Applets and HTML HTML Applets Computer Programming with JAVA.
Chapter 1 Fundamentals. © 2006 Pearson Addison-Wesley. All rights reserved A Brief Intro to the Internet - Origins - ARPAnet - late 1960s and.
Chapter 1 © 2013 by Pearson A Brief Intro to the Internet - Origins - ARPAnet - late 1960s and early 1970s - Network reliability - For ARPA-funded.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1 Fundamentals.
Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Muhammad Ibn Saud Islamic University College of Computer and Information Sciences Chapter.
1 Welcome to CSC 301 Web Programming Charles Frank.
Chapter 1 © 2003 by Addison-Wesley, Inc. 1 Chapter 1 Fundamentals.
CHAPTER 1 Internet & World Wide Web. Topics A Brief Introduction to the Internet The World Wide Web Web Browsers Web Servers Uniform Resource Locator.
Chapter 1 Fundamentals. © 2006 Pearson Addison-Wesley. All rights reserved A Brief Intro to the Internet - Origins - ARPAnet - late 1960s and.
CS2043 Internet Visual Prog. / Appl. An introduction to Internet visual programming and applications. Major topics include object-oriented concepts, graphical.
Chapter 1 Fundamentals. Internet History Internet Protocols.
Chapter 1 © 2009 by Addison Wesley Longman, Inc A Brief Intro to the Internet - Origins - ARPAnet - late 1960s and early 1970s - Network reliability.
1 WWW. 2 World Wide Web Major application protocol used on the Internet Simple interface Two concepts –Point –Click.
IS-907 Java EE World Wide Web - Overview. World Wide Web - History Tim Berners-Lee, CERN, 1990 Enable researchers to share information: Remote Access.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1 Fundamentals.
Copyright © 2003 Pearson Education, Inc. Slide 1-1 Created by Cheryl M. Hughes The Web Wizard’s Guide to XHTML by Cheryl M. Hughes.
Web Design A Brief Intro to the Internet Internet History Internet Protocols 2.
Fundamentals. A Brief Intro to the Internet - Origins - ARPAnet - late 1960s - Network reliability - For ARPA-funded research organizations - BITnet,
HTML Concepts and Techniques Fifth Edition Chapter 1 Introduction to HTML.
Introduction to the World Wide Web & Internet CIS 101.
ULI101 – XHTML Basics (Part I) Internet / Web Concepts Brief History TCP/IP Web Servers / Web Browsers URL HTTP / HTML.
Chapter 1 © 2009 by Addison Wesley Longman, Inc A Brief Intro to the Internet - Origins - ARPAnet - late 1960s and early 1970s - Network reliability.
Chapter 1 Introduction to HTML.
Project 1 Introduction to HTML.
CISC103 Web Development Basics: Web site:
Chapter 27 WWW and HTTP.
Chapter 1 Fundamentals.
1.1 A Brief Intro to the Internet
1.1 A Brief Intro to the Internet
PART 6 Application Layer
1.1 A Brief Intro to the Internet
Presentation transcript:

1 Our New Home ng/WebProgramming.htm Any comments or suggestions, please send them to me or TAs!

2 Programming the World Wide Web 1.WWW & HTML 2.Web Programming Languages –JavaScript, Java, Perl, PHP 3.Cascading Style Sheet (CSS)

3 1. A Brief Intro to the Internet - Origins - ARPAnet - late 1960s and early 1970s - Network reliability - For ARPA-funded research organizations - BITnet, CSnet - late 1970s & early 1980s - and file transfer for other institutions - NSFnet Originally for non-DOD funded places - Initially connected five supercomputer centers - By 1990, it had replaced ARPAnet for non- military uses - Soon became the network for all (by 1990) - NSFnet eventually became known as the Internet - What the Internet is: - A huge connection of computers connected in a communications network - At the lowest level, since 1982, all connections use Transmission Control Protocol/Internet Protocol ( TCP/IP) - TCP/IP hides the differences among devices connected to the Internet - A network of networks?

4 1. A Brief Intro to the Internet (continued) - Internet Protocol (IP) Addresses - Every node has a unique numeric address xxx.xxx.xxx.xxx - Form: 32-bit binary number - New standard, IPv6, has 128 bits (1998) ftp://ftp.isi.edu/in-notes/rfc2460.txt - Organizations are assigned groups of IPs for their computers - Domain names - Form: host-name.domain-names - First domain is the smallest; last is the largest - Last domain specifies the type of organization - Fully qualified domain name - the host name and all of the domain names - DNS servers - convert fully qualified domainDNS servers names to IPs - Problem: By the mid-1980s, several different protocols had been invented and were being used on the Internet, all with different user interfaces (Telnet, FTP, Usenet, mailto

5 1.1 The World-Wide Web (Wait?) - A new protocol used on the Internet - Origins - Tim Berners-Lee at CERN (Conseil European pour la Recherce Nucleaire) proposed the Web in Purpose: allows scientists to communicate with each other through documents - The unit of info. referred as Pages? Documents? Resources? - We’ll call them documents - Document form: hypertext? - Hypermedia – more than just text – images, sound, etc. - Web or Internet? - The Web: a collection of software and protocols ( http, telnet, ftp, mailto, etc.) - Runs on the Internet– a collection of computers, devices, networks.

6 1.2 Web Browsers - Mosaic – National Center of Supercomputing Applications (NCSA, Univ. of Illinois), in early First to use a GUI, led to explosion of Web use - Initially for X-Windows, under UNIX, but was ported to other platforms by late Browsers are clients - always initiate, servers react (although sometimes servers require responses) - Most requests are for existing documents, using HyperText Transfer Protocol (HTTP) - But some requests are for program execution, with the output being returned as a document 1.3 Web Servers - Running to response to browser requests, either existing documents or dynamically built documents - Request-driven

7 1.4 URLs (Uniform Resource Locators) - General form: scheme:object-address - The scheme is often a communications protocol, such as http, telnet or ftp - For the http protocol, the object-address is: //fully qualified domain name / doc path - For the file protocol, only the doc path is needed - Host name may include a port number, as in zeppo:80 ( 80 is the default, so this is silly) - URLs cannot include spaces(? Anything unusual about our web URL? ) or any of a collection of other special characters (semicolons, colons,...) - The doc path may be abbreviated as a partial path - The rest is furnished by the server configuration - If the doc path ends with a slash, it means it is a directory

8 1.5 Multipurpose Internet Mail Extensions (MIME) - Originally developed for sending different kinds of doc. Through Internet mail - identification of a doc. returned by the server (attached by the server to the beginning of the document) - Type specifications - Form: type/subtype - Examples: text/plain, text/html, image/gif, image/jpeg, video/mpeg - Server gets type from the requested file name’s suffix (.html implies text/html ) - Browser: gets the type explicitly from the server, otherwise, a conversion table - Experimental types - Subtype begins with x- e.g., video/x-msvideo - Experimental types require the server to send a helper application or plug-in so the browser can deal with the files

9 1.6 The Web Programmer’s Toolbox - HTML - To describe the general form and layout of documents - An HTML document is a mix of content and controls - Controls are tags and their attributes - Tags often delimit content and specify something about how the content should be arranged in the document - Attributes provide additional information about the content of a tag - Tools for creating HTML documents - HTML editors - make document creation easier - Shortcuts to typing tag names, spell-checker, - What You See Is What You Get (WYSIWYG) HTML editors, Macromedia, Adobe, Frontpage, … etc.

The Web Programmer’s Toolbox (continued) - eXtensible Markup Language (XML) - A meta-markup language - Used to create a new markup language for a particular purpose or area - Meaningful tags can be defined for a specific area, - No presentation details, only element definition - A simple and universal way of representing data of any textual kind - JavaScript - A client-side HTML-embedded scripting language – used to create dynamic HTML doc. - Only related to Java through syntax - Dynamically typed and not object-oriented – interpreted by clients’ browsers - Provides a way to access elements of HTML documents and dynamically change them Ex 1Ex 2

The Web Programmer’s Toolbox (continued) - Java - General purpose object-oriented programming language - Based on C++, but simpler and safer - Applets: a special kind of Java program especially for web programming - bytecodes  browsers  executes by Java Virtual Machine (JVM) -Perl (Practical Extraction and Report Language) - A general purpose language - Provides server-side computation for HTML documents, through Common Gateway Interface (CGI) - Perl is good for CGI programming because: - Direct access to operating systems functions - Powerful character string pattern-matching operations - Access to database systems Java-Ex1

The Web Programmer’s Toolbox (continued) - Perl is highly platform independent, and has been ported to all common platforms - Perl is not just for CGI - Syntax is similar to C, but, not compile to binary codes, instead, through interpreting. - PHP - A server-side scripting language - An alternative to CGI - Similar to JavaScript, syntax and dynamic typed - Great for form processing and database access through the Web Perl-CGI Perl- Concole Interne t CGICGI APPAPP PHP-Ex1

Origins and Evolution of HTML - Derived from SGML - Original intent: General layout of documents that could be displayed by a wide variety of computers - Recent versions: - HTML Introduced many new features and deprecated many older features - HTML A cleanup of XHTML Just 4.01 modified to fit the XML syntax - We’ll stick to nearly all of this syntax Basic Syntax - Elements are defined by tags (markers) - Tag format: - Opening tag: - Closing tag:

14 Basic Syntax (continued) - The content of a tag appears between its opening tag and its closing tag - Not all tags have content - If a tag has no content, its form is - If a tag has attributes, they appear between its name and the right bracket (later) - Tag names and attribute names must be written in lowercase letters - Every tag that has content must have a closing tag - Tags must be properly nested …….. - Comment form: - Browsers ignore comments, unrecognizable tags, line breaks, multiple spaces, and tabs - Tags are suggestions to the browser, even if they are recognized by the browser

Standard HTML Document Structure -,,, (or ) are required - All four can have attributes, but we’ll ignore them for now - The whole document must have as its root - A document consists of a head and a body or frameset - The tag is used to give the document a title, which is normally displayed in the browser’s window title bar (at the top of the display) - An SGML DOCTYPE command is required by XHTML 1.0, but there is not enough room on these slides to show it - see book for its exact form <!DOCTYPE html PUBLIC “-//w3c//DTD XHTML 1.0 Strict//EN” “ /xhtml1-strict.dtd” > - There are three DTDs, or standards Strict, Frameset, and Transitional

16 For the full Specifications of HTML4.01 and XHTML1.0 visit:

17 2 Cascading Style Sheet

18 That’s it for today! Next week: Ch.5 XML basics

19 Bonus #1 Write 2 CSS rules that : –Gives all h1 and h2 elements a padding of.5 ems, a grooved border style and a margin of.5 ems –Changes the color of all elements with attribute class = “green-Move” to green and shifts then down 25 pixels and right 15 pixels. –Refer to P. 99

20 Bonus.html Solution: 19.8 H1, H2 { padding:.5em; border-style: groove; margin:.5em }.greenMove { color: #00FF00; position: relative; top: 25px; left: 15px } This is an H1 header This is an H2 header Normal text Text with class greenMove bonus.html

21 <!DOCTYPE html PUBLIC "-//w3c//DTD XHTML 1.0 Strict//EN" " <!-- roots.html Compute the real roots of a given quadratic equation (a*x*x + b*x + c). If the roots are imaginary, this script displays NaN, because that is what results from taking the square root of a negative number --> Real roots of a quadratic equation <!-- // Get the coefficients of the equation from the user var a = prompt("What is the value of 'a'? \n", ""); var b = prompt("What is the value of 'b'? \n", ""); var c = prompt("What is the value of 'c'? \n", ""); // Compute the square root and denominator of the result var root_part = Math.sqrt(b * b * a * c); var denom = 2.0 * a; // Compute and display the two roots var root1 = (-b + root_part) / denom; var root2 = (-b - root_part) / denom; document.write("The first root is: ", root1, " "); document.write("The second root is: ", root2, " "); // --> Html

22 HTML Document DHTML --> moving text around Jump into JavaScript world!

23 textMoving.js var dom, x, y, finalx = 300, finaly = 300; function initText(){ dom = document.getElementById('theText').style; //get the current position of the text var x=dom.left; var y=dom.top; //convert the string values of left and top to //numbers by stripping off the units x = x.match(/\d+/); y = y.match(/\d+/); //call the function that moves it moveText(x, y); }//end of initText //a function to move the text from its original position to (finalx, finaly) function moveText(x, y){ //if x coordinate is not equal, mover x toward finalx if (x !=finalx){ if(x > finalx) x--; else if (x<finalx) x++; } //if y coordinate is not equal, mover y toward finaly if (y !=finaly){ if(y > finaly) y--; else if(y<finaly) y++; } …….. HTML

24 Domain Name Conversion Domain Name Domain Name Server IP Web Server Internet

25 Simple Java Applet import java.awt.*; import java.applet.Applet; public class Drawing extends Applet //load applet class { public void paint (Graphics g) { g.setColor(Color.blue); g.fillOval(30,30,50,50); g.setColor(Color.orange); g.fillOval(60,40,90,90); } Note: Applet can’t be run by “java console”?

26 Applet applied in the HTML <!DOCTYPE html PUBLIC "-//w3c//DTD XHTML 1.0 Strict//EN" " strict.dtd"> <-- wel2.html A document to test the Wel2 applet --> Wel2 <APPLET code = “Drawing.class" width = "500" height = “300"> Show Don’t for get to “javac” your java file first

27 A Perl Example Welcome to Wei's Consumer Electronics Purchasing Survey Center Your Age Category Your Gender Category <input type = "radio" name = "gender" value = "male" checked ="true" >Male Female Your Next Consuming Electronics Purchase will be: HDTV VCR CD Player Mini CD Player/Recorder DVD Player Others To see the results of the survey so far, click here Server-side Perl

28 # test the environment of perl running on = values %ENV; print "All of the environmental settings are: \n"; foreach $item print "$item \n"; } A Perl Example to query the Environment Settings Console

29 PHP embed in HTML PHP - practice 1: print date <?php print " Welcome to Wel's homepage "; print "Today is: "; print date("l, F js"); print " "; ?> PHP