Appendix B. The Future of Web Development

<feature><title>In this appendix</title> </feature>

Changing Standards

Computer technologies are short-lived by nature. As soon as a technology starts maturing, it’s almost inevitably replaced by a new technology. Given that kind of environment, HTML’s longevity is quite amazing. In fact, HTML has been with us since 1990, and it wasn’t until 2000 that a new recommendation was proposed by the World Wide Web Consortium (W3C).

Note

Contrary to what you often hear from Web designers, the W3C does not issue standards. It proposes recommendations. Historically, this has been a thorn in the side of Web designers, but we’re now starting to see more browsers and design tools conform to the W3C’s recommendations. Because of that, the recommendations are beginning to morph into standards, and you’ll now hear many more people referring to the W3C recommendations as “standards.”

HTML has served us well for almost 20 years now, but as the Web has evolved, the complexity of Web sites has surpassed the ability of HTML to keep up. This has resulted in tweaks and tips that are necessary to cater to the different browsers available today. Plenty of people have made a career out of teaching Web designers how to make pages look the same on a large collection of browsers.

One organization that is focused on promoting Web standards is The Web Standards Project (WaSP.) WaSP takes a unique approach to promoting standards by forming task forces that work with software vendors and Web designers to help advance Web standards. WaSP has a task force that works directly with Microsoft on complying with Web standards, and some of the members of that task force are program managers at Microsoft. You can read more about WaSP at www.webstandards.org.

As HTML became more cumbersome, CSS was born in an attempt to alleviate some of the problems involved in formatting and positioning. CSS solved many problems, but it also brought many of the existing shortcomings of HTML to the forefront. Almost in parallel, XML was gaining ground as a means of describing data, and in 2000, the W3C came up with the idea of combining HTML with XML to form a new recommendation. The result was the XHTML 1.0 recommendation.

For more information on CSS, see Chapter 17, “Creating Style Sheets,” p. 293.

For more information on XHTML settings in Expression Web 2, see Chapter 15, “Configuring Page Editor Options,” p. 261.

Note

XHTML stands for Extensible Hypertext Markup Language.

Benefits of XHTML

One of the greatest benefits of XHTML (contrary to what you might think) is that it is much less forgiving of poorly formatted code. It also has many requirements that aren’t present in HTML. For example, when writing HTML code, it’s up to the Web designer whether the HTML tags are upper- or lowercase. XHTML, on the other hand, requires that all element (tag) names and attributes be lowercase.

The following are some other requirements of XHTML:

  • Nonempty elements must have a closing tag.

  • Attribute values must appear in quotes.

  • Elements must be nested in the proper order.

  • An attribute cannot appear without a value.

Tip

The complete XHTML recommendation can be found at the W3C Web site by browsing www.w3.org/TR/xhtml1/.

By enforcing formatting rules and requiring that all documents be well formed, XHTML improves cross-device rendering of code. No longer do Web browsers have to deal with handling nonstandardized code, and as the Web moves onto other devices (such as cell phones, personal digital assistants [PDAs], and so forth), the standards imposed by XHTML become even more valuable.

Emerging Technologies

As the Web evolves, new technologies are beginning to appear to make it a more productive arena for full-featured applications. Recent years have seen incredible growth in blogging, social networking, and robust applications delivered to users via a Web browser. Most people refer to this trend (or is it a trend?) as Web 2.0.

Ironically, as we develop newer technologies that allow for more bandwidth into your home, we also develop technologies to dramatically limit the amount of data flowing through those fat pipes. XMLHTTP used to be an inconspicuous technology used by very few. Today, it’s the cornerstone behind one of the biggest technology initiatives the Web has ever seen—Ajax.

Ajax

Many of the new Web-based applications available today make heavy use of Ajax. Have you ever visited Google’s news page (Figure B.1) at http://news.google.com? If you load that page and let it just sit in your browser without refreshing or navigating away from it, it will refresh news stories automatically. It does this without blanking out and seemingly without refreshing at all. Google uses Ajax to do that.

The Google news page uses Ajax to automatically update news stories at a preset interval.

Figure B.1. The Google news page uses Ajax to automatically update news stories at a preset interval.

At a preset interval, Google causes your browser to issue a request to their servers asking for an update. This request sends a very small amount of data. It gets back a response in XML. They then have some client-side JavaScript that takes the XML response and dynamically updates the page on-the-fly.

Microsoft’s Windows Live search page is another example of Ajax in action. When you do a search on Windows Live, the results are returned in a page that appears to scroll infinitely. Unlike other search engines, you don’t click links to move from page to page to view the search results. Instead, you scroll down the page until you reach the bottom of the results.

Note

Another example of an Ajax-enabled Web site is the Microsoft Expression forums site located at http://forums.expression.microsoft.com.

Imagine how many hits might be returned if you query on, for example, Ajax. You’d get millions of results. Now imagine if Microsoft made you wait for all those results to download to your computer before you were able to browse any of them. You’d be waiting for many minutes before you’d be able to do anything.

Obviously, you don’t have to wait for all the results to be returned. Microsoft uses Ajax to return only those results that are immediately visible. As you scroll down the page, the browser requests small bits of additional search results, which are then displayed on the page. As you use Windows Live, you have no idea that the browser is requesting additional data.

Using Ajax on Your Site

Ajax isn’t a technology just for large Web sites. There are plenty of uses for this technology in your Web site too. Suppose you have a Web site that offers a picture viewer for users to view your photographs. You want to allow users to click a thumbnail and view a larger image. Ajax is the perfect solution for this because it allows you to request the larger image only when the user needs it. Sure, you could implement the same thing using regular hyperlinks, but the user would see the page go blank when he or she clicked the link and then refresh with the larger image. Ajax provides a much neater user interface and reduces the amount of data required over the Internet.

As you learned in Chapter 34, forms are another great opportunity for using Ajax. You can create forms that dynamically change based on selections or data entered in certain form fields. Imagine a series of drop-down boxes where each subsequent drop-down is populated based on a selection in the previous one. Ajax is the perfect solution for such a scenario.

Using XML used to require a lot of expertise and a lot of code. As Ajax has gained ground as an emerging technology, options for creating dynamic, Ajax-enabled Web sites have grown exponentially, and ASP.NET Ajax offers many new controls for ASP.NET that allow you take advantage of Ajax without writing any code.

Ruby on Rails

For those of you on the other side of the coin (in other words, those who are more into technologies such as PHP, MySQL, SQLite, and so on), don’t feel left out. Ruby on Rails is a powerful and rich framework that supports all those technologies and more. In fact, Ruby on Rails can be given credit for the widespread growth of Web 2.0.

Note

Ruby on Rails can be downloaded free from www.rubyonrails.org.

Ruby on Rails is actually a framework for building applications using Ruby, an object-oriented language similar to Perl. Ruby on Rails is acclaimed for changing the paradigm for developing Web applications. Instead of spending months developing the back end and then pasting a user interface onto it, Ruby on Rails encourages the development of a user interface first and then plugging a back end into it.

Ruby on Rails was developed by a company called 37signals. 37signals was building Web-based applications using Ruby, but they wanted the ability to share components in one application with other applications. Unable to find a suitable solution, they developed their own framework and dubbed it Ruby on Rails. The beauty of this approach can be experienced first-hand in Basecamp (their first and most well-known application), Campfire, and other applications they’ve created using Ruby on Rails.

Basecamp is a tool designed to aid in project planning and collaboration. If you’ve ever used Microsoft Project, you have a pretty good feel for what Basecamp does. However, Basecamp is entirely different in that it isn’t a Windows application. Instead, it is entirely Web-based. The only system requirements for using Basecamp are an Internet connection and a Web browser. Basecamp uses AJAX and Ruby on Rails to implement all its functionality.

Campfire is a really cool business chat tool. Like Basecamp, Campfire is accessed using a Web browser. It allows you to set up chat rooms with powerful capabilities, and any chats that take place are saved so that you can review them (and also any files that were uploaded during the chat) later.

Both Basecamp and Campfire illustrate the power and diversity of Ruby on Rails, and because Ruby on Rails isn’t tied to one particular operating system or technology, it is rapidly becoming one of the most popular technologies on the Web.

Note

37signals can be found on the Web at www.37signals.com.

Other Emerging Technologies

I’ve touched on two of the most talked-about technologies, but there are many others that are growing rapidly. It’s an exciting time to be a Web designer. Not only are we seeing new technologies, but we’re seeing the emergence of mainstream Web design applications (such as Expression Web 2) that are adhering to standards, making it much easier to mix many different technologies into a site without your design tool hijacking your efforts.

In my opinion, what we’re witnessing is a widespread shift in thinking. If someone said five years ago that Microsoft would develop a Web design application focused entirely on creating standards-based Web sites, they’d have been laughed out of most tech circles. Today, just such an application is a reality and we’re all better off for it.

Lagniappe (lan yap’) n., a gift or bonus: Understanding and Using RSS

The changes we’re seeing on the Web today aren’t just affecting people with computers. Anyone who keeps up with the daily news cycle knows how much of a powerful media force bloggers have become. In fact, bloggers have actually broken some big news stories in the past year or so.

What are bloggers? Bloggers are people who run Web logs, commonly referred to as blogs. There are blogs on just about every topic imaginable, and most of them are updated often. However, because of the informal nature of blogs, they are often not updated on a regular schedule. Fortunately, most blogs allow you to subscribe to them so you can be notified when a new posting is available.

A blog subscription isn’t what you might think. Most people think of subscriptions in terms of mailing lists and the like, where you receive an e-mail indicating an update is available. A blog subscription is usually provided by a technology known as Really Simple Syndication, or RSS.

Tip

RSS isn’t just for blogs. You can create an RSS feed for anything you’d like. In fact, one of the most popular uses for RSS these days is in the distribution of podcasts.

RSS consists of two pieces:

  • RSS feed—The RSS feed is an XML file that describes the information being presented and provides a link to the content.

  • RSS reader—The RSS reader reads the RSS feed and presents it in a usable format. There are many applications and Web sites available that will do this for you (called RSS aggregators), but you can also write your own code to do it because an RSS feed is an XML file with a standardized format.

The RSS Feed

As mentioned previously, the RSS feed is an XML file describing the RSS content. Think of the RSS feed as a database of the content you want to make available.

The code in Listing B.1 is a basic RSS feed for Jimco Software’s FrontPage add-ins.

Example B.1. A Basic RSS Feed

<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <!--
    RSS feed for Jimco Software add-ins.
  //-->
  <channel>
    <title>Jimco Software Add-ins</title>
    <link>http://www.jimcosoftware.com/addins.aspx</link>
    <description>Add-ins for Microsoft FrontPage and Expression Web 2 </description>
    <lastBuildDate>15 Jan 2008 11:37:00 GMT</lastBuildDate>
    <language>en-us</language>

    <item>
      <title>Spawn 2.0</title>
      <link>http://www.jimcosoftware.com/addins.aspx?addin=Spawn</link>
      <guid>http://www.jimcosoftware.com/addins.aspx?addin=Spawn</guid>
      <pubDate>1 May 2007 10:30:00 GMT</pubDate>
      <description>Easily create JavaScript pop-up windows.</description>
    </item>
    <item>
      <title>RSS Feeder</title>
      <link>http://www.jimcosoftware.com/addins.aspx?addin=RSSF</link>
      <guid>http://www.jimcosoftware.com/addins.aspx?addin=RSSF</guid>
      <pubDate>3 Feb 2008 14:22:00 GMT</pubDate>
      <description>Create RSS feeds for your content in a flash.</description>
    </item>

  </channel>

</rss>

The top-most tag is the <rss> tag indicating the version of RSS being used. There are many versions of RSS, but the recommended version is 2.0 because it will be recognized by all the RSS aggregators.

The next tag is the <channel> tag. This tag contains the content for the RSS feed itself. Enclosed within the <channel> tag are one or more <item> tags that describe a particular news item..

Tip

It’s a good idea to always validate your RSS feed before you start using it. The best way to do that is by using a feed validator such as FEED Validator, located at http://feedvalidator.org.

The RSS Reader

After your RSS feed is ready to go, you can submit it to an RSS aggregator, which will allow other people to subscribe to it. There are many online aggregators, but there are also applications that run on Windows as well. For example, RSS Bandit is a good free RSS reader (www.rssbandit.org), and NewsGator’s FeedDemon (www.newsgator.com) is widely considered the best RSS reader available, but you’ll pay a nominal price for it. If you’d prefer to not pay for it, you can use NewsGator’s online RSS aggregator at no charge.

Internet Explorer 7 also comes with the ability to subscribe to RSS feeds. Figure B.2 shows the RSS feed from Listing B.1 displayed in Internet Explorer.

Internet Explorer 7 can read and subscribe to RSS feeds. If you use Outlook 2007, you can also view your RSS feeds from Internet Explorer right in your inbox.

Figure B.2. Internet Explorer 7 can read and subscribe to RSS feeds. If you use Outlook 2007, you can also view your RSS feeds from Internet Explorer right in your inbox.

Notice that Internet Explorer has applied formatting to the RSS feed. Formatting is the job of the subscriber to the RSS feed. You don’t include any formatting elements at all in the feed itself. The only job of the feed is to describe the information.

As you can see, it’s incredibly simple to set up an RSS feed for your own content, and it’s a great way to bring people to your site.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.58.39.23