It’s
been a while since I wrote any ColdFusion-related articles for TechRepublic. We thought it
was time to remedy that, because really exciting things are afoot in the CF
world. In my opinion, it’s never been a better time to be a ColdFusion
developer. This article is meant to be an overview of what’s been going on, and
what’s coming up. Future articles will go into each of these topics (and others
of course!) in depth.

Under new management

One of
the biggest mergers in the software world was finalized late last year:
Macromedia merged with Adobe to create the world’s 5th largest
software company. As a result, ColdFusion also became an Adobe product.

To be
honest, for a good part of the last year it seemed like the CF world was sort
of in limbo. Don’t get me wrong, people were still using ColdFusion to build
great apps quickly, just like they always have. ColdFusion MX 7 was a brilliant
release that gave developers many new features. But everyone was silently (and
not so silently) wondering what the merger would mean for CF developers and the
future of ColdFusion.

Now
that the dust on the merger has settled, it is clear that Adobe sees ColdFusion
as a key product in its software offerings. They will take the great work that
Macromedia has done and go even further, making ColdFusion an even more
compelling application server option. ColdFusion isn’t going anywhere but to
greater heights. ColdFusion MX 8 is already well under development, and I
expect it will provide tight integration with Adobe products like PDF and LiveCycle, in addition to many other enhancements.

To put
its money where its mouth is, Adobe even built their new Web site with
ColdFusion. That’s right, the new Adobe.com, which brings together the existing Adobe site
with the previous Macromedia site, is running completely on ColdFusion.

AJAX + CF

Whether
you think AJAX is the greatest thing since sliced bread, or is nothing but a
hype wave over technology that’s been around for years, it is impossible to
ignore. AJAX is here to stay, and using AJAX with ColdFusion is incredibly
easy.

ColdFusion
Components (CFCs) can be invoked remotely as Web services, Flash remoting components, or directly via a URL. When invoked
directly, any data returned from the component is automatically converted into
the WDDX XML format. With some simple client-side JavaScript WDDX conversion
methods (freely available), using CFCs to respond to AJAX requests is simple.

If you
need a more robust solution, the AjaxCFC from Rob Gonda is very powerful and easy to use. This is an
abstract component that the developer can extend to create their own
AJAX-enabled components or façades. This is a very full-featured component that
provides error handling, request states, and synchronous or asynchronous
capabilities. Using AjaxCFC to populate select boxes,
validate form fields, create “suggest-style” drop downs or generate
content on the page is all very easy to do.

Finally,
a breaking story is that Adobe has just released its own AJAX library called Spry. Stay
tuned to see where this goes, but I wouldn’t be surprised at all if something
like this found its way into the actual CF server.

Flex 2

The
Flex platform is Adobe’s push to allow for the creation of a new breed of Web
applications. Using Flash to create the user interface, Flex applications act
and look more like real desktop applications.

While
this might sound exactly like what AJAX is doing, it isn’t. Flex uses a simple
XML grammar to create an application and tie it to some back-end data service.
It does not suffer from the cross-browser display or behavior issues that AJAX,
DHTML and CSS do. It provides a unified set of UI components that can be fully
skinned and customized. This new application delivery platform is so compelling
that even Microsoft is trying to play catch-up with Vista’s Windows
Presentation Foundation. And the best part is that the Flex API and compiler
are going to be released for free.

What
does this have to do with ColdFusion? Well, while Flex applications can connect
to a range of back-end data through Web services, Adobe is positioning
ColdFusion to be the fastest and easiest way to feed data into your Flex apps.
Adobe has been incredibly open in the beta cycle of Flex 2.0, and has produced
some extremely compelling tools and example applications.

The FlexBuilder IDE contains some excellent ColdFusion
development tools, and allows you to literally build an entire Flex application
in minutes. If you have seen Ruby’s scaffolding in action, you will have an
idea of how rapidly you can use FlexBuilder to create
Flex apps and all the related ColdFusion server-side components. The impact
that Flex 2.0
is going to have, not just on ColdFusion development but on Web development as
a whole, is (in my humble opinion) going to be huge.

UI Controller Frameworks

As
ColdFusion has matured, so has the approach many developers use to build their
applications. Many developers have adopted the Model-View-Controller pattern
for structuring their applications. There are several frameworks available to
provide the controller functionality. The most popular three are Model-Glue,
Mach-II, and Fusebox.

Model-Glue and Mach-II are actually quite
similar. They are event-based implicit invocation frameworks. The frameworks
receive a user request via a URL or form post, broadcast messages to a set of
model components, and then render HTML views. Both frameworks require the
developer to have experience with object-oriented programming, as the model is
created using CFCs in an OO way.

Model-Glue
is at version 1.1.0, with work on version 2.0 already in the alpha stages.
Mach-II is also nearing version 1.1.0. Both of these are now stable frameworks
that work very well and, assuming you are familiar with OOP, provide a great
foundation to build HTML-based applications.

Fusebox
is the oldest and most popular of the “big three”. It allows for a
wider range of programming styles, as developers can code either procedurally
or in an OO fashion. This is great for developers who are trying to learn OO
but wan to adopt it gradually. The upcoming Fusebox 5
release is a ground-up rewrite of the framework files as CFCs, and introduces
more flexibility and full backwards compatibility with Fusebox
4.1 applications.

Acronym Soup: IOC and ORM

While
the three frameworks I just mentioned are specific to the controller portion of
an MVC app, the CF community hasn’t forgotten about the most important piece of
the MVC pie: the model. The model is the heart of an application, and is where
all processing and business logic take place. I think most developers would agree
that the model is where the fun stuff happens.

ColdSpring
is an Inversion of Control (IOC) container for ColdFusion applications. It
works in a very similar way to Java’s Spring framework.
The basic idea is this: the more complex and object-oriented your model
components become, the harder it is to manage the dependencies between them. ColdSpring offers an easy way to “wire together”
your CFCs.

Instead
of manually creating and injecting CFCs into other CFCs, or forcing one CFC to
concern itself with creating other dependent CFCs, ColdSpring
does this for you. Even better, if you wish it will cache a single instance of
the components in memory so that future calls to them are extremely fast (this
is known as the Singleton design pattern). And as a free bonus, ColdSpring also introduces a set of Aspect-Oriented
Programming (AOP) capabilities for your development pleasure.

Reactor
is a rapidly evolving effort to create an Object-Relational Mapping API for
ColdFusion applications. It is a challenging undertaking, but its usefulness
and power are already causing it to make big waves in the CF world. Reactor
reads database metadata and then automatically generates components that
abstract out interaction with the database and provide validation logic. The
components it creates follow several well-established design patterns such as
Active Record, Data Access Object, and Table Data Gateway. And perhaps its most
compelling feature is that it works with a vast range of databases, including
SQL Server, Oracle, MySQL, DB2, and Postgre. This
means that an application could switch from using SQL Server to Oracle in a
virtually transparent manner.

An Evolving Community

Perhaps
the most obvious reason for the ongoing ColdFusion renaissance is the developer
community itself. ColdFusion is so easy to use that a large number of people
without any formal software engineering background picked it up and started
using it. But now a heavy focus on best-practices and effective object-oriented
development is rapidly emerging.

As you
may have gathered from this article, CF developers are embracing OOP and
pattern-oriented development in droves. Large and active mailing lists
and forums like CFCDev and CF-Talk
are overflowing with topics like these. Dozens of developer blogs are heavily trafficked, and no fewer than three
regular podcasts are available. This is creating a
feedback loop, where the more the community learns, the more it shares, and the
more it shares, the more it learns.


Podcasts


In
June, 2006, the seventh annual CFUnited conference will take
place. Attendance this year is expected to surpass 1,100 people across 4 days
and 75 sessions. And earlier this year, the CFObjective
conference was held in Minneapolis.
While CFUnited is a more general-purpose conference, CFObjective focused exclusively on enterprise software
design and development.

Among the numerous open-source development efforts
underway is the CFEclipse project, which is building an excellent, and
free, ColdFusion IDE on the Eclipse platform. CFEclipse
is a true coders IDE, and it continues to be improved
on an almost nightly basis.

And finally, even the options for deploying CFML
code are expanding. New Atlanta recently released a product called BlueDragon.NET.
Where Adobe ColdFusion MX runs on top of the J2EE platform, BD.NET allows for
deploying CFML code on top of the Microsoft .NET platform. In an impressive
show of the power this provides, MySpace.com, one of the top three most
trafficked Web sites on the Internet, is running on BlueDragon.NET.

Alive and kicking

I hope
this quick rundown has demonstrated that ColdFusion is alive and kicking. In
fact, great things are happening more quickly than I’ve ever seen before (and I’ve
been using ColdFusion for over 10 years). Adobe is firmly behind CF, and the
community is rising to the challenge and continues to push the envelope on
best-practices and enterprise development. New approaches, from frameworks to
AJAX utilities to Flex user interfaces, keep emerging
on literally a weekly basis. Stay tuned here for upcoming articles that will
explore these topics in more detail. And if you haven’t given ColdFusion a look
lately, now might be the perfect time. Download the free developer edition and
see for yourself that it’s a great time to be a ColdFusion developer.