Web programming is about more than creating and formatting webpages and websites, though that is often a starting point for many. Using scripting languages such as JavaScript, Perl and PH, it becomes possible to add a lot more functionality to a site.
This book teaches the essentials of working with the most important web technologies. From client development using HTML and Javascript, through to full server side applications written in ASP and Perl, the complete web system is shown. Concentrating on immediately useful code rather than theory, this is a how-to book for practical and project based courses. The broad scope covered by this book begins by creating reasonably simple webpages with HTML, then working through related document and content tagging systems such as dynamic HTML and eventually XML.
"synopsis" may belong to another edition of this title.
Chris Bates has been teaching a web programming course for several years to a large and diverse group of students during which he has created and refined the examples and exercises used in the book.
This book is about implementing websites on servers and on browsers. Rather than concentrate in fine detail upon specific technologies, Chris Bates has provided a comprehensive and accessible introduction to the essentials of web development, covering an ever-expanding field in a single volume. Focusing on immediately useful code rather than theory, this is a how-to book for programmers who need quick answers.
Starting with client-side development using HTML and CSS, and moving on to more complex server-side applications written in open source languages such as Perl and PHP, the new edition of this successful textbook has been substantially revised and updated to include increased coverage of PHP and new sections on database design and configuration, Apache and MySQL. Based on years of successful teaching and taking an insightful, example-led approach, Web Programming is the complete all-in-one introduction to website programming and development, ideal for classroom use or self-study.
This book is about implementing websites on servers and on browsers. Rather than concentrate in fine detail upon specific technologies, Chris Bates has provided a comprehensive and accessible introduction to the essentials of web development, covering an ever-expanding field in a single volume. Focusing on immediately useful code rather than theory, this is a how-to book for programmers who need quick answers.
Starting with client-side development using HTML and CSS, and moving on to more complex server-side applications written in open source languages such as Perl and PHP, the new edition of this successful textbook has been substantially revised and updated to include increased coverage of PHP and new sections on database design and configuration, Apache and MySQL. Based on years of successful teaching and taking an insightful, example-led approach, Web Programming is the complete all-in-one introduction to website programming and development, ideal for classroom use or self-study.
This book is an introduction to some of the basic technologies for creating and processing content on Internet Web sites. It is not meant to be a comprehensive guide to any of the areas covered, there are plenty of those available if you need them, but it should provide enough information for the majority of readers. If you find that you want more information, better tutorials or the comprehensive coverage that so many authors favor nowadays, you are directed to the computing shelves of your nearest bookshop. I have attempted to introduce a number of technologies which when combined make an interesting and user-friendly Web site. Hopefully throughout the text there are enough examples to get you started with each of them.
If you are thinking about creating a Web site then you are probably planning to use a lot of text and some images to make it lively, and possibly a sound clip or two. What about building a dynamic and interactive multimedia extravaganza? Sounds intimidating, doesn't it? There are many complex ways of doing these things which require that you be a fully paid up Geek before you begin. There is also a much simpler approach called dynamic HTML, a mix of standard HTML and simple JavaScript, to help you out. It will significantly reduce the development workload and DHTML is supported by all of the popular browsers. This means that you can create leading-edge Web sites without needing to use things like plug-ins or Java applets.
The Web is no longer just a way of presenting information on a computer screen. Being realistic, it has not been for a number of years now. Many commercial sites include some way of getting information from a browser and back to their server. The usual way of doing this is by writing small programs called scripts which run on the server. The process uses a protocol called the Common Gateway Interface or CGI for short. Does this book cater for CGI developers? You bet it does, but to be realistic if you're going to develop any sort of CGI script then you have to understand at least something about programming. It is not so complicated that it has to be left to the people with computer science degrees and years of experience in the internals of complex programming languages like C++ or ADA, but it is complicated. Having said all of that, with a little bit of patience, plenty of hard work, and some thought, many people can write effective server-side scripts.
Web server scripts can be written in almost any programming language. I've chosen to include two languages: Perl and PHP. Perl is probably not the easiest programming language but people from many different backgrounds pick it up quickly enough if they get the right support. The important thing about Perl is that it is perfectly suited to CGI scripting, although it has lots of other uses too. PHP looks very similar to Perl but with a lot of complex syntax removed. It is a phenomenally popular language with libraries available which cover just about any Web development task you can name. It is possible to argue that PHP is now so widely used that it is the single most important technology in this book. PHP works with any Web server but can be optimized to run with Apache using an extension to that server. The interesting thing about PHP is that its growth has happened almost unnoticed by the wider computing community. It is rarely mentioned in the media, yet it is used by millions of sites around the World. PHP is an underground phenomenon which just cannot be ignored.
Those of you interested in CGI scripting should be able to cope with the HTML and JavaScript in the book. Even if you're new to the field you can soon learn what you need to know. But you may want to add more to your site: collecting data about users, creating tailored Web pages, or accessing databases and file systems. Some of these are relatively trivial tasks, as you'll see later, others are at the complicated end of the programming spectrum. If you're keen to learn and willing to work through the examples and exercises even the hardest of these scripts should not prove too difficult.
One technology that I cannot ignore is Extensible Markup Language, XML. This is like HTML after a trip to the gym, it's a way of formatting almost any data so that many applications can handle it. And, fortuitously it just happens that many Web browsers can process or display XML files. With XML, data from spreadsheets, reports, databases, or even applications like CAD packages can be displayed on Web sites. It can be amended and stored in a variety of ways. The computer industry has been looking out for something like XML for a long time. In this book I will give you a taste of what it is and how it can be used and show you a few scripts that let you add the power of XML to your Web site.
Chapter 17 gives you the chance to implement a large system based around an imaginary problem. You can cherry-pick the parts that you choose to do: for instance you may not have access to CGI and database facilities. Whichever part(s) you try should give you a feel for what Web development is all about today. And before anyone asks, no, I don't have a sample solution. There are as many correct (and good) Web sites for any customer as there are developers building those sites.
One more thought, don't dive straight into the most complex parts. Each of the main chapters has some exercises to help you learn. Once you have done the learning you will be able to apply your new knowledge, but not before. That is obvious when someone says it, but take a look around the Web: it is a mess of broken links, bad coding, and sites that are permanently under construction. It is better to know what you are doing, take your time over it and produce an exemplary Web site than to rush in and create something quick but dirty. Surveys suggest that Web sites, especially commercial ones, have just one chance to attract surfers. Make the most of that chance and you will get repeat visits. If you are building business sites then repeat visits equal repeat sales. Customer loyalty starts from that first ever download.
1.1 HTML, XML, AND THE WORLD WIDE WEB
What is HTML and what is it for? First of all, the acronym HTML means Hypertext Markup Language. HTML is a method of describing the format of documents which allows them to be viewed on computer screens. HTML documents are displayed by Web browsers, programs which can navigate across networks and display a wide variety of types of information. HTML pages can be developed to be simple text or to be complex multimedia extravaganzas containing sound, moving images, virtual reality, and Java applets. Most Internet Web pages lie somewhere along that continuum, being mostly text but with a few images to add interest and variety.
The Internet is a global phenomenon which can provide documents from servers across the world to browser clients which can be in any location. If documents are to be readily exchanged across such a vast and complex network, some sort of global protocol is required which allows that information to be viewed anywhere.
The global publishing format of the Internet is HTML. It allows authors not only to use text, but also to format that text with headings, lists, and tables, and to include still images, video, and sound within the text. Readers can access pages of information from anywhere in the world at the click of a mouse-button. Information can be downloaded to the reader's own PC or workstation, printed out or e-mailed on to others. HTML pages can also be used for entering data and as the front-end for commercial transactions.
It is probably also worth briefly mentioning what HTML is not. It is not a programming language — you cannot write an HTML program and expect anything to happen. It is not a data description language — the HTML that you write will not tell anyone anything about the structure of your data, although XML will add those capabilities should you choose to use them. Finally HTML is not really very complicated — although the creators of WYSIWYG authoring tools would like you to think that it is.
1.1.1 A Little Bit of History
The idea of hypertext and hyperlinked documents has been around for a while. In order to be practical it required the implementation of a number of technologies which began to come together in the 1980s, an early example being the HyperCard information management system from Apple. HTML itself was developed by Tim Berners-Lee when he worked at CERN, the European center for particle physics. The phenomenal success of HTML as a format was due to the Mosaic browser developed at NCSA, the US super-computing center, and the simplicity of the language itself.
Mosaic was the result of a US government funded research project and was distributed free of charge. Much of the functionality that we now see in the Netscape Navigator browser in particular, has evolved directly from the early Mosaic browser so that, although Mosaic itself is no longer in development, its influence lives on.
HTML is an application of something called SGML, the Standardized General Markup Language. SGML grew from a number of pieces of work, notably Charles Goldfarb, Edward Mosher and Raymond Lorie at IBM who created a General Markup Language in the late 1960s. In 1978 The American National Standards Institute (ANSI) set up a committee to investigate text processing languages. Charles Goldfarb joined that committee and lead a project to extend GML. In 1980 the first draft of SGML was released and after a series of reviews and revisions became a standard in 1985.
The use of SGML was given impetus by the US Department of Defense. By the early 1970s the DoD was already being swamped by electronic documentation. Their problem arose not from the volume of data, but from the variety of mutually incompatible data formats. SGML was a suitable solution for their problem — and for many others over the years.
Many people mistakenly believe that the Internet and World Wide Web are the same thing. In fact the Internet has been growing for a long time and supports a number of TCP/IP based protocols. Standards exist for sending e-mail (SMTP), Usenet news (NNTP), and file transfer (FTP), alongside a variety of indexing and searching mechanisms such as Gopher and Archie (now obsolete). The 1990s has seen explosive growth in the use of networked computing and the Internet, based in large part upon the growth of homepages on the Web. These homepages are attractive to authors and readers because they are written in HTML and can be formatted in a wide variety of appealing ways.
To be successful, the Web depends on Web page authors and browser vendors sharing the same conventions for HTML. Commercial vendors such as Netscape (e.g., frames) and Microsoft (e.g., banners) have attempted to develop proprietary tags so that certain text formatting can only be seen on their browser. Such developments are both unwelcome and unlikely to succeed against the libertarian and anarchic framework of the Web. Where a development is seen to be both popular and widely useful, such as Netscape's frame tag or some of Microsoft's Dynamic HTML developments, it will be accepted into a revision of the HTML standard. Where tags are either too system specific or lack technical merit they tend to fall into disuse. There is little point in developing a Web site using fancy formats which visitors cannot see with their browser.
HTML standards (called recommendations by W3C) are created by a group of interested organizations and individuals called W3C. There have now been three official HTML standards: version 2.0 was released in 1994 and remains the baseline for backwards compatibility and should be supported by all browsers and authoring tools; version 3.2 was released in 1996 with many useful additions; version 4.0 was ratified towards the end of 1997 and slightly amended in late 1999. Although many books have been published based around the HTML 3.0 specification, this version was never officially released by W3C. When you create your new documents try to stick to using HTML 4.0 all of the major browsers will soon support it and relatively few Web surfers use the older versions of browsers.
HTML has been developed so that a wide variety of client systems should be able to use information from the Web: PCs and workstations with graphics displays of varying resolution and color depths; cellular telephones; handheld devices; devices for speech for output and input; computers with high or low bandwidth; and cable-television systems. Authors, especially those developing commercial Web sites need to be aware of all of these. Excluding anyone from using a site means excluding customers — fancy Web pages are very nice but surely counter-productive if they lead to a smaller growth in the customer base than might have been expected. Having said that, there is no excuse for ignoring the standards. If authors had not implemented the new tags as they were ratified by W3C we wouldn't have tables and forms, or stylesheets, or a myriad of other useful formats. The whole Web surfing experience would surely be poorer for these omissions.
1.1.2 XML: The Future of the Web
HTML has, literally, changed the way that we look at and present information. There is now a clear distinction between content and format and new rules for designing and laying-out content are evolving. It is now clear that images, still or moving, and sound can become part of the reader's experience and yet HTML is unsatisfactory in a number of ways:
• advanced Web sites which rely upon the latest tags or use scripting and programming languages to animate the Web page are unusable by many people with disabilities,
• the Web remains largely the preserve of people using the English alphabet. More support is required for different character sets and for different approaches to document preparation,
• many types of content cannot be expressed in conventional alphabets. Most mathematics and much hard science and engineering require different notations. These need to be processed in different ways to conventional text and often cannot be included in HTML documents except as inline images.
Fortunately the limitations of HTML have been widely recognized and are being solved. The most important of the solutions is XML, Extensible Markup Language which is a grammar (or set of rules) for creating other markup languages. The power of XML comes from allowing Web designers to specify their own tags to meet their own needs. A site developer who uses a unique data type or wants to express a particular idea in a Web page can create their own specification and use it in on the Web.
Here is a quick example showing how XML includes lots of information which is lost when HTML is used:
HTML
Ford Mustang
5
70 m.p.h.
XML
Browsers have recently started to appear which support XML. Microsoft lead the field here with Internet Explorer, which is in version 5 as I write. This has good support for XML and in fact its parser is available for use by other applications. XML may soon become a ubiquitous data format on the PC desktop.
The W3C consortium has already specified a markup language which can be used to express and format mathematical expressions, and other markup grammars are available for multimedia and for describing chemical structures. Combining these markup languages with stylesheets and scripting provides a powerful set of tools, especially for developers inside large organizations. Much complex data can now be presented inside Web pages for consumption either internally or for use by those outside the organization.
HTML is also changing. A new standard has just been agreed called XHTML. This brings together the strict rules applied to XML markup and conventional HTML tags. Section 3.6 provides a brief guide to converting your HTML 4 Web page into XHTML. This is important because the intention is that all browsers and servers will move to supporting XHTML. HTML is not compliant with the XHTML standard in a number of ways but with care it can be.
1.1.3 Hypertext
As the name suggests, hypertext is more than simply text. Text is two-dimensional and linear; it flows from one place to another. The meaning that we extract from text is often multi-dimensional, with the words that we read able to trigger associations or set us off on tangential thoughts. Many novelists, poets, and playwrights have tried to place the multiple dimensions of meaning directly into the text. Whether authors such as Thomas Pynchon or William S. Burroughs succeed as they de-construct the novels they write, while writing them, is a matter of debate. What is obvious is that their techniques cannot usefully be applied to non-fiction material where clarity of meaning and intent is so important.
(Continues...)
Excerpted from Web Programmingby Chris Bates Copyright © 2006 by John Wiley & Sons, Ltd. Excerpted by permission of John Wiley & Sons. All rights reserved. No part of this excerpt may be reproduced or reprinted without permission in writing from the publisher.
Excerpts are provided by Dial-A-Book Inc. solely for the personal use of visitors to this web site.
"About this title" may belong to another edition of this title.
FREE shipping within U.S.A.
Destination, rates & speedsSeller: Better World Books, Mishawaka, IN, U.S.A.
Condition: Very Good. 3 Edition. Former library book; may include library markings. Used book that is in excellent condition. May show signs of wear or have minor defects. Seller Inventory # GRP21732906
Quantity: 1 available
Seller: WorldofBooks, Goring-By-Sea, WS, United Kingdom
Paperback. Condition: Very Good. Web programming is about more than creating and formatting webpages and websites, though that is often a starting point for many. Using scripting languages such as JavaScript, Perl and PH, it becomes possible to add a lot more functionality to a site. This book teaches the essentials of working with the most important web technologies. From client development using HTML and Javascript, through to full server side applications written in ASP and Perl, the complete web system is shown. Concentrating on immediately useful code rather than theory, this is a how-to book for practical and project based courses. The broad scope covered by this book begins by creating reasonably simple webpages with HTML, then working through related document and content tagging systems such as dynamic HTML and eventually XML. The book has been read, but is in excellent condition. Pages are intact and not marred by notes or highlighting. The spine remains undamaged. Seller Inventory # GOR001874973
Quantity: 3 available
Seller: booksdeck, Westlake Village, CA, U.S.A.
Softcover. Condition: New. Brand new book. International edition printed overseas but with similar contents as compared to the US edition. Same day shipping with tracking. Seller Inventory # 1274|9780470017753
Quantity: 2 available
Seller: AwesomeBooks, Wallingford, United Kingdom
Paperback. Condition: Very Good. Web Programming: Building Internet Applications This book is in very good condition and will be shipped within 24 hours of ordering. The cover may have some limited signs of wear but the pages are clean, intact and the spine remains undamaged. This book has clearly been well maintained and looked after thus far. Money back guarantee if you are not satisfied. See all our books here, order more than 1 book and get discounted shipping. Seller Inventory # 7719-9780470017753
Quantity: 1 available
Seller: Reuseabook, Gloucester, GLOS, United Kingdom
Paperback. Condition: Used; Very Good. Dispatched, from the UK, within 48 hours of ordering. Though second-hand, the book is still in very good shape. Minimal signs of usage may include very minor creasing on the cover or on the spine. Seller Inventory # CHL3390247
Quantity: 1 available
Seller: Bahamut Media, Reading, United Kingdom
Paperback. Condition: Very Good. This book is in very good condition and will be shipped within 24 hours of ordering. The cover may have some limited signs of wear but the pages are clean, intact and the spine remains undamaged. This book has clearly been well maintained and looked after thus far. Money back guarantee if you are not satisfied. See all our books here, order more than 1 book and get discounted shipping. Seller Inventory # 6545-9780470017753
Quantity: 1 available
Seller: Better World Books Ltd, Dunfermline, United Kingdom
Condition: Good. 3 Edition. Ships from the UK. Former library book; may include library markings. Used book that is in clean, average condition without any missing pages. Seller Inventory # GRP29644096
Quantity: 1 available
Seller: GreatBookPrices, Columbia, MD, U.S.A.
Condition: As New. Unread book in perfect condition. Seller Inventory # 3387139
Quantity: 7 available
Seller: GreatBookPrices, Columbia, MD, U.S.A.
Condition: New. Seller Inventory # 3387139-n
Quantity: 7 available
Seller: PBShop.store UK, Fairford, GLOS, United Kingdom
PAP. Condition: New. New Book. Shipped from UK. Established seller since 2000. Seller Inventory # FW-9780470017753
Quantity: 15 available