You are on page 1of 17
r Chapter! Introduction to Computers, the Internet andthe Web 5 did not participate in auctions, With the advent of eBay and other online auction sites. how ever, people are auctioning off everything from computer games to gardening tools. Anoth: er groundbreaking innovator i Priceline.com, which has enjoyed enormous success with a model that lets the customer name their Price for a certain item. To figure out just how fast the Internet economy is growing, the Center for Research in Electronic Commerce at the University of Texas at Austin conducted a study of over 2000 Internet companies. It found explosive growth from $322 billion in 1998 to $524 bil lion in 1999, a 68 percent increase. The fastest growing sector was e-commerce, which sky rocketed by 72 percent from $99.8 billion to $171.5 billion. According to researchers estimates. over 50,000 companies make some or all oftheir money online. By 2002, over a trillion dollars in revenue will be generated through the Internet. E-business has become standard operating procedure for the vast majority of compa nies. Setting up and running an e-business, especially one that processes a large number of transactions, requires technical, marketing and advertising expertise. Customers want access to products and services on a 24-by-7 basis, and the easiest way to provide that is to move operations online. The businesses that provide the most reliable, most functional, most user-friendly and fastest services will be the ones that succeed. Banks are moving all of their operations online. as it becomes clear that the Web. unconstrained by geographic boundaries, is a more efficient vehicle for their services and allows them to work on a truly global scale. Real-time trading in foreign markets has been made possible, as has instantaneous currency conversion. Soon, global data on financial activity will be available online in real time and global transactions through the Internet will become the norm. People are currently able to pay their bills, write and cash checks, trade stocks, take out loans, mortgage their homes and manage their assets online. Money as we know it may cease to exist, replaced by more convenient technologies such as smart cards and digital cash. Intel- ligent programs will take care of the financial and logistical aspects of the interactions between both the individuals and the corporations who populate the Internet. All that a person will need to go shopping is a connection, a computer, and a digital form of payment. Traditional “brick and mortar” stores are already being replaced by a multitude of elec- tronic storefronts populating the World Wide Web. No single brick-and-mortar store can offer 50,000 products, but an online store has the capability to offer a limitless number of them. Services exist that will comparison shop for a consumer, finding the best deal on items from cooking equipment to cars. An increasing amount of consumer information is being made available, leading to better deals for customers. For instance, Web sites that post ear invoice prices have made it possible for auto buyers to circumvent the sticker price. Internet shopping is already beginning to eclipse more traditional modes, according to research done during the Christmas season of 1999, which found higher satisfaction rates for shopping online than it did for shopping at a brick-and-mortar store or through a catalog. In addition to business-to-consumer operations such as electronic stores, business-to- business marketplaces and services are also taking their place on the Internet. A business which orders products from a supplier online not only completes the transaction with greater speed and convenience, but also can keep track of the shipment constantly. Busi- ness-to-business e-commerce Web sites are also channels that permit close cooperation between different business as well as the outsourcing services that are and will continue to be so crucial to the Internet economy. 8 Introduction to Computers, the Intemet and the Web Chapter 1 be read into the memory unit, tells the ALU when information from the memory ‘unit should be utilized in calculations and tells the output unit when to send infor mation from the memory unit to certain output devices. 6. Secondary storage unit. This is the long-term, high-capacity “warehousing” sec tion of the computer. Programs or data not being used by the other units are nor mally placed on secondary storage devices (such as disks) until they are needed. possibly hours, days, months or even years later. Information in secondary storage takes longer to access than information in primary memory. The cost per unit of secondary storage is much less than the cost per unit of primary memory 1.5 Types of Programming Languages ‘The computer programs that run on a computer are referred to as software. Programmers write the instructions that comprise software in various programming languages, some di- rectly understandable by the computer and others that require intermediate translation steps. Hundreds of computer languages are in use today. These may be divided into three general types: 1. Machine languages 2. Assembly languages 3. High-level languages Any computer can directly understand only its own machine language. Machine lan- guage is the “natural language” of a particular computer. It is defined by the hardware design of that computer. Machine languages generally consist of strings of numbers (ulti mately reduced to 1s and Os) that instruct computers to perform their most elementary oper- ations one at a time. Machine languages are machine dependent (i... a particular machine language can be used on only one type of computer). Machine languages are cumbersome for humans, as can be seen by the following section of a machine-language program that adds overtime pay to base pay and stores the result in gross pay. 41300042774 41400593419 41200274027 ‘As computers became more popular, it became apparent that machine-language pro- gramming was simply too slow and tedious for most programmers. Instead of using the strings of numbers that computers could directly understand, programmers began using English-like abbreviations to represent the elementary operations of the computer. These English-like abbreviations formed the basis of assembly languages. Translator programs called assemblers were developed to convert assembly-language programs to machine lan ‘guage at computer speeds. The following section of an assembly-language program also adds overtime pay to base pay and stores the result in gross pay, but more clearly tha is machine-language equivalent. LOAD BASEPAY ‘ADD OVERPAY STORE Gnossray Althou; computers igh such code is clearer to ‘humans, it is incomprehensible '© maa lated to machine language abut wage increased rapidly withthe advent of assembly TangwaBes 92 Still required many instructions to accomplish even te Nic ange ome developed in which sing ieeks. The translator programs that conver high-level language ani guage are called complle”s: High- level languages slow pe Ati dd into machine langue Jook almost like everyday English and contain commonly used ahenatal soudoes ‘A pyoll progam watien «high-level language might contain a statement such a8: StossPay = basePay + overTinePay Obviously, high-Level lan i vel languages are more desirable from than either machine languages or assembly languages. C. C++: take a considerable amount of i ce eoereees cute high-level language prosane dry without te need for compiling ose into machine language, Although compiled programs execute much faster than LT programs, interpreters are popular in programt-development environments in WA pets grams are recompiled frequently as new features are added and errors are COCR SY a program is developed, a compiled version can be produced to run most efficients, 10 book we study three key programming languages, namely JavaScript, VBScript ts! 1 Each of these so-called scripring languages is processed by interpreters. You will eae interpreters have played an especially important partin helping scripting languages achieve their goal of portability across a great variety of platforms. 1.6 Other High-Level Languages Hundreds of high-level languages have been developed, but on! broad acceptance. Fortran (FORmula TRANslator) was developed by IBM Corporation between 1954 and 1957 10 be used for sciemtific and engineering applications that require ‘complex mathematical computations. Fortran is still widely used. COBOL (COmmon Business Oriented Language) was developed in 1959 by a group of computer manufacturers and government and industrial computer users. COBOL is used primarily for commercial applications that require precise and efficient manipulation of large amounts of data. Today, about half of all business software is still programmed in COBOL. Approximately one million people are actively writing COBOL programs. Pascal was designed at about the same time as C. It was created by Professor Nicklaus Wirth and was intended for academic use. We say more about Pascal in the next section. Basic was developed in 1965 at Dartmouth University as a simple language to help novices become comfortable with programming. Bill Gates implemented Basic on several ‘arly personal computers. Today, Microsoft—the company Bill Gates created—is the world’s leading software development organization, Gates has become—by far—the ‘world’s richest person and Microsoft has been included in the list of prestigious stocks that the Dow Jones Industrials-from which the Dow Jones Industrial Average is calew- ly a few have achieved 10 intoo 10 Computers, the intemet and the Web chapter 1 1.7 Structured Programming vere difficul- During e eae 1960s, many large software development efforts enc’ seed ware schedules were typically late, costs greatly exceeded ee ished prodacts were unreliable “People began to Sere that software developmen cited eae ‘complex activity than they had imagined. Research activity te rograms a evolution of structured programming—a disciplined wo writing Cre than unstructured programs, easier to test Of the more tangible results of this research was tne deve beraamd language by Nicklaus Wirth in 1971 Pascal. tury mathematician and philosopher Blaise Pascal, was deste! proprevuoiag ie academic cavicmments and rg DoPa=a® OP language in most universities. ponsorshiP of ‘The Ada programming language was developed undet oo Hundreds of SeP- States Department of Defense (DOD) during the 1970s arate languages were being used to produce DOD's mut ce mnost of i rare symtoms DOD wanted a single language that WOUE fulfill mefrom Pascal. The lan- wal chosen as a base, but the final Ada language is 40 iffere rd Byron. Lady Lone guage was named after Lady Ada Lovelace, ‘daughter of the POC! lace is generally credited with writing the world’s first COMPULCT Ls by Chi Tas te analytical Engine mechanical compulng 2 eae i muuttasking: this allows FT 21 tanguages such ite programs as C and C++ generally allow programms 0 Pe dig through a technique called multithreading, also enables programmers with parallel activities. 1.8 History of the Internet : ese stuicas at MIT. His research wasa Inne 196 of ny Com! Sn ofthe Werld Wide Web Consortium) was funded by ” RPA the Advanced Research Projects Agency of the Department of Defense. ARPA ‘sponsored a conference at which several dozen ‘ARPAfunded praduate students were DrOUEDE together at the University of Ilinots & Ur- ftune-Champaign to meet and share ideas. During this conference, ARPA rolled out the er systems of about a dozen ARPA-funded uni- th communications lines blueprints for networking the main comput h institutions. They were to be connected Wi me when most people te of versities and researc! Gperating at athen-stunning SOKB (©. 6,000 bits Pet second), at at (of the few who could be) were ‘connecting over telephone lines to computers ata ral (Go bits per second. HMD vividly recall the excitement at hat conference. Researchers at Harvard talked about communication with the Univac 1108 “supercomputer” across the county a the University of Utah to handle calculations related to their computer graphics caneeh Many other intriguing possiblities were raised. Academic research was about 19 {ake a giant leap forward. Shorly after this conference, ARPA proceeded to implement wha ly became called the ARPAnet, the grandparent of today’s Internet. ings worked out differently than originally planned. Although the ‘ARPAnet did ‘enable researchers to share each others’ computers, its chief benefit proved to be the capa- (HTML 4) 262 Introduction to Hypertext Markup Language 4 Cheote, 9 at reodering the page, but will probably not display the PAB 8? Tom intended. tp Common Programming Errors and Testing and Debussiné Tips, we highlight comp” HTML errors and how to detect and correct them. ~ ‘Toe file name of your home page (ihe firs of YOO HT ME PARES that a User sees wy browsing your Web site) should be index. bem” because when a browser does 7° request a specific file in a directory, the normal default Web server response is to ret index.html (this may be different for your server) if it exists in that directory. example, if you direct your browser to www des t02, com, the server actually sends file www devel .com/ index em 10 your browses 9.4 Common Tags Fig. 9.1 shows an HTML file that disp! ays one Tine of text- Line 1 etween the opening tag and the clo, tells the ing contained browser that everything contained BWR TN OT rae, tags should aay ing tag (line 15) is HTML. The 7 the fist and last line of code in your HTML file, respectively. 1 mma 2 3. § 8 9 10 uv 12

Welcome to Our Web Site!

13 14 15 Tew CaNUage 4 (HTML 4) 263 >< RTL 155 in the Be igh rpinning and end > tags. Ce code. Ce ‘of your HTML doc- spe te cabarere ‘amments in HTML are placed inside the sing ‘Useful info rammers unde Siao help yo understand rte that Jou do nce wane sae cee iin debs OUP own code pecan nom ‘the browser to render. Comments Wesee cur first comments online agen {Tyeu have not looked at itfor a while Fig. 9.1: main. Our first Web pay in HTML always begin with : i tet andlor tags inside a comment. We place comma wih >. The browser ignores ay . comments at thet file giving the figure number, the file = anda brief descrip drtepeislens eat We 7 » especially when we introdi features ee ei dooumene aa Eee bead lene Wea easy coe ee ; J + Which contains the page content. Information in tbe eader element i ot generally rendre inthe splay window but may be mae 2i- able to the user through other means, m Lines 6 through 8, Internet and WHW How ¢: - > yanins © Program - Welcone..., which are placed inside the header. Good Programming Practice 9.4 Use a consistent title naming convention for all pages on your site. For example. if your site is called “Al's Web Site,” then the title of your links page might best be “Al's Web Site - Links,” ete. This practice presents a clearer picture to those browsing your site. ‘The TITLE element names your Web page. The title usually appears on the colored barat the top of the browser window, and will also appear asthe text identifying your page if a user adds your page to his or her list of Favorites. The ttle is also used by search ‘ngines for cataloging purposes. so picking @ meaningful title can help the search engines rect a more focused group of people to your site. Line 10 pens the BODY element. The body of an HTML document is the area where you place all weers to display. This includes we images, links, forms, etc. iscuss many elements that can be inserted in the BODY element later in this chapter. These include backgrounds, link colors and font faces. For now, we will sre -e/BODYS ia ite simplest form. Remember to include the closing tag he end of the document right before the closing taf. Various elements enable you to place text in your HTML dotument. We see the para. ‘on line 12: ha 264 Introduction: Jo Hypertext Markup Language 4 (HTML 4) Chapter 9

we: Welcome to Our Web Site!

Alltext placed be a aaa between the

.,.

tags forms one paragraph. This paragraph will be the para, at other material on the page by a line of vertical space both before and after graph. The HTML in line 12 causes the browser t0 the enclosed text a shown in Fig. 9.1 in line 12 causes the browser to render " Our code example ends on lines 14 and 15 with the document, respectively. As dis. ‘These two tags close the body and HTML sections o hould be , which tells the cussed earlier, the last tag in any HTML document s browser that all HTML coding is complete. The closing 138 ° placed before the tag because the body section ofthe document is entirely enclosed by the HTML Section, Therefore, the body section must be closed before the HTML. section 9.5 Headers Headers ae a simple form of text formatting that vary textsize based onthe header’s “lev- eesthe six header elements (2 through HE) are often used to delineate new Seeos and subsections of a page. Figure 9.2 shows how they are used ‘and their relative display sizes. renee the actual sizeof the txt of each header element is selected by the browser and can in fact vary significantly between browsers. Later in the book we discuss how you can “take control” of specifying these text sizes and other text attributes as well. kh Ga 8 eee 1 2 3 4 5 6 7 Internet and WWW How to Program - Headers 8 9 10 n 12 13°
|4 Level 1 Header = 15

Level 2 header

¢ «am 2 8 Nn 2 ciick on the Search Engine address to go to that 15 page.

17 --> JE 39° tty: //wew.yahoo.com

2)

ek Jeeves: tty: //wew.eskjeeves.comc/A>

Btep: //wew.webcrawler.com

Zz 2 a 2 26 z a 30 3” 32 Here are my favorite Internet Search Engines (Chek nthe Senach Eng addsens to go 0 char page Yeboo tay ne Abana te oe a Asc Jeeves inp cw mhseeves come Induction to Hypertoxt Markup Language 4 (HTML 4) 269 chapter 9 “The frst link can be found on lines 18 and 19: p>Yahoo! deiteledeitel.com/A>~ ‘The form of an email anchor is 1 coy anil address is deitel@deitel.com. Click on the address and your browser 7 S412 open on enail messages oo it to me. Wie 9 «roo 2 F895 Linking to an email address (part 1 of 2). bhi, Cee neene 7 37) rocuotion fo Hyperfaxt Markup Language 4 (HIME A) Chapter LSS ls Ig 13 Se Se teres Rs eaacsamenseraoee Ne seal aston ee dae tte me ~ RS9S Unking to on email cadres (part 2 of 2) 9.8 Images We have been dealing exchasively with text. We now show how to incorporate ima Wed pages (Fig 9.6). 1 «mes 2 3 7 i-- Adding images with ETM --> $ 7 Iaternet and WHw How to Program - Welcome : 10 12
3. 16
au chops: + auction to Hi 'ypertext Markup Language 4 (HIML4) —2/* | For this pa, ge, an image background has be poems s been inserted in line 10: ‘BODY ROUND = “bokgrnd.gif*> ‘as mentioned earlier, attributes ia page, 00s of which Is macnanosemy A techcoend Bascsest sonal “ane ig to set certain characteristics a = Ne ar sing an nage To a ground can consist of an maze oracol- image in MORSROUND © “flename’ inte an image as a background, nc ein isos it bekgrnd at opening tag. The filename of used as a back; i ee great ‘ground does not need ge rence ee i a a cl aoa Saale raed wide and 85 pixels high—the Drnwser tiles the image gents one addressable dot of color on eecien “per semen Ech o28hF Look-and-Feel Observation 9.4 i Using ott or our Background can be visually appealing ‘not have any sharp color changes, as they can be making te text on top hard to read, Also try to use an eee that tiles, 1e surrounding repetitions of itself. a Make sure, however: nah disorienting 10 the user: ‘that is, blends smoot “The image in this code example is inserted in lines 14 and 15: vey tag. This is done "e HEIGHT and WEDTH of an imAES, od 144 pixels high. the location of the image file in thi by adding the 5 ‘attribute. You can specify th mea- _ ‘sured in pixels. This image is 200 pixels wide ant Good Programming Practice 9.7 x Always include the HEIGHT’ ‘and WIDTH of an image When the browser toads the HTML file, it will know immediately how much screen space to givé vil therefore lay out the page properly even before it downtoads the image. Common Programming Error 9.2 4 Enrering new dimensions for an imast That change its inherent Spidth-1o-height ratio distorts the appearance ofthe image. For example, ifyour image is "200 pixels wide and 100 pixels high, ‘you should abways make sure "har any new dimensions have a 2:1 width-to-height ratio. n add a border (bl: ith attribute BORDER = * Ifxis jan 0, the wil number of pixels. The image in border of ! pi wage attribute BORDER = 1. e attribute 1s ALT. In of this attribute is and Paul Deitel" ages turned off, ‘you specify src = “location ack by default) to images Wi jth of the border will be that ‘xel, as indicated by the im: Fig. 9.6, the value You cal ‘a number larger th: this example has @ ‘An important imag aur = “Harvey or that cannot view images (i.¢., cast ET EET ‘aur is provided for browsers that have images fext based browsers) The Valve if the ALM attribute will appear on-screen in place of the g the user an idea of what was in the image. Good Programming Practice 9.8 ae in the TMG 10g. image using the KL att Include a description of _—_——— Now that w c to transform aosae ——o placing images on your Web page: 6 will eer ta ms anchors to link your sit to ober sites 08 the I cau aberigemadentan bwin a psead of SINE 2 that i . cis tha aasribute ame 1s ‘This is is similar to the method we used in Fig. 9.6. The different ‘color. Because of this: background imaj ge, we use a solid background 1 ma 2 3 4 erTLe> $ ‘zoternet and ew How to ProcTes © new Bare! 8 9 10 12 13°
sEIGET = #so° Dattons/about.jpg" WIDEH © ide >< /22
14 20 vptel"> 21

32 32 oy mner ~ “table heal” 32 luo one = “batons ee WiDr = "65" HEIGHT = "50" = ‘RUT = "Table Page">
3S og moar = “torn tele 32 yo anc = “bettone/ form. s00 ea +65" . 0 aaa 40 4 42. Tang images os Ink anchors (part 1 of 2), E 276 'ntroduction to Hypertext Markup Language 4 (HIM: 4) When ‘sing the Jont Jace anribute, be careful to only use Comme Cure and via Git name few Mireid nore abecere peste aenenaal lefault wil be displayed instead (usually Times New Roman 9.10 Special Characters, Horizontal Rules and all ot textual needs In HTML, the old QWERTY iffices for typewriter setup no longer St ; HTML 4.0 has a provision for inserting special characters and symbols 7 ira ‘There are some special characters inserted into the Xt of lines 1

A11 information on this site i eceenet Deitel kamp; As#O° a {Al special characters are inserted in their code form pada ee: fecodey, An example of this is gasmpy, Which inserts 0 ampersand Coe ight) and Viated forms of the character (like amp for fampersand and copy FoF °F" Miao be in the form of hex codes. (For examples the hex code for a nother method of inserting an ampersand is touse #387)! and their respective pendix A fora listing of special characters Common Programming Error 9.3 Fonts he Tomes, Ae more Line Breaks ‘The format 1 erm 2 3 $ Strrte>internet and Ww Mow tO program - contact Pagec/EITLE> B 9 10 W 1h ie special characters are entered using the form acoder => 13 16 addres 18

A11 information on thii Deitel 4amp) 1” 20 ayaa Text can be struck out with @ set of cP> You may copy wp to 9 : POEL
ust made ® 25 worth of infoxmat: von c#un>do not copy more Anformations/suB» than (# allowable, Poe ltoducton fo Hypees Markup Language & cna « pa ae ee 1 ee = =o : 6.7 2 Bede ddan dog Se _sieh fim sie tovtn tiny at benoit [Fa peaaimeere ince resents Sie Chk esd so eu bows wl ate yon ng jentaseons eds (Sci At eermstoo co ths rte 4 © Detel & Acsoctes, 1999 i Formarcoprapted iti Da at EP 7 oct copy mow emma a8 aowae No permsnoa aededf you cely need to use 4s ofthe sformaton preseted here aie Wa coe fg.$9 Inserting special characters into HIML (part 2of 2, ax In ines 24 through 26, we introduce three new styles i the SUP and SUB elements, respectively. We touched on line breaks in Fig. 9.7. We now Provide an example of a textual line beak with a horizontal rule (Fig. 9.10), ~ Fig. 9.10: heade: ~ Line breaks htm nd horizontal rules opr 2 {77 Horizontal rules as inserted using the format: a ee


You might also like