|
Free Open Book
Sams Teach Yourself JavaScript in 24 Hours |
Future Web TechnologiesThe 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 JavaScriptJavaScript 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 VersionsCurrently, 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:
<!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. |
Main Menu |
| 500 Juegos Gratis | 500 Giochi Gratis | 500 Jeux Gratuits | 500 Jogos Gratis | 500 Kostenlose Spiele |