Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using ColdFusion frameworks

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.

I'm new to ColdFusion and frameworks in general. I want to understand the implications of using a framework, including advantages and disadvantages.

like image 969
Mohamad Avatar asked Dec 13 '22 20:12

Mohamad


2 Answers

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.

like image 77
Henry Avatar answered Jan 02 '23 07:01

Henry


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.

like image 24
Peter Boughton Avatar answered Jan 02 '23 06:01

Peter Boughton