Web DevCenter
oreilly.comSafari Books Online.Conferences.
MySQL Conference and Expo April 14-17, 2008, Santa Clara, CA

Sponsored Developer Resources

Web Columns
Adobe GoLive
Essential JavaScript

Web Topics
All Articles
Scripting Languages

Atom 1.0 Feed RSS 1.0 Feed RSS 2.0 Feed

Learning Lab

A Pet Market with Flash

by Dean Wampler

Editor's Note: J2EE and .NET are big-time enterprise architectures competing for the attention of today's developers. Both camps have reference applications to demonstrate how their architectures work. The "standard" for evaluation is the sample pet store (a remnant from the dot-com heydays) that is used to compare apples to apples, or maybe more appropriately, Milk Bones to Milk Bones. Recently, a third pet store demonstrating Flash and ColdFusion capabilities has entered the scene. In this article Dean Wampler provides you with an overview to Macromedia's approach to enterprise architecture, Pet Market, plus plenty of links to continue the exploration on your own.

Online pet stores were among the most spectacular failures of the dot-com boom-and-bust cycle, but their spirit lives on in the form of dueling reference applications for the major enterprise architectures. The J2EE and .NET worlds recently squabbled over the relative merits of their platforms using "native" implementations of a sample Pet Store application. I analyzed the merits of some of the arguments in a recent article for ONJava.com called, Cat Fight in a Pet Store: J2EE versus .NET.

Macromedia has just announced its own "Pet Market" demonstration application using Macromedia Flash MX for the user interface and ColdFusion MX, or optionally .NET or J2EE, for the server back end. Should developers even care? I think there are reasons they should.

About Macromedia Flash and ColdFusion

Flash is "the de facto standard for animation and vector graphics, giving a platform-independent, low-bandwidth, cosmetically pleasing solution." (See Why Flash is Significant.) With the latest release, Macromedia Flash extends its capabilities to support even more expressive sites with enhancements for video, application components, and accessibility. Just as the Web has evolved into an interactive communications medium, Flash has also evolved to support interactive features and server connectivity.

As the article SWF Is Not Flash points out, there are really several components commonly lumped together under the "Flash" label: (A) The SWF vector graphics file format, (B) the application or plug-in that plays the SWF content, and (C) the authoring environment.

SWF is not an open standard, but Macromedia has made it publicly available. Similarly, while Macromedia provides most of the players used in the world, in the form of small, downloadable plug-ins, the public SWF specification has allowed third-party players to exist. Finally, the authoring tool and its project file format are proprietary to Macromedia. (Other tools that generate SWF use their own project file format.)

Another Macromedia technology, ColdFusion, was one of the first complete development and run-time environments for Web sites. It anticipated many of the ideas that are now commonplace, such as custom-tag libraries that provide convenient Web page access to back-end business-tier and database servers.

While ColdFusion is now a mature and full-featured product, it is not as broad a platform or as widely used as J2EE and .NET. Nor does it really try to be. In fact, the recently introduced ColdFusion MX is built on the J2EE 1.3 platform and includes the ability to run on top of most J2EE application servers. ColdFusion MX also integrates with Microsoft's COM and .NET technologies.

The Internet's UI Revolution

Related Reading

ActionScript: The Definitive Guide
Mastering Flash Programming
By Colin Moock

Remember the days before the Internet explosion? Graphical UI's were pretty mundane. They mostly stuck to the tried-and-true "WIMP" metaphor (Window, Icon, Menu, Pointing device) pioneered in the late 1970s by Xerox PARC, popularized by the Macintosh, and imitated by everyone else. Then came the Internet's "Cambrian Explosion".

The real Cambrian Explosion occurred 500-540 million years ago (even before my time). The variety of life exploded, with new and bizarre forms never before seen on Earth. Nature was experimenting. Most of those forms died out, but the tried-and-true survivors became the foundation of all life today. Similarly, the Internet boom was one giant experiment in new ideas; new UI techniques, new ways of communicating, and new delusional business models.

Most of the UI ideas were clearly bad and didn't last. The best ideas included departures from WIMP constraints, primarily the introduction of vibrant, live interfaces that take full advantage of multimedia technologies. I use the word live to mean appropriate, but restrained uses of animation effects that teach and guide the user in ways that resemble how the world around us is "live". Nothing happens instantaneously in the real world. Why should our user interfaces be any different?

Flash is one of the best technologies to emerge from the Internet era, because the SWF file format provides the features necessary to enable engaging interfaces. Yet SWF files are compact and efficient enough to work well within the bandwidth constraints of the Internet. Plus, Macromedia's authoring tools have always made it relatively easy to create engaging interfaces. As a result, Flash has become extremely popular with designers, who have used it to create award-winning animations for entertainment, games, ads, training, and business-to-consumer Web sites. (Of course, bad designers have also used Flash to create annoying "intro" animations.)

Macromedia uses the term Rich Internet Applications to refer to client-server systems with sophisticated and engaging user interfaces. These systems span the range from entertainment to business applications. Business applications have been slower to adopt technologies like Flash, but I expect this pattern to change as more of them improve their user interfaces in order to enhance the user experience, thereby improving their competitive advantage.

Why Flash Succeeds

Flash wasn't the only multimedia technology to emerge during the Internet boom, but it has many qualities that put it on top of the pile.

Flash Is Ubiquitous

Surveys indicate that over 95 percent of all deployed browsers have a Flash Player plug-in, of one version or another. Therefore, Flash is sufficiently ubiquitous that Web designers know that most of their site's visitors will be able to view Flash content.

Flash Is Extremely Lightweight

Even users without a recent Flash Player plug-in can download a small player quickly over almost any bandwidth connection. Furthermore, when the Player runs, its resource requirements are modest.

Flash Is What Applets Should Have Been

The first major technology for nontrivial, interactive Web interfaces was, of course, Java. However, Java Applets never really caught on for several reasons:

  • The Java Plug-in Was Too Heavy -- While early browsers bundled the Java plug-in, the rapid evolution of Java quickly made those plug-ins obsolete. Newer plug-ins could be downloaded and installed, but their size became a barrier to use, especially for users behind low-bandwidth connections. Macromedia has always kept the Flash player very lightweight.

  • Java Was Different on Different Platforms -- While Java promised "write once, run anywhere", developers had to support different JDK versions and they discovered that even the same JDK version behaved differently on different platforms. Flash behaves consistently across platforms. Differences between versions are manageable.

  • Java Was a WIMP -- Java's windowing toolkit was still in the WIMP paradigm and didn't provide radically better capabilities for most needs, compared with the facilities provided by HTML and later, DHTML. Flash embraced and propelled the new, more media-rich interface ideas.

  • Flash Provides an Excellent Authoring Tool -- Flash also became popular because Macromedia's authoring tool was easy to use. Designers could create animations in the SWF format without having to know arcane technology, such as a programming language. The rich SWF format combined with a capable authoring tool led the design community to select Flash more often than the alternatives, thereby making it a de facto industry standard. The authoring tool and the SWF format have also evolved to keep up with the demands for new capabilities, such as those required for Rich Internet Applications, as discussed previously.

  • Flash Recently Enhanced "Good Citizen" Features -- Finally, while usability mavens have criticized Flash animations in the past for breaking some of the usability metaphors of the web, Macromedia has addressed all those concerns. Today, the Flash authoring tool lets authors tag points in the animation for the browser's history list (i.e., the "Back" button). Authors can also insert URLs to support indexing and search engines. Flash now provides support for Accessibility. Finally, SWF players are now appearing on PDAs, cell phones, interactive TV platforms, etc.

Pages: 1, 2

Next Pagearrow