views:

111

answers:

2

Can anyone expound on disadvantages, if there are any, to using a ColdFusion development framework? I'm developing an application traditionally, and I'm tempted to use a framework having seen how simple some things can be done. But does it not come with a performance tax? I'm new to ColdFusion and frameworks in general, and I'm trying to understand if they have any performance disadvantages relative to using "traditional" development methodology.

+7  A: 

Disadvantages:

  • learning curve (pick a lean framework to reduce this)
  • front controller makes ugly URL, often needs URL rewrite on web server layer
  • risk of framework being discontinued (no support, hard to maintain, break on new CF ver)
  • framework bugs (pick a popular framework with good & fast support)
  • harder to debug sometimes, since actions are generally not a .cfm anymore. Tip: make use of cfdump and cfabort to see the dump in the controller layer
  • some frameworks takes longer to reinit. Since most frameworks will cache the configurations and controller layer for performance, during the development phase, you'll need to reinit all the time. CF9 eases this problem 'cause it is much faster.
  • lastly, sometimes you'll be using framework's API, an abstraction from CFML, and missed out on the native ColdFusion way of solving the same problem.

Performance generally is a non issue. Don't worry.

Henry
Thanks, Henry. Briefly, and if you are familiar, what are your thoughts on CF on Wheels vs. Coldbox? If you were a beginner, which one would you be inclined to choose?
Mel
@Mel - You might want to read this question, which was asked earlier today: http://stackoverflow.com/questions/3361951/picking-a-coldfusion-mvc-framework
Gert G
Pick CFWheel if you prefer the Ruby-on-Rails / Active Record style of developing web app, and need the ORM feature in CF8 or older.If you are using CF9, there's a Hibernate-powered ORM which is, IMO, more powerful, and works with all MVC frameworks.ColdBox has great documentation and support, but its weakness is that it has everything + kitchen sink! Sure, you don't have to use them if you don't need them, but I find it a little bit too bulky for my liking.
Henry
Btw, the ColdBox book / online doc is really good at teaching how to lay out a proper CF app architecture. It explains what are the responsibility of Model / View / Controller and where to handle what. Good read.
Henry
As for my pick for beginners, FW/1 is easy to learn, setup, and use! Download 1 CFC, read 3 wiki pages, you're good to go. :)
Henry
+3  A: 

Henry's already given a good answer, but I would just like to pick up on this part of your question:

But does it not come with a performance tax?

The performance overhead of a framework is negligible.

In fact, you may even get better performance from frameworks such as ColdBox, which have built-in caching.

Remember, most frameworks are mature codebases used by lots of people - most likely, your newly written untested code is going to be the culprit, not the framework.


However, as a general rule (not specific to frameworks) performance is not a problem unless you've got measurable results that say it is.

i.e. don't just think "I'm going to do X instead of Y because I think it'll be faster" - go with the simplest option that meets user's needs, and only change it if you can prove that it has a performance problem and that your proposed solution is better.

Peter Boughton
Thanks, Peter. To be honest, I'm doing rather well writing an app on my own, using CF dev guide by Ben Forta. But after I saw how CF on Wheels works, I am really tempted to start using it. I'm afraid to do so because I'm unfamiliar with it, and I'm worried I'll come to a point where I need to create something and I would not be able to...
Mel
@Mel, ask a question on their user group and test their response time. :) Also, don't forget about twitter. We ask questions there all the time.
Henry
@Mel, CFWheels is indeed a very interesting framework. You may check out their presentations at UGTV http://www.carehart.org/ugtv/index.cfm , search for "Wheels"
Henry
It would be a good exercise to continue your app as you are, then when you're done go back and do it in Wheels, then re-do it again in ColdBox, then re-do it again in FW/1, and so on. (Or with different combo of frameworks). This has a couple of benefits - with each iteration you learn more about your application, but also you reduce the changes to learning about the framework, rather than trying to figure out your app, since you've already built it (at least) once.
Peter Boughton
Of course, that may take a long time to complete, but at the same time it gives you valuable experience, which will save you time in future.
Peter Boughton