The near-universal compatibility of HTML and XML provides a big incentive to format any important document as a web pageeven if you have no immediate plans for putting it on the World Wide Web. You can create a single page that can be printed on paper, sent as an email message, displayed during a board meeting presentation, and posted for reference on the company intranet. You can also take the traditional route and format the page separately for each of these applicationsand edit each file with a different software program when the information needs to be updated. Now that most business software supports the HTML standards, many organizations are trying to get employees to consistently use it for all important documents. Yet the great migration to HTML goes beyond what you might have thought of as "documents" in the old days. Combined with XML, style sheets, JavaScript, and other technologies, HTML-based presentations can in many cases replace what was once done with proprietary data formats, specialized software, or more traditional programming languages. Here are a few of the other areas where HTML is finding application beyond the Web:
I could list many more creative and beneficial uses of HTML beyond run-of-the-mill web pages, but the point is clear: If you need to present any type of information, seriously consider HTML as an alternative to the specialized software or programming tools you would have used for the job a couple of years ago. The remainder of this hour focuses on some specific web technologies that allow you to build web pages that go beyond the confines of basic HTML. Although these technologies certainly go beyond HTML, they all rely on HTML at their core. RSS and Web Page SyndicationReally Simple Syndication (RSS) is a technology that allows you to create and syndicate news feeds using an XML markup language. There are various ways in which you can use RSS. You can display RSS feeds from other web sites on your web site, you can build your own library of RSS feeds and view them regularly using special software called a news aggregator, or you can syndicate your own site using RSS so that other people can view your feeds. When I say that RSS allows you to syndicate web content, I mean that you can subscribe to web sites and easily find out about new changes to a site without actually having to visit the site. Using special software called a news aggregator, you can monitor news feeds from multiple sites and effectively keep tabs on a wide range of information without having to stop by every different site on a regular basis. You can think of RSS as providing somewhat of a "stock ticker" for web page datait allows you to keep constant tabs on when your favorite sites post something new. The easiest way to learn how RSS works is by installing news aggregator software and exploring feeds for yourself. One of the most popular news aggregators available now is FeedDemon, which is available in a free trial version online at http://www.feeddemon.com/. FeedDemon is a standalone desktop application that is completely independent of your web browser.
Figure 24.1 shows the FeedDemon desktop aggregator used to view a news feed. Figure 24.1. FeedDemon is one of the leading desktop news aggregators, and it's reasonably priced.If you pay close attention to the figure, you'll notice that the news feed being accessed is my very own news feed as syndicated from michaelmorrison.com. FeedDemon makes it possible to easily manage quite a few feeds without feeling as if you're totally overburdened with information. After you get comfortable using a news aggregator such as FeedDemon, you'll quickly realize how much more efficiently you can access and process web content. I rarely find myself hopping from site to site now that I can conveniently keep tabs on favorites via news feeds.
Using a Content Management SystemYou've no doubt visited web sites that had a surprising amount of user interaction in the form of discussion groups, private messages, polls, and other forms of dynamic web content and communications capabilities. As you've probably figured out by now, it is difficult to create such web sites using pure HTML alone. Even XHTML combined with CSS and JavaScript has its limitations in terms of dynamic data management, which is typically required of sites that have a great deal of two-way user interaction. Creating a site with high-powered interactive features typically involves a fair amount of high-powered development work. More specifically, most of these kinds of sites require a database management system (DBMS) along with a server-side scripting technology such as Microsoft's Active Server Pages (ASP) or PHP (PHP Hypertext Preprocessor). In short, you need a lot more skills than this book has to offer, not to mention a fair amount of time and resources to develop such a site. Or you can download some free software and do it the easy waytake advantage of someone else's hard work. The software for creating highly interactive, data-driven web sites is known as a content management system, or CMS. Although expensive commercial options exist, there are plenty of open-source (free) content management systems available for you to use. To use such a system, you first download the software and install it to your web server. You then must work through an installation procedure to make sure that the CMS can successfully connect to your database. From there, you spend most of your time organizing the site and developing its content, often entirely through a web-based user interface.
CMS has some significant advantages over traditional web sites because CMS web sites are typically driven entirely by data in a database. For example, most of the pages in a CMS web site are generated dynamically from code stored in a database. This allows you to edit and create web pages directly from within a web browser, and at any location. I regularly update my web site while traveling by using nothing more than Internet Explorer to log in and access the administration area of the site. You really have to think of a CMS as more of a live web publishing system than a static collection of HTML pages. So why have you spent an entire book learning about HTML if a CMS is what you really need? Because a CMS is not for everyone. If you don't need a great deal of user interaction via discussion forums and things of that nature, a CMS may not be all that beneficial to you. Furthermore, CMS web sites can be difficult to "decorate" in terms of giving them a unique look and feel. Many CMS web sites look exactly alike, which is a bummer. If you do take the time and energy to give your CMS site a unique look and feel, you'll need a very good knowledge of HTML and CSS to do so. And this brings me to the final issue related to CMS web sites. Even if you decide to switch gears and go with a CMS software package for your web site, as opposed to creating traditional HTML pages yourself, it's still extremely important to know HTML/XHTML and CSS. You will undoubtedly want to create some unusual pages within the CMS site and possibly even tinker with the overall look and feel of the site. Every CMS software package I've seen relies heavily on CSS to establish a layout and color scheme for its pages. And, obviously, all the pages are HTML or XHTML at their core. So, to make a long story slightly shorter, your HTML/XHTML and CSS knowledge will never go to waste as long as you're dealing with the Web. If you'd like to experiment with some CMS software packages and see how they work, take a look at http://www.opensourcecms.com/. This site has live installations of numerous open-source CMS packages, and they are set up so that you can log in and try them all out. Additionally, my personal site at http://www.michaelmorrison.com/ is an example of a Mambo CMS site, while http://www.musiccitymafia.com/ is an example of an e107 CMS site. Web Pages to Go with XHTML MobileAlthough I've generally referred to the language that runs the Web as HTML, you've actually been learning XHTML as you've progressed through the book. You may be surprised to learn that there is another version of XHTML that I haven't mentioned. I'm referring to XHTML Mobile, which is a scaled-down version of XHTML that is geared toward the limited needs of mobile devices. Mobile devices include any handheld or easily portable technologycell phones, pagers, connected organizers, handheld PCs, and potentially others. Such devices typically have much smaller screens, less memory, and more confined user interfaces (often no keyboard or mouse) than their desktop counterparts. Before XHTML Mobile came along, there were two primary mobile web services, WAP and iMode. iMode was created by NTTDoCoMo, and is popular in Japan and parts of Europe. WAP was created by a group of mobile industry leaders, and is the predominant standard for serving up mobile web pages worldwide. This version of WAP is known as WAP 1.0, and it has taken a fair amount of criticism despite its success. WAP 1.0 and iMode rely on their own markup languages for coding pages served on each. More specifically, WAP 1.0 is based on WML (Wireless Markup Language) and iMode is based on cHTML (Compact HTML). These languages have both worked as basic markup languages for mobile web pages, but they are lacking in many ways as we move to a more powerful XML-based wireless web. Many of the core features in WML and cHTML converged in XHTML Mobile. Most current mobile browsers support XHTML Mobile, which fortunately supports the usage of CSS. As you've seen several times throughout the book, CSS provides a great deal of control over the formatting and display of web pages. When I refer to CSS as it applies to XHTML Mobile, I'm actually referring to a subset of CSS known as WCSS (Wireless CSS), which is somewhat of a scaled-down CSS. In other words, WCSS is to XHTML Mobile what CSS is to XHTML. The great thing about XHTML Mobile is that it is no different than XHTML, except that it is more limited. So if you know XHTML, you already know XHTML Mobile. At worst, you'll just have to learn to live with a smaller set of tools because XHTML Mobile is a bit more limited than XHTML. Generally speaking, you'll find that XHTML Mobile can do just about anything markup-wise that you will want to do on a mobile web page. As an example of how XHTML Mobile can be used in the context of a wireless application, Listing 24.1 contains the code for a mobile movie description web page that you might view on your mobile phone when trying to decide whether to go see the movie King Kong. Listing 24.1. The XHTML Mobile King Kong Movie Page1: <?xml version="1.0" encoding="UTF-8"?> 2: 3: <html> 4: <head> 5: <link rel="stylesheet" type="text/css" href="movie.css" /> 6: </head> 7: 8: <body> 9: <h1 align="center">King Kong</h1> 10: <p>This remake of the 1933 classic follows an expedition to the 11: mysterious Skull Island, where a legend of a giant gorilla draws 12: explorers and filmmakers. The legend, however, is both real and 13: dangerous, living in a massive jungle that has protected him and 14: other prehistoric creatures for decades. Kong finds solace in a 15: beautiful woman (Naomi Watts), and is subdued enough to be captured 16: and brought back to New York. However, as the captors and the public 17: will learn, it takes a lot more shackles to hold back an animal of 18: such monstrous size.</p> 19: </body> 20: </html> This code is very similar to that of the XHTML web pages you've seen throughout the book. The first line declares the version of XML being used, and then a WCSS style sheet is associated with the page in line 5. The movie.css style sheet specifies colors and more exacting fonts for the King Kong movie content. The remainder of the document is fairly straightforward in terms of following normal XHTML syntax. For example, the body of the document consists of run-of-the-mill XHTML code with familiar <h1> and <p> tags. Listing 24.2 contains the code for the movie.css style sheet that is used to format the King Kong movie XHTML Mobile document. Listing 24.2. The WCSS Style Sheet for the King Kong Movie Page1: body { 2: background: #FFFFFF; 3: } 4: 5: h1 { 6: font-size: x-large; 7: color: #660000; 8: text-align: center; 9: text-decoration: underline; 10: } 11: 12: p { 13: display: block; 14: border: 1px #330000 solid; 15: background: #660000; 16: color: #FFFFFF; 17: text-align: left; 18: font-size: medium; 19: padding: 4px; 20: } Figure 24.2 shows the results of viewing the King Kong XHTML Mobile page in the Opera web browser's "small screen" view. Figure 24.2. XHTML Mobile allows you to create mobile web pages that can be viewed on devices such as mobile phones and handheld computers.The Opera web browser is unique in that it supports a "small screen" mode that allows you to simulate a much smaller screen within a desktop browser. You can activate small-screen mode by selecting Small Screen from the View menu in Opera. Opera's small-screen mode allows you to test XHTML Mobile pages without having to use a real mobile device. However, it is very important to eventually use a real mobile device to test your XHTML Mobile web pages.
XHTML Mobile is a technology that is relatively new but that will continue to rise in importance as more and more web browsing takes place on mobile devices. |