wsd-msc

Embed Size (px)

Citation preview

  • 8/10/2019 wsd-msc

    1/15

    WSD - MSc-IT 2nd

    sem

    The Web vs. the Internet

    There is an often-overlooked distinction between the Web and the Internet. The linebetween the two is often blurred, partially because theWeb is rooted in the fundamentalprotocols associated with the Internet. Today, the lines are even more blurred, asnotions of the Web go beyond the boundaries of pages delivered to Web browsers,

    THE ORIGINS OF THE WEB

    Tim erners-!ee originally promoted theWorldWideWeb as a virtual library, adocumentcontrol system for sharing information resources among researchers. "nlinedocuments could be accessed via a uni#ue document address, a Universal ResourceLocator $%&!'. These documents could be cross-referenced via hypertext links.

    Hypertext

    Ted (elson, father of the )anadu *ro+ect, coined the term hypertet over yearsago, as a way of describing non-se#uential writing/tet that branches and allowschoice to the reader. %nlike the static tet of print media, it is intended for use withan interactive computer screen. It is open, 0uid and mutable, and can be connected toother pieces of hypertet by links.The term was etended under the name hypermedia to refer not only to tet, but toother media as well, including graphics, audio, and video. 1owever, the original termhypertet persists as the label for technology that connects documents and informationresources through links.

    Internet Protocols are the Founat!on o" Web Technolo#y

    It should be noted that the Web did not come into eistence in a vacuum. The Web isbuilt on top of core Internet protocols that had been in eistence for many years prior tothe Webs inception. %nderstanding the relationship between Web technology and theunderlying Internet protocols is fundamental to the design and implementation of trueWeb applications. In fact, it is the eploitation of that relationship that distinguishesa Web page or Web site from a Web application.

    FRO$ WEB P%GES TO WEB SITES

    The eplosively eponential growth of the Web can at least partially be attributed toits grass roots proliferation as a tool forpersonal publishing. The fundamentaltechnologybehind the Web is relatively simple. 2 computer connected to the Internet,running a Web server, was all that was necessary to serve documents. oth 34&(and the (ational 3enter for 5upercomputer 2pplications $(352' at the %niversity

    of Illinois had developed freely available Web server software. 2 small amount ofHTML knowledge $and the proper computing resources' got you something thatcould be called a Web site.

    FRO$ WEB SITES TO WEB %PP&I'%TIONS

    Initially, what people shared over the Internet consisted mostly of static informationfound in 6les. They might edit these 6les and update their content, but there werefew truly dynamic information services on the Internet. 7ranted, there were a few

  • 8/10/2019 wsd-msc

    2/15

    eceptions8 search applications for 6nding 6les found on 9T* archives and 7opherservers: and services that provided dynamic information directly, like the weather,or the availability of cans from a soda dispensing machine. $"ne of the 6rst Webapplications that Tim erners-!ee demonstrated at 34&( was a gateway for lookingup numbers from a phone book database using a Web browser.'

    (e)n!t!on o" a Web %ppl!cat!on

    What is a Web application; y de6nition, it is something more than +ust a Web site.

    It is a client/server application that uses a Web browser as its client program, and performsan interactive service by connecting with servers over the Internet $or Intranet'.2 Web site simply delivers content from static 6les. 2 Web application presentsdynamically tailored content based on re#uest parameters, tracked user behaviors, andsecurity considerations.

    Web pa#e es!#n resources

    9or Web page design, there is a variety of books available. eyond the tutorialbooks that purport to teach 1T

    Web appl!cat!on es!#n resources

    When we eamined the current literature available on the sub+ect of Web applicationdevelopment, we found there were three main categories of books currentlyavailable.

    > Technical (vervie)s. The 6rst category is the technical overvie). These booksare usually at a very high level, describing terminology and technology in broadterms. They do not go into enough detail to enable the reader to design andbuild serious Web applications. They are most often intended for managers andeecutives who want a surface understanding of the terminology without goingtoo deeply into speci6c application development issues. 9re#uently, they attemptto cover technology in huge brushstrokes, so that you see books whose focus is

    simply =ava, )

    > $n!epth Technical Resources. The second category is comprised of in-depthtechnical resources for developing Web applications using speci6c platforms.

    The books in this category provide in-depth coverage of very narrow areas,concentrating on the how-tos of using a particular language or platform without

  • 8/10/2019 wsd-msc

    3/15

    eplaining what is going on under the hood. While such books may beuseful in teaching programmers to develop applications for a speci6c platform,they provide little or no information about the underlying technologies, focusinginstead on the platform-speci6c implementation of those technologies. 5houlddevelopers be called upon to rewrite an application for another platform, theknowledge they ac#uired from reading these books would rarely be transferableto that new platform.

    7iven the way Web technology changes so rapidly, todays platform of choice

    is tomorrows outdated legacy system. When new development platforms emerge,developers without a fundamental understanding of the inner workings of Webapplications have to learn their inner workings from the ground up, becausethey lacked an understanding of 6rst principles/of what the systems they wrotereally did. Thus, the ability to use fundamental technological knowledge acrossplatforms is critical.

    > Re%erence #ooks. These form a third category. 5uch books are useful, naturally,as references, but not for the purpose of learning about the technology.What we found lacking was a book that provides an in-depth eamination ofthe basic concepts and general principles of Web application development. 5uch

    Pr!nc!ples o" *eb appl!cat!on es!#n

    What do we mean when we discuss the general principles that need to be understoodto properly design and develop Web applications;

    We mean the core set of protocols and languages associated with Web applications.This includes, of course, HTT* $HyperText Trans%er *rotocol' and HTML$HyperText Markup Language', which are fundamental to the creation andtransmissionof Web pages. It also includes the older Internet protocols like Telnet and+T*, protocols used for message transfer like ,MT* and $M&*, plus advancedprotocols

    and languages like-ML. 2dditionally, it includes knowledge of databasesand multimedia presentation, since many sophisticated Web applications make useof these technologies etensively.

    The ideal Web application architect must in some sense be a +ack of all trades.*eople who design Web applications must understand not only 1TT* and 1T

    =ava5cript, )

    Be"ore the Web+ T'P,IP

    In this chapter, we eamine the core Internet protocols that make up the T.*/$*protocol suite, which is the foundation for Web protocols, discussed in the netchapter. We begin with a brief historical overview of the forces that led to thecreation of T3*@I*. We then go over the layers of the T3*@I* stack, and show wherevarious protocols 6t into it. "ur description of the client-server paradigm used by

    T3*@I* applications is followed by a discussion of the various T3*@I* application

  • 8/10/2019 wsd-msc

    4/15

    services, including Telnet, electronic mail, message forums, live messaging, and6le servers.

    The cl!ent,server para!#-

    T3*@I* applications tend to operate according to the client/server paradigm. Thissimply means that, in these applications, servers $also called services and daemons,depending on the language of the underlying operating system' eecute by$A' waiting for re#uests from client programs to arrive, and then $B' processingthose re#uests.

    Telnet

    The Telnet protocol operates within the 2pplication layer. It was developed tosupport (etwork Cirtual Terminal functionality, which means the ability to log into a remote machine over the Internet. The latest speci6cation for the Telnet protocolis de6ned in Internet &93 DEF.

    &emember that before the advent of personal computers, access to computingpower was limited to those who could connect to a larger server or mainframecomputer, either through a phone dialup line or through a direct local connection.Whether you phoned in remotely or sat down at a terminal directly connected tothe server, you used a command-line interface to log in. Gou connected to a singlesystem and your interactions were limited to that system.

    With the arrival of Internet services, you could use the Telnet protocol to login remotely to other systems that were accessible over the Internet. 2s mentionedearlier, Telnet clients are con6gured by default to connect to port B on the servermachine, but the target port number can be over-ridden in most client programs.

    This means you can use a Telnet client program to connect and talk to anyT3*server by knowing its address and its port number.

    Electron!c -a!l

    4lectronic mail, or email, was probably the 6rst killer app in what we now callcyberspace. 5ince the net had its roots in military interests, naturally the tone ofelectronic mail started out being formal, rigid, and business-like. ut once the bodyof people using e-mail epanded, and once these people realiHed what it could beused for, things lightened up #uite a bit.

    SMTP

    ,MT* stands for ,imple Mail Trans%er *rotocol. 2s an application layer protocol,5

  • 8/10/2019 wsd-msc

    5/15

    POP

    *(*, the *ost (2ce *rotocol, gives users direct access to their e-mail messagesstored on remote systems. *(*3 is the most recent version of the *"* protocol.

  • 8/10/2019 wsd-msc

    6/15

    referring to the system as a World Wide Web.

    y the end of AJJ, erners-!ee had implemented a server and a command-linebrowser using the initial version of the HyperText Trans%er *rotocol $1TT*' thathe designed for this system. y the middle of AJJA, this server and browser weremade available throughout 34&(. 5oon thereafter, the software was made availablefor anonymous 9T* download on the Internet. Interest in 1TT* and the Web grew,and many people downloaded the software. 2 newsgroup, comp7in%osystems7))),was created to support discussion of this new technology.

    =ust one year later, at the beginning of AJJ, there were about E dierent sitesrunning 1TT* servers. This number grew to B by the autumn of that year. Inaddition, since the speci6cation for the 1TT* protocol was openly available

    B/I&(ING B&O'0S OF THE WEB

    There were three basic components devised by Tim erners-!ee comprising theessence of Web technology8

    A. 2 markup language for formatting hypertet documents.B. 2 uniform notation scheme for addressing accessible resources over the network.

    . 2 protocol for transporting messages over the network.

    The markup language that allowed cross-referencing of documents via hyperlinks wasthe HyperText Markup Language $1T

    %nderstanding of 1TT* is +ust as critical in maintaining comple applications.Gou will realiHe it the 6rst time you try to analyHe and troubleshoot an elusiveproblem. %nderstanding the 1TT* messages passed between servers, proies andbrowsers leads to deeper insights into the nature of underlying problems.

    THE /NIFOR$ RESO/R'E &O'%TOR

    Tim erners-!ee knew that one piece of the Web puHHle would be a notation schemefor referencing accessible resources anywhere on the Internet. 1e devised thisnotational

    scheme so that it would be 0eible, so that it would be etensible, and so thatit would support other protocols besides 1TT*. This notational scheme is knownas the URL or Uni%orm Resource Locator.

    F/N(%$ENT%&S OF HTTP

    1TT* is the foundation protocol of the World Wide Web. It is simple, which isboth a limitation and a source of strength.

  • 8/10/2019 wsd-msc

    7/15

    world by storm while more advanced and sophisticated protocols never realiHedtheir potential.

    1TT* is an application level protocol in the T3*@I* protocol suite, using T3*as the underlying Transport !ayer protocol for transmitting messages. Thefundamentalthings worth knowing about the 1TT* protocol and the structure of 1TT*messages are8

    A. The 1TT* protocol uses the re9uest/response paradigm, meaning that an 1TT*client program sends an 1TT* re#uest message to an 1TT* server, which returnsan 1TT* response message.

    B. The structure of re#uest and response messages is similar to that of e-mailmessages:they consist of a group of lines containing message headers, followed bya blank line, followed by a message body.

    . 1TT* is a stateless protocol, meaning that it has no eplicit support for thenotion of state. 2n 1TT* transaction consists of a single re#uest from a clientto a server, followed by a single response from the server back to the client.In the net few sections, we will elaborate on these fundamental aspects of the

    1TT* protocol.

    HTTP servers1 bro*sers1 an prox!es

    Web servers and browsers echange information using 1TT*, which is why Webservers are often called 1TT* servers. 5imilarly, Web browsers are sometimesreferred to as 1TT* clients, but their functionality is not limited to 1TT* support.It was Tim erners-!ees intent that web browsers should enable access to a widevariety of content, not +ust content accessible via 1TT*. Thus, even the earliestweb browsers were designed to support other protocols including 9T* and 7opher.

    Today, web browsers support not only 1TT*, 9T*, and local 6le access, but e-mailand netnews as well.

    1TT* proies are programs that act as both servers and clients, making re#ueststo web servers on behalf of other clients. *roies enable 1TT* transfers across6rewalls. They also provide support for caching of 1TT* messages and 6lteringof 1TT* re#uests. They also 6ll a variety of other interesting roles in compleenvironments.

    When we refer to 1TT* clients, the statements we make are applicable tobrowsers, proies, and other custom 1TT* client programs.

    Web Bro*sers

    In this chapter, we go over the fundamental considerations in designing and buildinga Web browser, as well as other sophisticated Web clients. When discussing Webbrowsers, our focus will not be on the graphical aspects of browser functionality$i.e. the layout of pages, the rendering of images'. Instead, we shall concentrateon the issues associated with the processing of 1TT* re#uests and responses. Thevalue of this knowledge will become apparent as we proceed to our discussion ofmore sophisticated Web applications.

  • 8/10/2019 wsd-msc

    8/15

  • 8/10/2019 wsd-msc

    9/15

    JavaScript can put d)namic text into an %&' page ( A JavaScript statement li'e this(

    document)write!&*h+,& - name - &*/h+,&" can write a variale text into an HTML page

    JavaScript can react to events ( A JavaScript can e set to execute when something

    happens$ li'e when a page has finished loading or when a user clic's on an HTML element

    JavaScript can read and write %&' elements ( A JavaScript can read and change the

    content of an HTML element

    JavaScript can be used to validate data ( A JavaScript can e used to validate form

    data efore it is sumitted to a server) This saves the server from extra processing

    JavaScript can be used to detect the visitor*s browser. A JavaScript can e used to

    detect the visitors rowser$ and . depending on the rowser . load another page specifically

    designed for that rowser

    JavaScript can be used to create cookies. A JavaScript can e used to store and

    retrieve information on the visitors computer

    The Real Na-e !s E'$%Scr!pt

    !ava"cript*s official name is +($-"cript+. he standard is developed and maintained by the ($- organisation.

    ($-'/0/ is the official !ava"cript standard. he standard is based on !ava"cript #Netscape% and !"cript #$icrosoft%.

    he language was invented by Brendan ich at Netscape #with Navigator /.1%, and has appeared in all Netscape and $icrosoft

    browsers since 2330.

    he development of ($-'/0/ started in 2330, and the first edition of was adopted by the ($- 4eneral -ssembly in !une

    2335.

    he standard was approved as an international I"O #I"O6I( 20/0/% standard in 2337.

    he development of the standard is still in progress

    DYNAMIC - HTML

    3ascading 5tyle 5heets $355' and =ava5cript 5tyle 5heets used in

    concert with5cripting is what puts the dynamism in Kynamic 1T

    It also means thatyou can have an image that not only animates but can move aroundthe page instead ofbeing con6ned to a stationary rectangular space.Gou embellish your content by making stylistic choices that aect thecolor, siHe,font face, boldness, and other aspects of tet markup, and you cancreate margins and

    http://www.ecma-international.org/publications/index.htmlhttp://www.ecma-international.org/publications/index.htmlhttp://www.ecma-international.org/publications/index.html
  • 8/10/2019 wsd-msc

    10/15

    borders for your tet. Then you can position your content eactlywhere you want it toappear in the page instead of the old inline 0ow method. Transparentand opa#ue blocksof content are now possible which you can change, move, resiHe, makeappear or disappear on-the-0y, or respond to user input. If so inclined,you could let each user custom design how the website will appear for

    them.Time will de6nitely be saved if you have a particular style that youwant to use foryour whole site or section of it by creating the 5tyle 5heet +ust onceand saving it in its own 6le and then accessing it multiple times withone line of code. Gou +ust !I(M to the 5tyle 5heet when you want it toapply to that speci6c page.The tet layout paradigm of 5tyle 5heets has been directly ported fromthe desktoppublishing world where programs like Nuark)press have had 5tyle5heets for years. If

    you are familiar with that then youLre already halfway home tounderstanding 3ascading5tyle 5heets in 1T

    getting 1T

    When you use the O5TG!4P 4lement, you have to declare with the TG*4 2ttributewhich type of 5tyle 5heet it is, either TG*4QRtet@355R or TG*4QRtet@=ava5criptR.9or the purposes of clarity and brevity 'SS syntax $3ascading 5tyle 5heet synta'refers to synta declared as8TYPE="text/CSS"

    When the term3avaScr!pt syntax is used it refers to synta declared as8TYPE="text/JavaScript"

    E-Commerce

    What !s e5co--erce4

    4lectronic commerce or e-commerce refers to a wide range of online businessactivitiesfor products and services.A It also pertains to Sany form of business transaction inwhich the parties interact electronically rather than by physical echanges or direct

  • 8/10/2019 wsd-msc

    11/15

    physical contact.B

    4-commerce is usually associated with buying and selling over the Internet, orconductingany transaction involving the transfer of ownership or rights to use goods orservices through a computer-mediated network.Though popular, this de6nition isnot comprehensive enough to capture recent developments in this new andrevolutionarybusiness phenomenon. 2 more complete de6nition is8 :commerce is the

    use o% electronic communications and digital in%ormation processing technology inbusiness transactions to create' trans%orm' and rede8ne relationships %or valuecreationbet)een or among organi;ations' and bet)een organi;ations and individuals.F$s ecommerce the same as ebusiness