By Peter Bell

The Future of ColdFusion? Beyond Java!

For anyone interested in the future of ColdFusion (or the future of web development languages in general) I can't think of a better read than Bruce Tate’s Beyond Java which has kept me enthralled for the last couple of hours . . .

At 179 pages it is a relatively quick read, but it provides an excellent perspective on how Java succeeded, the problems it solved and the problems that it now faces for “small quick web development” work.

The book is opinionated and it is clear that Tate has a bit of an agenda (Java development = slow, Ruby = cool), but whatever your thoughts on Ruby, it is a well reasoned summary of the issues facing Java and trends in language design for creating mid sized web applications more productively.

Approachability One of the most useful terms coined in the book is approachability – a measure of the steepness of the learning curve to become productive in a language. Tate argues convincingly that Java is rapidly becoming unapproachable for web application development. The language itself is fairly easy to learn, but by the time you’ve added the libraries, learnt enough about Spring to wire your components, Tapestry/Structs/SpringMVC to handle the application framework, Hibernate to implement ORM and Ant to write the build scripts, you’re talking about a heck of a learning curve (I’m ignoring JUnit only because you need unit tests in any language).

Approachability is a relative term. One of the big benefits of ColdFusion is that anyone can learn to write a simple web based application in just a few hours. And anyone who has looked at Ruby and Rails will realize that if Tate finds them approachable he is not exactly targeting ColdFusion’s core original audience - which included plenty of “enthusiastic scripters” who didn’t have a formal background in software engineering or OO design.

However at a different level ColdFusion is dealing with exactly the same problem. Web applications are fundamentally more complicated than they used to be. This means design patterns and object oriented programming are often required to keep the applications maintainable. Unfortunately for a “scripter”, such techniques are extremely unapproachable which I believe has led to much of the talk about “the ColdFusion skill divide” a few weeks back.

XML configs, AOP and DI Unnecessary? In the book, Tate suggests that XML configuration files, Dependency Injection and Aspect Oriented Programming are as popular in Java as they are at least in part due to specific limitations in Java (a lack of good language tools for handling data in the case of XML configuration files and the lack of support for mixins and functions as first class citizens in the case of AOP and DI). I personally still see a place for AOP and DI as useful conceptual tools for consistently managing classes of complexity, but I agree with his assessment that they can be implemented much more simply when approached from a dynamic language perspective. For example, LightWire - my DI framework - implements dependency injection in under 300 lines of ColdFusion code.

Killer Apps Tate then goes on to discuss Rails (Ruby) and Seaside (Smalltalk). I’m not a big fan of Rails as I don’t believe the future of object-oriented programming is in returning to table oriented design. Rails gives up too much of the power of OO programming for scaffolding that needs to be rewritten to be of use in production.

Seaside is much more interesting and I’ll be posting much more on stateful web interactions as I continue to play with Spring Web Flow and Seaside and to develop my own approach to stateful web controllers.

Conclusions I still feel there is a fundamental problem that nobody has cracked. Web applications are still too complex to build. Sure you can hack something together in PHP or ColdFusion that works, but maintaining such applications as they grow is a nightmare. Alternatives like Python and Ruby require OO skills that many developers simply don’t have, and statically types languages like Java and C# simply aren’t productive enough for most mid-sized web applications.

For now I think ColdFusion needs to continue to focus on integration (such as Scorpio .net integration) to act as “glue” and simple to use tags (to continue to be more RAD than the competition), but I still feel there is an undiscovered solution out there in simplifying not web scripting, but website engineering. Expect to hear much more about this over the next couple of months!

Any thoughts?

Comments
Isn't there a fundamental difference between RoR and J2EE in that RoR is very good at creating simple to mid-range web applications where as J2EE (as the name already implies) covers a complete enterprise environment. I really don't understand how RoR and J2EE can be compared in that respect.

J2EE is much more then a framework and a programming language. Comparing Java (the programming language) and Ruby (the programming language) isn't that a completely different thing?
# Posted By pan69 | 11/21/06 1:24 AM
I was talking about something similar to this only last week:
http://www.feed-squirrel.com/blog/index.cfm/2006/1...

I totally agree that I believe Java/C# etc are way to complicated for 99% of web development. Unfortunately, I also think CF needs to improve in order to compete with frameworks such as rails.
# Posted By Neil Middleton | 11/21/06 6:21 AM
Personally (and I speak from ignorance here) but I don't see anything that requires manual compiling by the programmer to become hugely popular by large firms and small time firms alike. The beauty of CF is that you just install the server and start programming and the code compiles when you call it. Things like Java and C# and RoR are cool and might be very fast, but the second there is an intermediary step between the writing of the code and getting it to actually run, I think there are TONS of people out there that will lose patience with it and move onto something else (hopefully CF since it's totally sweeeeeet).
# Posted By Ben Nadel | 11/21/06 8:34 AM
@Pan69 - I agree that nothing is challenging J2EE in the enterprise space. My interest (and Tate's) is in the huge number of web apps that are a front end to a relational db. Many of those just don't need the power of Java and Tate argues that as Java continues to solve edge cases at the high end, it makes the stack too unapproachable for simpler development.

And of course, he is comparing "stack with stack" - RoR with Java + Spring + Hibernate. Not sure if it is the "right" stack comparison, but at least he isn't comparing language (Java) to framework (Rails).

@Neil - Yep. Read the article. Nice. I'm not sure whether it is CF that needs more work or community frameworks in CF, but there is no question that creating maintainable web applications is still too difficult.

@Ben - Well, hate to say you're on the wrong side of history here. Apart from Visual Basic, most successful production languages have required a compilation step - including C, C++, Java and C#. Also, in RoR, it is a truly interpreted (as opposed to Java and C# which are JIT interpreted/byte-code compiled which is a whole other thing) language, so you don't have to compile at all.
# Posted By Peter Bell | 11/21/06 9:57 AM
For me, the closest we have so far is Rails. It's so close it almost there, it just needs to be able to support more complex databases (although saying that, nothing is MAKING you use active record).

If CF was faster, and a lot cheaper to buy, I think it may be level pegging with Rails.
# Posted By Neil Middleton | 11/21/06 10:00 AM
As a pure language, Ruby is very clean and powerful. ColdFusion has more, useful tags and a more proven deployment history, Rails I don't love - I feel it is an evolutionary back end - we'll see. For now I'm happy with ColdFusion, although I admit that if everything was an object and metaprogramming was easier that'd be nice!
# Posted By Peter Bell | 11/21/06 10:12 AM
Pete,

I think perhaps it depends on "how" you define successful. Yes, huge, massive systems and windows programs are built on compiled programming languages. But is that successful? I wonder how many compiled programs there are out there vs. how many HTML pages that feature pictures of Jo-shmo's cat in a santa outfit type of things are out there?

And again, i dont know any numbers and I might very well be dead wrong... but I assume that there's got to be millions upon millions of pages out there that are the product of "Teach yourself HTML 4.0 in 24 hours" type books. These are not products of compiled languages... and I feel that if there was compiling involved there would be a much smaller number of web sites out there.

Again, this is just gut feeling, so I might very well be dead wrong. In that case, sorry :)
# Posted By Ben Nadel | 11/21/06 12:23 PM
Guess it depends how you define an application! I was excluding the picture of Jo-shmo's cat which perhaps was a little hasty of me :->

The problem is that when you want to start to create a site for managing collections of pictures of cats, and categorizing and searching them. And then you want roles based security and perhaps multi-tenant capabilities so different people can create different private labeled "cat picture management systems". As some point in this process, simple scripting becomes inadequate to handle the complexity, but the barriers to writing programs that are up to handling the complexity are still formidable for the average CF developer.
# Posted By Peter Bell | 11/21/06 12:48 PM
Ha ha, fair enough.

And again, I am relatively inexperienced here. I primarily use CF, HTML, CSS, JS. I love experimenting, love just throwing stuff together and seeing if it will stick. I would fool around with Java and C# (and have actually built a few small C# apps), but the problem is that there tends to be too much overhead involved with the "fooling around", that it just is not as fun.

But I will back down now as I just don't have the experience to really back up any arguments with what you might call "Facts" :)
# Posted By Ben Nadel | 11/21/06 12:56 PM
Well, why let facts get in the way of a good debate :->
# Posted By Peter Bell | 11/21/06 1:04 PM
In fact, after thinking about this again for a while, I think PHP is probably the closest to any sort of web developer nirvana at the moment. It's well proven in the enterprise, it's very fast and stable. It's well developed and has plenty of third party frameworks and tools available. But, above all, it's free.

If CF is to compete it needs to improve. A lot of time people bang on about converting people from PHP to CF - but the question is, why would they?
# Posted By Neil Middleton | 11/21/06 2:08 PM
Because of the tags. PHP also has all kinds of syntactic problems, is cobbled together, has dubious object support and isn't nearly as productive. The only people I know who've used PHP and CF prefer CF greatly.
# Posted By Peter Bell | 11/21/06 4:21 PM
Neil,

One guys opinion of PHP together with links to similar pages. Some are items I know about, some I don't have knowledge/opinion on.

http://www.bitstorm.org/edwin/en/php/
# Posted By Peter Bell | 11/21/06 4:55 PM
Peter -

NO! NO! NO! - I don't want web applications to be easier to build. I LOVE complex web applications! Complex web applications require smart, dedicated, skilled programmers who are worth all the money companies pay them to build/maintain complex web applications.

Stop trying to get my salary cut :)
# Posted By Bruce | 11/21/06 10:18 PM
BlogCFC was created by Raymond Camden. This blog is running version 5.005.