Introduction to Web Programming Objectives To understand the

Introduction to Web Programming Objectives Ø To understand the technology and protocols underlying the World Wide Web(WWW) Ø To become familiar with common tools and techniques for developing Web-based applications, both client-side and server-side Ø To develop a working knowledge of HTML, XHTML, Java. Script, Java, Perl and PHP as languages for developing Web applications This session contains a quick, superficial introduction to the various elements that make the web work 12/2/2020 1

Learning Outcomes ü Demonstrate an understanding of the concepts, terms, and technology behind the WWW ü Describe how the WWW works ü List several Web servers ü Identify different Web browsers ü Define what is a Web page ü Differentiate a home page from a Web site ü Understand how a Web page works ü Static and Dynamic pages ü HTTP versions, methods, return status codes ü Understand working of CGI ü Statistics about Internet growth, web growth, usage growth ü Overview of Web programmer’s tools 12/2/2020 2

Need for studying Web Programming Course? • The WWW has played an important role – in making the data, even from geographically distant locations, easily accessible to users all over the world • More organizations rely on the WWW to conduct business – in fact, Web has become the primary tool for e-commerce applications • The effect of WWW on the day-to-day lives of people. Many of us use the internet and the WWW daily, ―communicating with friends, relatives, and business associates thru e-mail, shopping, knowing the schedules and booking tickets at theatre, railway, airline etc. , History, Culture, sports • Constructing the software and data that provide all of the desired information requires knowledge of several different technologies ―such as markup languages, programming skills specific to WWW • To provide required background a basis for acquiring the knowledge and skills to build Web sites and Web based 12/2/2020 3 applications

Need for studying Web Programming Course? • More and more of the world's software is being run within a Web browser. • Web software offers many reasonable benefits: – ease of deployment, – ubiquity of access to a global audience, – and availability of server-side data and services. • More recently, more mature web standards and technologies such as Ajax have taken the web beyond simple document processing to the current "Web 2. 0. " • With these advances , the relevance of teaching Web Programming at the college level has also increased 12/2/2020 4

Challenges Web Programming offers many unique challenges and difficulties § Short time • The students must learn many programming languages and technologies in a short time, each introducing new syntax and new programming paradigms such as event-driven programming, client-server interaction, and so on. This is particularly tough at universities like ours that is on the semester system. § Bugs • Probably the most prominent difficulty is the set of new nasty bugs that arise in web programming. many of the most common student mistakes, such as misspelling a tag in HTML, forgetting a token in Java. Script, or capitalizing a variable's name incorrectly, produce no output in the browser. The student is left with no indicator that something is wrong and no clear way to find or fix the problem. § Copying • A more slight difficulty one is stopping students from copying each others' work, even when said work is being placed onto the public web § Debugging tools • There are few tools for debugging, and many of the tools that do exist are not made for new programmers. 12/2/2020 5

Reasonable Questions What is the World Wide Web? Is it the same thing as the Internet? Who invented it? How old is it? How does it work? What kinds of things can it do? What does it have to do with programming? 12/2/2020 6

Reasonable Questions What is a Web server? What is a Web browser? What is a Web page? What makes the Web work? What is HTTP? What is CGI? What is Client-side and Server-side programming? What is Java. Script? What is Web Programmer's Toolbox? 12/2/2020 7

Web Internet a physical network connecting millions of computers using the protocols for sharing/transmitting information (TCP/IP) – in reality, the Internet is a network of networks – basically, just a computer network spanning most of the world Wide Web a collection of interlinked multimedia documents that are stored on the Internet and accessed using a common protocol called Hyper Text Transfer Protocol (HTTP) an immense source of data, enables to access the internet a collection of software and protocols, installed on most of the computers on the internet Key distinction: Internet is hardware; Web is software 12/2/2020 8

History of the Internet The idea of a long-distance computer network traces back to early 60's § Licklider at M. I. T. § National Physics Laboratory in U. K. In particular, the Department of Defense(Do. D) was interested in the development of distributed, decentralized networks § survivability (i. e. , network still functions despite a local attack) § fault-tolerance (i. e. , network still functions despite local failure) contrast with phone system, electrical system In 1969, Advanced Research Project Agency funded the ARPANET § connected computers at UCLA, UCSB, SRI, and Utah § allowed researchers to share data, communicate thru simple text based e-mail 12/2/2020 9

Internet growth In late 1970 s and early 1980 s § BITNET ( Because It’s Time Network) developed at City University of New York § CSNET (Computer Science Network) connected Purdue Univ, Univ of Wisconsin etc § Neither BITNET nor CSNET became a dominant national network In 80‘s, U. S. government took a major role in Internet development § created NSFnet(National Science Foundation) for academic research in 1986 § ARPANET was retained for military & government computers By 90's, Internet connected virtually all colleges & universities § businesses and individuals also connected as computing costs fell § ~1, 000 computers by 1992 were connected around the world in 1995, control of the Internet was transferred to a non-profit organization § Internet Society: Internet Engineering Task Force Internet Architecture Board Internet Assigned Number Authority World-Wide-Web Consortium 12/2/2020. . . 10

Internet Growth (cont. ) Internet has exhibited exponential growth, doubling in size every 1 -2 years (stats from Internet Software Consortium) 1, 463, 632, 361 million Internet users in 2008 (approx. 22% of the world’s population) (http: //www. internetworldstats. com/top 20. htm ) (June 30, 2008) in India, 81, 000(Users) / 1, 147, 995, 898 (Population) 81% United Kingdom has 41. 8 million users (approx. 69% of the 12/2/2020 population) Year Computer s on the Internet 2006 439, 286, 364 2004 285, 139, 107 2002 162, 128, 493 2000 93, 047, 785 1998 36, 739, 000 1996 12, 881, 000 1994 3, 212, 000 1992 992, 000 1990 313, 000 1988 56, 000 1986 5, 089 1984 1, 024 1982 235 11

What is the World Wide Web? • Information resource consisting of web pages that organize and present vast amount of information (mostly text embedded with images, audio, video, or animation), and other resources (databases, interactive multimedia, virtual environments, etc. ) • A hypertext based system for providing, organizing and accessing information that allows users to jump from one information space to another • A way to access and provide information in various media via the Internet • Comprises servers and client computers on the Internet that communicate using the hypertext transfer protocol (http) • Body of information available on the Web • An easy way to access cross-linked static/dynamic documents stored in a variety of servers around the world 12/2/2020 - A language formatting such documents (HTML) 12

History of the Web The idea of hypertext (cross-linked and inter-linked documents) traces back to Vannevar Bush in the 1940's § online hypertext systems began to be developed in 1960's e. g. , Andy van Dam's FRESS, Doug Englebert's NLS § in 1987, Apple introduced Hyper. Card In 1989, Tim Berners-Lee at the European Particle Physics Laboratory (CERN) designed a hypertext system for linking documents over the Internet § designed a (Non-WYSIWYG) language for specifying document content • which evolved into Hyper. Text Markup Language (HTML) § designed a protocol for downloading documents and interpreting the content • which evolved into Hyper. Text Transfer Protocol (HTTP) § implemented the first browser -- text-based, no embedded media 12/2/2020 the Web was born! 13

History of the Web (cont. ) The Web was an obscure, European research tool until 1993 In 1993, Marc Andreessen (at the National Center for Supercomputing Applications) developed Mosaic, the first graphical Web browser § the intuitive, clickable interface made hypertext accessible to the masses § made the integration of multimedia (images, video, sound, …) much easier § Andreessen left NCSA to found Netscape in 1994 cheap/free browser popularized the Web (75% market share in 1996) in 1995, Microsoft came out with Internet Explorer Netscape bought by AOL in 1999 for $10 billion in stock Today, the Web is the most visible aspect of the Internet 12/2/2020 14

Web Growth Stats from Firefox Netcraft Web Server Survey. IE, Opera Netscape Mosaic Different colors represent the proliferation of different IP addresses Year Computers on the Internet Web Servers on the Internet 2004 285, 139, 107 56, 923, 737 2002 162, 128, 493 33, 082, 657 2000 93, 047, 785 18, 169, 498 1998 36, 739, 000 4, 279, 000 1996 12, 881, 000 300, 000 1994 3, 212, 000 3, 000 1992 992, 000 50 Recent estimates suggest 135 million Web servers, with 4 -5 B Web. Growth pages! Note: of web is around 1 million pages/day. Roughly 10 times the rate of population 12/2/2020 growth in India. 15

Exercise Visit the following to know more about the World Wide Web How the Web Works http: //www. learnthenet. com/english/html/13 wworks. htm The Web At-a-glance http: //www. learnthenet. com/english/web/000 www. htm 12/2/2020 16

What makes the Web work? The Web relies on these mechanisms: • Hypertext - provides easy navigation among documents and resources • Protocols - set of standards used to access resources via the Web • Universal Resource Locator (URL) - uniform naming scheme for Internet resources • Client and Server computers - Web access is based on client/server technology 12/2/2020 17

What makes the Web work? Hypertext § Presents and relates information as hyperlinked documents that point to other documents or resources § Hyperlink is usually embedded in the text, on a highlighted word or phrase, or on a symbol, an icon, or other graphic elements § Web pages are hypertext documents on the Internet mostly created using HTML Hyper. Text Markup Language (HTML) § The publishing language of the World Wide Web; the standard used to create web pages. § Defines the structure of information by using a variety of tags and attributes, which is designed to display text and other information on a screen and provide hyperlinks to other Web documents. § Defines a standard set of special textual indicators(markups) specifying how a Web pages, words and images should be displayed by the web browser Protocols § Standard set of rules that governs how computers communicate with 12/2/2020 18 each other, i. e. SMTP, FTP, HTTP allowing access to huge collection of information and services

What makes the Web work? Uniform Resource Locator (URL) § Uniform naming scheme that specifies unique addresses for web servers, documents, and other resources, no matter what its access protocol § Web resources that are accessible though the Internet are identified by URLs § A URL looks like this: http: //www. rnsit. in/cse. html § It is composed of three parts. The start, http: //, indicates that this URL uses the HTTP protocol. The next part, www. rnsit. in, names the server on which this page can be found. The end of the URL, /cse. html, names Anatomy of a URL a specific file on this server § Web documents and resources are located and linked through their URLs protocol host computer directory path file name Note: Not all URLs will have the directory and filename 12/2/2020 19

What makes the Web work? Client and Server computers § The web operates in Client/Server Configuration § In HTTP communication, the server is the computer on which the web-page is stored. The client is the computer, which asks the server for a page, so that it can display it. asking for a page is called an 'HTTP request'. § Servers are computers that host web documents and provide information through a web server program § Client computers access web documents using an application program called web browsers § Client initiates the communication, i. e. , a request for information on the server, Server sends information back to the client 12/2/2020 20

What is a Web Server? • Provides access to the web resources • Server-side software responsible for handling incoming HTTP requests • Computer running application software that listens and responds to a client computer’s request made through a web browser • Machine that hosts web pages and other web documents • Most commonly used Web Servers are: Apache, IIS • More than 400 million web hosts in operation, more than 60% of which were Apache, around 30% were IIS 12/2/2020 21

Web Servers • Apache - most popular open source server software on the Web • i. Server – application / web server written entirely in Java • Microsoft Internet Information Server - IIS is fully integrated into the Windows NT / 2000 server package • Macromedia Cold. Fusion – application / web server focuses on serving dynamic pages supporting other Macromedia products like Flash and Ultradev • IBM Web Sphere Studio – combination of content creation software with web application • Apple Webobject - application / web server for Mac 12/2/2020 22

What is a Web Browser? • Client-side software that is responsible for displaying page views and making HTTP requests to a web server. • application software that is used to locate and issue a request for the page on the web server that hosts the document • It also interpret the page sent back by the web server and display it on the monitor of the client computer • Computer program that lets you view and explore information on the World Wide Web. i. e. , Allow the users to browse the resources available on servers • Web browsers : IE, Firefox, Mozilla, Netscape Navigator, Opera 12/2/2020 23 • More popular: IE and Firefox

Web Browsers • Microsoft Internet Explorer – browser integrated with the Windows operating system. Mac versions are available. • Netscape Navigator - available for Windows, Mac, and Unix platforms. • Opera – one of the alternatives to the two most popular browser mentioned above • Mozilla – open source web browser software • Lynx - popular Unix text-based browser • Firefox – available in versions for several different computing platforms such as Windows, Linux, Mac OS 24 12/2/2020

What happens when we click on a link? OR enter a URL into the location box OR request a web page How the Web works http: //www. example. com Internet Name Web Browser/Client IP address 1. 2. 3. 4 Web Server Domain Name Server -Render HTML images -Execute Java. Scripts -Execute Java Applets -Send data to server using CGI 12/2/2020 -Serve up Content -HTML, Images, Documents etc. , -Process data received from client 25

How the Web Works When we click a link or type a URL into location box, ex: http: //www. example. com, 1. Browser makes a socket connection to the server www. example. com 2. This name www. example. com maps to an IP address using DNS, ex: 1. 2. 3. 4(dotted quad) 3. Browser connects to www. example. com using port 80, that the server OS opens for such http requests. Note: ftp – 21, telnet – 23, smtp – 25 4. Server serves up or deliver information to the client like HTML file, images, java applets, documents, PDFs etc. , 5. The content that the server delivers can be generated by the server in one of the several ways: static, dynamic, or embedded 12/2/2020 26 6. Client receives a stream of text, images, documents etc. ,

How the Web works - Summary 5. User receives file displayed by the browser 4. Server sends requested files to browser to be interpreted Browser 1. User sends request 2. Browser interprets user’s selection and makes request from appropriate server 12/2/2020 3. Server accepts and processes request from browser 27

Exercise Visit the following to know more about how the World Wide Web works • Client/Server, the Internet, and WWW http: //www. robelle. com/www-paper/paper. html • How Web servers and the Internet Work http: //www. howstuffworks. com/web-server. htm • The Web At-a-glance http: //www. learnthenet. com/english/web/000 www. htm Explore these pages that contain links to several web servers and browsers: • World Wide Web Server Software http: //www. w 3. org/Servers. html • Browsers http: //www. webreference. com/internet/software/browser 12/2/2020 28 s/

What is a Web page? • Set of data consists of one or several web resources, that can be identified by an URI(Universal/Uniform Resource Identifier) • Electronic document that typically contains several types of information accessible via the World Wide Web • set of information created, and organized, using HTML and/or other web page authoring and development tools • Interpreted and displayed on the screen according to the instructions of the web page authoring tool 12/2/2020 29

Sample Web Page Sample web page and its source. • The source contains the instructions that define the contents, layout, and structure of a web page. • The instructions are written in HTML or another web authoring tool used in creating the page. • The browser uses these instructions to interpret and display the web page on the screen. 12/2/2020 30

How web page works • The user requests a web page by entering its URL on the address location bar of a web browser. • The browser transmits the request to a web server through http. • The web server processes the request, locates and sends back the requested web document using http. • The web browser interprets the file sent by the server and displays it on the monitor. • The same process happens when 12/2/2020 the user selects any of the hyperlinks or navigational URL Navigational tools Graphics / Hyperlinks 31

What is a Web Site? • a collection of related web pages of a certain individual, group, or organization, connected through a system of hyperlinks, hosted in a particular domain • can be a single web page that contains links to related information located on several web sites What is a home page? • the main page of a web site that typically serves as an index or table of contents to other web pages • usually the first web page or the welcome page the users see when they visit a web site 12/2/2020 32

Web page? Web site? Home page? This web page is the home page of the UNESCO web site 12/2/2020 33

Exercise Read these articles: • Dreamlink: What is a web page? http: //www. dreamink. com/beginners/b 2. html • How web pages work http: //www. howstuffworks. com/web-page. htm • How Web Sites Work http: //www. workz. com/content/629. asp 12/2/2020 34

Static v/s Dynamic pages Most Web pages are static § contents (text/links/images) are the same each time it is accessed e. g. , online documents, most homepages Hypertext Markup Language (HTML) is used to specify text/image format As the Web moves towards online services and ecommerce, Web pages must also provide dynamic content § pages must be fluid, changeable (e. g. , rotating banners) § must be able to react to the user's actions, request and process info, tailor services e. g. , amazon. com 12/2/2020 35

Client-side programming Can download program with Web page, execute on client machine § simple, generic, but insecure Java. Script § a scripting language for Web pages, developed by Netscape in 1995 § uses a C++/Java-like syntax, so familiar to programmers, but simpler § good for adding dynamic features to Web page, controlling forms and GUI § requires users to have this technology enabled on their browsers § see http: //www. w 3 schools. com/js/ Java applets § § can define small, special-purpose programs in Java called applets provides full expressive power of Java (but more overhead) good for more complex tasks or data heavy tasks, such as graphics see http: //java. sun. com/applets/ 12/2/2020 36

Server-side programming Can store and execute program on Web server, link from Web page § more complex, requires server privileges, but secure CGI programming § programs can be written to conform to the Common Gateway Interface § when a Web page submits, data from the page is sent as input to the CGI program § CGI program executes on server, sends its results back to browser as a Web page § good if computation is large/complex or requires access to private data Active Server Pages, Java Servlets, using PHP, Perl, Server Side languages Includes § we will discuss CGI programming but other possible as wellalternatives (such as PHP, Python, Ruby, etc. ) § vendor-specific to CGI § provide many of the same capabilities but using HTML-like tags § some of these technologies might require functionality to be enabled in the client’s browser (e. g. Ajax generally requires the use of Javascript) 12/2/2020 37

Server-side programming v/s Client-side web programming Server-side Client-side • Server-side scripts or programs are simply programs that are run on the web server in response to requests from the client • Technologies such as CGI, Active Server Pages, Java Servlets, PHP run on Server • Best, if the program needs a lot of data and infrequent interactions with the server 12/2/2020 , • Cleint-side scripts or programs are simply programs that are run on the web browser, downloaded from server • Technologies such as Java. Script, VBScript and Java applets all run in the client • Best, if applications that use less data and more interactions 38

Exercise Pick some of your favorite Web sites and try to identify § static components? § dynamic components? Øclient-side? Java. Script? Java applet? Øserver-side? CGI? ASP? Ex: www. amazon. co. uk 12/2/2020 39

HTTP (Hyper. Text Transfer Protocol) • generic, stateless protocol – Does not provide storing of information between requests – No indication of any relationship between two different requests cookies, small data structures that a web server requests the HTTP client to store on the local machine, are used to maintain state information • governs the transfer of files across a network • developed at CERN (Central European Research Network), they also came up with the name WWW, later W 3 C • supports access to SMTP, FTP and other protocols • was designed to support hypertext • exchanged information, can be static or dynamic • based on client/server model typically using TCP/IP sockets • Consists of two phases: Request phase and Response phase 12/2/2020 40

HTTP (Hyper. Text Transfer Protocol) • Request Phase § General form of an HTTP request – HTTP Method Domain part of URL HTTP version Follwed by header fields, blank line, and message body – Ex: GET /content/chapter 1. html HTTP/1. 1 § HTTP Request methods Metho d GET HEAD POST Description Returns the content of the specified document i. e. , Retrieve document or document produced by a program Returns the header information for the specified document Executes the specified document, using the enclosed data i. e. , Append or attach information PUT 12/2/2020 Replaces the specified document with the enclosed data i. e. , Store information DELET Deletes the specified document 41

HTTP (Hyper. Text Transfer Protocol) • Response Phase § General form of an HTTP response : Status Line follwed by response header fields, blank line, and response body • HTTP version 3 -digit status code short textual explanation for the status code – Ex: HTTP/1. 1 200 OK § HTTP Status Code Description 1 XX Informational, No 1 xx status codes are defined, and they are reserved for experimental purposes only 2 XX Success, Means that the request was processed successfully 200 OK Means that the server did whatever the client wanted it to, and all is well 3 XX Redirection, Means that the resource is somewhere else and that the client should try again at a new address, 301 Moved permanently, 302 Moved temporarily 4 XX Client error, Means that the client screwed up somehow, usually by asking for something it should not have asked for. 400: Bad request , 401: Unauthorized, 404: Not found 12/2/2020 Server error, means that the server screwed up or that it couldn't do as the 42

HTTP (Hyper. Text Transfer Protocol) - Versions • Three versions of HTTP. § The first one was HTTP/0. 9, which was truly primitive and never really specified in any standard. § This was corrected by HTTP/1. 0, which was issued as a standard in RFC 1945. this is in common use today § RFC 2068 describes HTTP/1. 1, which extends and improves HTTP/1. 0 in a number of areas. Very few browsers support it • The major differences are a some extensions in HTTP/1. 1 for authoring documents online via HTTP and a feature that lets clients request that the connection be kept open after a request so that it does not have to be reestablished for the next request. This can save some waiting and server load if several requests have to be issued quickly. 12/2/2020 43

CGI(Common Gateway Interface) • Web servers must be able to server up content from dynamic sources § How can a Web server respond to a request by invoking an application that will automatically generate a document to be returned? • One of the first approaches to solve this problem, was CGI, a standard mechanism that enables HTTP servers, to interface with external applications, which can serve as „gateways“ to the local information system • How does CGI work § it assigns programs to URLs, so that when the URL is invoked, the program is executed § All URLs that refer to a special directory (ex: var/www/cgi-bin) cause the execution of a corresponding script at the server. ex: http: //web. mit. edu/cgi-bin/test. cgi § CGI programs often serve as an interface between a database and a Web server, allowing users to submit complex queries over the DB through predefined URLs § CGI Scripts typically translate parameters into SQL statements for a 44 12/2/2020 database and translate the query results into an HTML page

CGI • is a way for web servers and server-side programs to interact. • is completely independent of programming language, operating system and web server. • Currently, it is the most common server-side programming technique and supported by almost every web server in existence. • Moreover, all servers implement it in (nearly) the same way, so that you can make a CGI script for one server and then distribute it to be run on any web server. • CGI programs are just ordinary executable programs (or interpreted programs written in, say, Perl or PHP or Python, as long as the server knows how to start the program), • Before the CGI program is started the web server sets a number of environment variables that contain the information the web server received in the request. Examples of this are the IP address of the client, the headers of the request etc. Also, if the URL requested contained a ? , everything after the ? is put in an environment variable by itself. • The way the CGI returns its output (HTTP headers and HTML document) to the server is exceedingly simple: it writes it to standard out. 12/2/2020 45 In other words, in a Perl or Python script you just use the print statement. In C you use printf or some equivalent (C++ uses cout <<) while Java

Forms • The most common way for server-side programs to communicate with the web server is through ordinary HTML forms • Pages which contain fields to be filled by user • Usually contain a “Submit” button • When user presses “Submit”, server responds by sending a page containing information specific to the user-supplied parameters • Examples: § Web search tools § Order forms in commercial web sites • Server sends original html page containing input fields • User types info into fields and presses submit button • Client establishes connection with handler script at server side (script filename contained in web page) • Client collects user input into a long string and sends it along with an HTTP command back to server • POST customer=John+Doe&cardno=1234567890&expires=6/98&product=123&quantity =5 • 12/2/2020 Handler script at server reads parameter string and processes it, usually 46 producing a new page as a result

Servlets • Performance CGI programs involve a certain overhead • Separate process for each instance takes time, requires a context switch in the operating system • Multiple request results – multiple process • To avoid this overhead, Jave servlets can be used instead • The idea is exactly the same as in CGI programs, but the implementation differs. • How do they work? § Execution and result is the same, but servlets are invoked directly by embedding servlet-specific information within an HTTP request run as threads of the Java server process, moreover they run as a part of the Web server eliminates overhead 12/2/2020 47

Web Programmer’s Toolbox Common Tools used in Web Programming • XHTML, a markup language • XML, a meta-markup language • Java. Script, Java, Perl, PHP and Ruby, programming languages • Ajax, a web technology that uses Java. Script and XML • Rails, a development framework for web based database access systems Web programs and scripts are divided into two categories: • Client side (XHTML, XML, Java. Script, Java applets) • 12/2/2020 Server side (Perl, PHP, Ruby, Servelets) 48

XHTML • Describe the general form and layout of documents to be displayed by a browser • Not a programming language, cannot be used to describe computations • An XHTML document is a mixture of control and content xvsdsdsd • Controls are specified using tags, name of the tag specifies the category of its content • Most of the tags consists of pair of syntactic markers that are used to delimit the particular kind of text • Pair of tags and their content together are called an element. Ex: {<p>, </p> } paragraph element • XHTML 1. 0 was introduced in early 2000 by W 3 C as an alternative to HTML 4. 01 12/2/2020 49 • XHTML 1. 1, current version was released in May 2001

XHTML • XHTML documents can be created with a general purpose text editor • Tools for creating XHTML documents § XHTML Editor § WYSIWYG XHTML Editor • XHTML editors § provide shortcuts , spell checkers and syntax checkers, may use color code in the display of XHTML document to make it easier read and edit • WYSIWYG XHTML editor § is a more powerful tool for creating XHTML documents. You can see the document that XHTML describes while writing the XHTML. § Very useful for beginners, who wants to create simple documents without learning XHTML § Example: Microsoft Front Page, Macromedia Dreamweaver, Adobe Page. Mill § Visit www. adobe. com www. macromedia. com 12/2/2020 50 www. microsoft. com/frontpage/ for more details

XML (e. Xtensible Markup Language) • A meta-markup language is a language for defining markup languages • Simplified version of Standard Generalized Markup Language (SGML), designed to allow the users to easily create markup languages that fit their own needs • The set of tags and attributes are designed for the application at hand • Describes data and its meaning through their individualized tags and attributes • Application programs can be written to use the meanings of the tags in the given markup language to find specific kinds of data and process it accordingly • Every XML document has the form of a single document tree with one root element 51 • 12/2/2020 Document Type Definition(DTD) is a document that

Java. Script • Client side scripting language, used to validate form data and to create dynamic XHTML documents • Dynamically typed language; c++ and Java are strongly typed languages • Java. Scripts are usually embedded in XHTML documents, which are downloaded by the browsers • Java. Script code in a XHTML document is interpreted by the browser on the client • Important application of Java. Script is to dynamically create and modify the documents 12/2/2020 52

Perl • Most commonly used language for CGI programs • Highly portable and powerful language • Syntax is similar to C, however, Perl code is not compiled into machine language and executed as in C, instead, it is compiled to an intermediate language and interpreted • Has features to access OS functions directly, powerful pattern matching operations • Ability to include database operations easily 12/2/2020 53

PHP( Hypertext Preprocessor) • Server side scripting language, specifically designed for web applications • Uses executable code embedded in XHTML to create dynamic web pages • Has many built-in functions to perform database operations, sending e-mail, and creating PDFs etc. , • The PHP code is interpreted on the server before the XHTML document is delivered to the requesting client • Grabbing posted data is simple. So form data can be processed easily • Syntax is similar to C++, C , Perl • Current version is 4. 1. 1, first version was released in 1994 • Supports different DBMS, excellent language for building programs that need web access to databases 12/2/2020 54

Ruby • Is a pure object oriented interpretive scripting language • Designed by Yukihiro Matsumoto in the early 1990 s and released in 1996 • Every data value is an object and all operations are via method calls • Both classes and objects in Ruby are dynamic. In the sense that, methods can be dynamically added to either • Both classes and objects can have different sets of methods at different times during execution. So different instantiations of the same class can behave differently 12/2/2020 55

Rails • Is a development framework for web based applications that access databases • Often called Ruby on Rails or simply Ro. R, because of its intimate connection with Ruby • Developed by David Heinemeir Hansson in the early 2000 s and was released in July 2004 • Based on the Model-View -Controller(MVC) architecture for applications, which clearly separates the presentation and the data model from program logic • Applications are tightly bound to relational databases • Used in conjunction with Ajax, Written in Ruby • Was designed to be used with Ruby and makes use of the strengths of that language 12/2/2020 56

Ajax (Asynchronous Java. Script + XML) • Is an approach that uses Java. Script to create more responsive interactions between browser and a server • There are two variations from the traditional web interactions § First, the communication from the browser to server is asynchronous; that is browser need not to wait for the server to respond, the browser user can continue whatever he or she was doing while the server finds and transmits the requested document and the browser renders the new document § Second, the document provided by the server usually is only a relatively small part of the displayed document, and therefore it takes less time to be transmitted and rendered § These two changes can result in much faster interactions between browser and the server • Goal of Ajax is to have web based applications become closer to desktop applications(client resident), in terms of the speed of interactions and there by the user experience • Does not require the learning of a new tool or language, rather it requires only a way of thinking about web 12/2/2020 57

Internet Usage and Population Statistics: India YEAR Users 1998 1, 400, 000 1, 094, 870, 677 0. 1 % ITU 1999 2, 800, 000 1, 094, 870, 677 0. 3 % ITU 2000 5, 500, 000 1, 094, 870, 677 0. 5 % ITU 2001 7, 000 1, 094, 870, 677 0. 7 % ITU 2002 16, 500, 000 1, 094, 870, 677 1. 6 % ITU 2003 22, 500, 000 1, 094, 870, 677 2. 1 % ITU 2004 39, 200, 000 1, 094, 870, 677 3. 6 % C. I. Almanac 2005 50, 600, 000 1, 112, 225, 812 4. 5 % C. I. Almanac 2006 40, 000 1, 112, 225, 812 3. 6 % IAMAI 2007 42, 000 1, 129, 667, 528 3. 7 % IWS 12/2/2020 Population % Pen. Usage Source 58

Statistics 12/2/2020 59

Recommended Texts – for further study Web Standards: Programmer's Reference, Steven M. Schafer, Wiley Publishing, 2005. Professional Javascript for Web Developers, Nicholas C. Zakas, Wiley Publishing, 2005. Teach Yourself Javascript in 24 Hours, Michael Moncur, Sams Publishing, 2007. Learning Perl, Randal L. Schwartz, Tom Phoenix, and brian d foy, O'Reilly Media Inc. , 2005. Programming PHP, Rasmus Lerdorf, Kevin Tatroe, and Peter Mac. Intyre, O'Reilly Media Inc. , 2006. Learning PHP & My. SQL, Michele E. Davis and Jon A. Phillips, O'Reilly Media Inc. , 2006. Learning SQL, Alan Beautieu, O'Reilly Media Inc. , 2005. Teach Yourself in 10 Minutes, Phil Ballard, Sams Publishing, 2006. Programming with World Wide Web, Robert W Sebesta, 4 th ed, 2008, Pearson education 12/2/2020 60

Assignment 1. For the following products, what brand do you have access to, what is its version number, and what is the latest version available ? § § § Browser Web server Perl Java PHP 2. Search the web for information on the history of the following technologies and write a brief overview § TCP/IP § SGML § XHTML § ARPANET § BITNET § XML § Rails 12/2/2020 § Ajax 61

Quick QUIZ • What is WWW? • What is Hyper. Text? • Where is Java. Script, PHP, Java Applets, Servelets interpreted • Differentiate Java and Java. Script • What is CGI ? • What is DNS? • What is a Web Resource? • What is Ajax ? • What is Ruby? • What is Rails ? • What is LAMP and WAMP ? • Who is the owns internet ? 12/2/2020 62

Thank you Web programming with tears ? OR Web programming with smiles ? 12/2/2020 63
- Slides: 63