|
While we covered some of the basic motivations behind the
Macromedia MX architecture, ColdFusion MX in particular,
and talked about the basic approach used in Pet Market,
it's also useful to step back and compare ColdFusion MX
to other server platforms.
ColdFusion = Easy
Being remarkably easy to learn and use has been part
of the essence of ColdFusion since 1995. This comes from
a mixture of syntax, developer-oriented features such as
fantastic debugging tools, and built-in capabilities.
With ColdFusion MX, developers get the legendary ease of
use of ColdFusion, but with the power and scalability of
J2EE under the hood. In fact, I would not hesitate to say
that ColdFusion MX is now the fastest way to build and deploy
J2EE applications.
For the Pet Market team, this translated to an incredibly
rapid prototyping phase. In fact, it took the Pet Market
team less than two weeks to complete the entire back-end,
enabling them to focus more time on the front-end and the
exceptional user experience provided. Interestingly, the
team building the application had never used ColdFusion
before.
ColdFusion MX is also easy because of the simplicity of
the CF scripting model, which combines tag-based and ECMAScript-style
scripting for rapid development. Both the Java Pet Store
and .NET Pet Shop require understanding system programming
languages such as Java and C#, a more complex set of system
APIs, and concepts such as inheritance and polymorphism.
Built-in services for database integration, among other
things, make CF easy to learn and use. ColdFusion is made
so simple and easy by encapsulating complex capabilities
- such as creating and managing connections to databases,
handling exceptions and transactions, scrolling database
cursors, etc. - in simple, declarative tags. In both .NET
and J2EE, these interactions are possible but require using
much more complicated APIs. Although these environments
can give developers some additional control, they are also
more complex and time consuming to work with.
ColdFusion = Cross Platform
Beyond simplicity and approachability, ColdFusion MX
also provides one of the most cross-platform server-side
solutions available. The ColdFusion MX Pet Market application
code has been built to be portable across J2EE application
servers (though only on JRun today because ColdFusion MX
for J2EE editions have not been released yet), operating
systems (Windows, Linux, UNIX), and database platforms.
This broad platform support also means that it's easy for
developers to prototype and develop on one platform (say,
a local machine with Windows and Access), and transparently
deploy to Solaris and Oracle.
Both the Java Pet Store and .NET Pet Shop have platform
dependencies. The .NET Pet Shop is tied exclusively to Windows
servers and to SQL Server because it uses SQL Server stored
procedures. The Java Pet Store relies on Container Management
Persistence (CMP, a feature since EJB 1.1). CMP is still
not reliably and consistently available across J2EE platforms,
though that is expected to change with J2EE 1.3 implementations.
ColdFusion = Easy Integration with Rich Clients
Obviously, because of the tight integration provided
by the Macromedia MX technology, ColdFusion MX easily connects
with the Macromedia Flash Player for delivering logic and
data to rich client applications.
The built-in Macromedia Flash Remoting service in ColdFusion
MX allows developers to easily and transparently send any
type of data back and forth between the Macromedia Flash
Player and ColdFusion, as well as providing the services-based
programming model needed for a clear separation between
presentation and business logic.
In addition, ColdFusion MX introduced server-side ActionScript,
providing an additional language for creating back-end services
that can be used by Macromedia Flash clients. Server-Side
ActionScript, or ASR files, use the same language as client-side
ActionScript - both are based on the ECMAScript-262 standard.
However, ASR files have access to built-in features in ColdFusion,
such as database programming APIs, and can also be used
from Macromedia Flash Remoting.
In Pet Market, we implemented a back-end service (CreditCardServices.asr)
to show how this can be used to offload client-side processing
to the server. This service provides a collection of functions
for validating credit cards.
Overall, the tight integration between Macromedia Flash
and ColdFusion through Flash Remoting, CFCs, and ASRs demonstrates
our commitment to providing a complete development platform
for Rich Internet Applications. Most importantly, the overall
MX approach makes this technology approachable to the widest-possible
range of developers by focusing on scripting-languages and
ease of development, while still retaining a strong architecture
with scalable, deployment options.
ColdFusion MX Built-In Services
In a real-world setting, we would expect that an application
would probably need to do more than the Pet Market blueprint
application provides. In this context, you'll quickly learn
that ColdFusion MX includes a huge range of built-in services
to help accelerate development of Rich Internet Applications;
services that are not natively available as part of basic
.NET and J2EE environments.
In a real-world Pet Market, there would probably be a need
for more robust search tools, including searching across
product descriptions, customer reviews, and articles about
pets. To do this, one could use the built in Verity K2 full-text
search and indexing engine in ColdFusion MX. This would
provide a scalable, cross-platform, high-performance search
engine for site users without having to purchase additional
software or services.
Most e-commerce applications also include a range of reporting
tools for business owners and marketing managers. In fact,
analysts believe that database reporting is one of the most
common web application categories, and is certainly one
of the most popular uses of ColdFusion. Included with ColdFusion
MX is a powerful dynamic charting and graphing engine that
can create beautiful dynamic charts easily. The charting
engine - accessed through the CFCHART tag - can dynamically
generate up to 18 different styles of graphs, in multiple
formats, including Macromedia Flash, JPG, and PNG. Server
charting packages for .NET and J2EE can cost upwards of
thousands of dollars, but are included for free in ColdFusion
MX.
Another common feature would be tools to communicate with
customers using email or other means. ColdFusion MX includes
a set of built-in email services for dynamically creating
and sending HTML and plaintext emails. While J2EE and .NET
include APIs for email messaging, they are more complex
to use than the basic CFMAIL tag in ColdFusion.
Finally, most e-commerce applications require a high-degree
of back-end integration. While both J2EE and .NET provide
extensibility APIs for working with back-end systems, ColdFusion
MX is unique in its openness to back-end APIs, including
adaptors for working with COM objects, CORBA objects, EJBs,
plain old Java objects, SOAP web services, and any XML data
source through HTTP. Developers can know that no matter
the project, they'll always have the relevant integration
APIs at their disposal.
|