Sams Teach Yourself JavaScript in 24 Hours Free Open Book

Sams Teach Yourself JavaScript in 24 Hours

Previous Page
Next Page

Future Web Technologies

The Web has changed dramatically in the last 10 years, and is continually changing. In the following sections, you will explore some of the upcomingand already developedtechnologies that will affect your pages and scripts.

Future Versions of JavaScript

JavaScript has gone through several versions to reach its current one, 1.6. Fortunately, the core language hasn't changed much through these version changes, and nearly all scripts written for older versions will work on the latest one.

The next version of JavaScript, 2.0, is currently being developed by the Mozilla Foundation and ECMA. Version 2.0's main change will be the addition of true object-oriented features, such as classes and inheritance.

As with previous versions, 2.0 should be backward compatible with older versions. To be sure your scripts will work under version 2.0, follow the standard language features and do not rely on any undocumented or browser-specific features.

Future DOM Versions

Currently, the W3C DOM level 1 is an official specification, whereas level 2 is only a recommendation. Level 2 adds features such as event handling and better style sheet support, and is already partially supported by the latest browsers.

By the Way

Hour 15, "Unobtrusive Scripting," introduces the event-handling features of DOM level 2, and describes how to implement the same techniques in Internet Explorer, which does not support them yet.


In the future, expect better browser support for the DOM, and less compatibility issues between browsers.

XML (Extensible Markup Language)

HTML was originally created as a language for the Web, and was based on an older standard for documentation called SGML (Standard Generalized Markup Language). HTML is a much-simplified version of SGML, specifically designed for web documents.

A relatively new language on the scene is XML (Extensible Markup Language). XML is also a simplified version of SGML, but it isn't nearly as simple as HTML. Although HTML has a specific purpose, XML can be used for virtually any purpose.

By the Way

The W3C (World Wide Web Consortium) developed XML, and has published a specification to standardize the language.


Strictly speaking, XML isn't a language in itselfthere is no concise list of XML tags because XML has no set list of tags. Instead, XML enables you to create your own markup languages for whatever purpose you choose.

So what use is a language without any specific commands? Well, XML enables you to define tags, similar to HTML tags, for any purpose. If you were storing recipes, for example, you could create tags for ingredients, ingredient quantities, and instructions.

XML uses a DTD (Document Type Definition) to define the tags used in a particular document. The DTD can be in a separate file or built into the document, and specifies which tags are allowed, their attributes, and what they can contain.

XML is already in use today. Although it isn't directly supported by web browsers, you can use a program on the server to parse XML documents into HTML documents before sending them to the browser.

To return to the recipe example, an XML processor could convert each recipe into HTML. The reason for doing this is simple: By changing the rules in the parser, you could change the entire format of all of the recipesa difficult task to perform manually if you had thousands of recipes.

XHTML (Extensible Hypertext Markup Language)

The HTML specification, at version 4.01, is still considered valid, but the W3C has been working on the successor to HTML, XHTML, now at version 1.1. XHTML is a reformulated version of HTML that fits the strict rules of XML and can be processed with software designed to work with XML.

In practice, XHTML looks very similar to HTML. Here are some of the most obvious changes you will need to make to adapt a page to XHTML:

  • All tags should be lowercase: <p>, <body>, and so forth.

  • Most tags require closing tags: </p>, and so forth.

  • For standalone tags that don't enclose other elements, such as <img> and <br>, a special syntax combines opening and closing tags with a slash before the closing brace: <br/>.

  • The document must follow strict rules of structure and tags must be nested correctly.

  • A <!DOCTYPE> tag is required to specify the XML DTD used for the document. The following specifies the XHTML Transitional DTD:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

The transitional DTD allows some deprecated HTML tags, such as <center>, for compatibility. There is also an XHTML Strict DTD that does not allow any deprecated tags.

By the Way

Browser support for XHTML isn't perfect, especially when it comes to the Strict DTD. It's also difficult to meet XHTML's strict validation requirements while dealing with issues such as user-generated content and scripts. For these reasons, most webmasters use either XHTML Transitional or the still-valid HTML 4.01.


XSL (Extensible Stylesheet Language)

XML documents focus strictly on the meaning of the tagscontentand ignore presentation. The presentation of XML can be determined by creating an XSL (Extensible Stylesheet Language) style sheet.

XSL is based on XML, but specifies presentationparameters such as font size, margins, and table formattingfor an XML document. When you use an XML processing program to create HTML output, it uses an XSL style sheet to determine the HTML formatting of the output.

By the Way

XSL documents are actually XML documents, using their own DTD that specifies style sheet tags. XSL is a newer W3C specification.


Previous Page
Next Page
Index: [SYMBOL][A][B][C][D][E][F][G][H][I][J][K][L][M][N][O][P][Q][R][S][T][U][V][W][X][Y]


     Main Menu
Sams Teach Yourself JavaScript in 24 Hours
Table of Contents
Copyright
About the Author
Acknowledgments
Part I: Introducing the Concept of Web scripting and the JavaScript Language
Part II: Learning JavaScript Basics
Part III: Learning More About the DOM
Part IV: Working with Advanced JavaScript Features
Part V: Building Multimedia Applications with JavaScript
Part VI: Creating Complex Scripts
Hour 21. Building JavaScript Drop-Down Menus
Hour 22. Creating a JavaScript Game
Hour 23. Creating JavaScript Applications
Hour 24. Your Future with JavaScript
Learning Advanced JavaScript Techniques
Future Web Technologies
Planning for the Future
Moving on to Other Languages
Summary
Q&A
Quiz Questions
Quiz Answers
Exercises
Part VII: Appendixes
Index


More Books
PHP Hacks
Processing Xml With Java - A Guide To Sax, Dom, Jdom, Jaxp, And Trax
The Koran (Holy Qur'an)
Macromedia Flash 8 Bible
Search Engine Optimization for Dummies
YouTube Traffic
PHP 5 for Dummies
Harry Potter and The Chamber of Secrets
Harry Potter and the Sorcerer's Stone
The Pilgrim's Progress
Wireless Hacks
Flash Hacks. 100 Industrial-Strength Tips & Tools
PayPal Hacks. 100 Industrial-Strength Tips and Tools
Amazon Hacks
Pdf Hacks
The Da Vinci Code
Google Hacks
The Holy Bible
Windows XP For Dummies
Harry Potter and the Half-Blood Prince
Seo Book
Upgrading and Repairing Networks
Macromedia Dreamweaver 8 UNLEASHED
Windows XP Annoyances
Windows XP Hacks
Microsoft Windows XP Power Toolkit
Teach Yourself MS Office In 24Hours
iPod & iTunes Missing Manual
PC Hacks 100 Industrial-Strength Tips and Tools
PC Overclocking, Optimization, and Tuning - 2th Edition
PC Hardware In A Nutshell 3rd Edition
PC Hardware in a Nutshell, 2nd Edition
Upgrading and Repairing PCs
Google for Dummies
MySQL Cookbook
Teach Yourself Macromedia Flash 8 In 24 Hours
PHP CookBook
Sams Teach Yourself JavaScript in 24 Hours
PHP5 Manual
Free Games Paper Airplanes
500 Juegos Gratis 500 Giochi Gratis 500 Jeux Gratuits 500 Jogos Gratis 500 Kostenlose Spiele