Welcome!

Coach Wei

Subscribe to Coach Wei: eMailAlertsEmail Alerts
Get Coach Wei via: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


Related Topics: RIA Developer's Journal, Enterprise Mashups, AJAX World RIA Conference

RIA & Ajax: Article

Real-World AJAX Book Preview: Some Classic Examples

What Is AJAX?

This content is reprinted from Real-World AJAX: Secrets of the Masters published by SYS-CON Books. To order the entire book now along with companion DVDs for the special pre-order price, click here for more information. Aimed at everyone from enterprise developers to self-taught scripters, Real-World AJAX: Secrets of the Masters is the perfect book for anyone who wants to start developing AJAX applications.

Real-World AJAX: Some Classic Examples
Ever since the term AJAX was coined, the concept has spread like wildfire in developer communities. Lots of applications have been developed using AJAX. In fact, a lot of applications were developed using AJAX long before AJAX came into existence. In this section, we will go over some AJAX application examples to give the reader some sense of what AJAX is capable of and what applications have been built using it.

AJAX Chat Applications
Chat applications represent an excellent AJAX experience not possible with the classic Web model. Chat requires asynchronous communication and cannot afford a “full-page refresh,” which is one of the reasons so many chat/IM applications have showed up since AJAX became popular.

Gabbly: Live Chat for Any Web Site
Gabbly is a new application that embeds a chat window in any Web page. The user sees the target Web site the way it is except for the added chat window. From the chat window, you can have a real-time chat with other users.

Gabbly uses IFrame to display the target Web site. Then in a separate IFrame, it displays the chat window. The chat window uses an XmlHttpRequest object to communicate chat messages with the server asynchronously. Figure 1.19 shows how Gabbly works with CNN.com.

Gabbly is a great Web 2.0 application that can add significant value to various Web sites. For instance, it could let all CNN.com readers interact with each other in real-time. Such real-time interaction between random Web visitors changes the Web from a static passive medium into an interactive social environment.

AJAX IM: The AJAX Instant Messenger

AJAX IM is an AJAX instant messaging client. It has a clean rich interface with multiple windows that feels like a normal desktop application.

AJAX+PHP CSS Popup Chat
AJAX+PHP CSS Popup Chat is another AJAX chat application that implements one-to-one chat using popup windows. It is written in PHP and MySQL and is free to be downloaded under the GPL license.

Meebo: Connecting All Popular IM Systems
Meebo is a Web-based instant messaging service that connects with all the major IM systems such as AOL, Yahoo, and MSN. A user can log in using his or her account from any of these IM systems, retrieve the buddy list, and chat with them.

Twelve weeks after its launch, Meebo had 236,000 successful logins, 6,534,948 messages sent, and approximately 13,069,896 total messages carried. By the end of 2005, Meebo averaged about 250,000 logins a day.

AJAX Office Applications
Office applications are another category of Web applications that were not possible before AJAX (AJAX being defined in the broad sense as DHTML and JavaScript). There are word processors, spreadsheets, slide shows, and so on.

AJAX Word Processors: Writely and AJAXWord
Writely (http://www.writely.com) is an AJAX-based word processor that Google recently acquired. Writely offers online document editing from a browser, sharing documents instantly with authorized users, collaborating with people, and storing documents securely online.

AJAXWord (http://www.AJAXword.com) is an open source word processor mimicking Microsoft Word’s look-and-feel, but written using JavaScript and DHTML. It features dedicated server-side file storage for each user, who uses a familiar file dialog to open or save files. When creating a new file, the user is prompted to select from a list of templates. Unlike other Web-based word processors, AJAXWord features a multiple windows interface (MDI) that enables a user to work on multiple documents at the same time.

AJAX Spreadsheet: NumSum
Numsum (http://numsum.com/) is a Web-based spreadsheet powered by DHTML and JavaScript for team collaboration and data sharing. It can work offline if it’s saved as a “Web page” on the local disk. You can create spreadsheets on-the-fly and name them if you want to keep and share them for a while, or just use one and move on.

Mashups
A mashup is a Web application that delivers an integrated experience by seamlessly assembling content from more than one source and displaying it in a unified user interface.

Mashup technology sounds like traditional “application integration.” Application integration developers have been assembling data from multiple sources and presenting it in one integrated application for years. The main difference between mashups and traditional application integration is where the “integration” takes place. Traditional application integration integrates data on the server side (“back-end integration”), which typically requires server-side programming skills (Java, C++, etc.) and access to enterprise server-side resources. Mashups typically do the integration at the browser layer without touching the server side at all (“front-end integration”), which only requires JavaScript and HTML coding skills, and data access is readily available from eBay, Amazon, Google, etc., via the public Internet. (http://www.programmableWeb.com/ lists close to 200 public APIs as of April 2006.)

AJAX (JavaScript and DHTML) is a major reason why mashups are so popular. Without the popularity and support of AJAX, it would have been difficult, if not impossible, to “integrate” data from multiple Web sites at the browser layer.

As blogs have revolutionized online publishing, mashups are revolutionizing Web development by letting anyone combine existing data from sources like eBay, Amazon, Google, Windows Live, and Yahoo in innovative ways. The greater availability of simple and lightweight APIs has made mashups relatively easy to design. They require minimal technical knowledge and, therefore, custom mashups are sometimes created by unlikely innovators, combining public data in new and creative ways. Today there are many mashups available on the Web. The http://www.programmableWeb. com/ site has tracked over 600 mashups as of April 2006, though a lot of them are simply “cute” and have no real value. The interesting trend to watch is what mashups will mean to the enterprise. Will they spur a “new” way of integrating enterprise applications? Will enterprises think of a “new” approach to “service orientation,” and, for example, make data available not only through SOAP but also though REST?

Mashup Example: HousingMaps
Almost as soon as Google published Google Maps, programmers started building mashup services on top of its infrastructure. HousingMaps (http://www.housingmaps.com) is one of the earliest and best known.

HousingMaps is a site that pulls real estate listings off the popular classified ad site Craigslist (http://www.craigslist.org), uses the addresses of the homes and apartments listed in a given neighborhood to figure out their latitudes and longitudes, and lets users view the properties on a Google map. Each listing is shown as a pushpin, and with a click on the pushpin a small window pops up with the price and sometimes a thumbnail image of the property. A list of the visible properties runs down the side of the screen, each linked to the original Craigslist posting. And because the results are filtered into price categories, users can easily steer clear of high-rent districts. HousingMaps has no affiliation with Craigslist or Google, but accesses both sites via public APIs.

Summary
AJAX has enabled a lot of interesting applications. We have talked here about traditional office productivity programs such as word processors and chat/IM. What is important but was not cited here are AJAX applications in an enterprise environment. There are many companies that are actively using AJAX for their business applications, dramatically enhancing the user experience and productivity.

AJAX also enables a new kind of application, so-called mashups that open up new possibilities of how applications can be built and how Web applications can be consumed. Combing data from multiple Web sites, mashups bring the user significant additional value. In the enterprise, mashups and the traditional integration approach go together as two complementary ways of enterprise integration.

This content is reprinted from Real-World AJAX: Secrets of the Masters published by SYS-CON Books. To order the entire book now along with companion DVDs, click here to order.

More Stories By Coach Wei

Coach Wei is founder and CEO of Yottaa, a web performance optimization company. He is also founder and Chairman of Nexaweb, an enterprise application modernization software company. Coding, running, magic, robot, big data, speed...are among his favorite list of things (not necessarily in that order. His coding capability is really at PowerPoint level right now). Caffeine, doing something entrepreneurial and getting out of sleeping are three reasons that he gets up in the morning and gets really excited.

More Stories By Rob Gonda

Rob Gonda is an industry visionary and thought leader, speaks on emerging technologies conferences nationwide, and combines unique approaches to technology and marketing strategies. As a head of Creative Technologies at Sapient, Gonda is an interactive technical “guru,” who provides the knowledge and experience required to run high-level, multi-channel interactive campaigns that reach millions of consumers. Gonda has more than 15 years of experience in web development and 360 marketing campaigns for clients such as Coca-Cola, Adobe, Guinness, Toyota, Taco Bell, NBC, and others. His areas of specialty include emerging technologies, marketing strategy, social media, digital out-of-home, mobile, behavioral targeting, and multi-channel synergy. Before joining the strategy and technology leadership teams at Sapient, Gonda was co-founder and chief technical officer at iChameleon, a Hollywood FL-based agency renown for its emerging experiences and creative technology. In addition to his agency work, Gonda the chair for the digital media council at the Advertising Research Foundation, is the former editor-in-chief of the AJAX Developer’s Journal, co-author of “Real-World AJAX: Secrets of the Masters”, a passionate blogger who authors www.takemetoyourleader.com, and contributors to various publications such as Ad Age and Ad Week. He is a frequent figure on the speaker circuit, having presented at conferences from the senate’s CIO emerging technology to SXSW and Omma. Rob’s mission is to develop forward-thinking expertise that will ensure clients are always on par with rapidly changing technologies and maintain its ethos of evolving. You can reach him at rob[at]robgonda[dot]com and read his blog is at http://takemetoyourleader.com

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.