Henry asks quite a few questions regarding frameworks so I've split up his email into smaller parts.
I am encouraged to ask for your thoughts/suggestion on the new developments around CF in terms of MVC/Frameworks/ORM's ...
I have been in CF for 7 years now and never had to consider MVC/OO/Frameworks on account of no need/desire by my clients/company.
Well let's be real here. A client is not going to ask you to use a framework. A client is going to ask you to build a site and most likely will assume you will follow best practices when building. Now I have had a few clients specifically request I use a framework, but those are the minority.
Personally I don't use a framework because a client asks me to. I use a framework because it makes my life a heck of a lot easier as a developer. It also makes it easier to work with others since we have a standard to follow.
Outside of work and in my personal time over the years, I have built a site to promote natural health (works like non-profit) www.liveherbals.com and is all CF (using the procedural and CustomTags).
I am wanting to start out with a complete rewrite as a good project to get back in to the game.
I would love to hear on your thoughts on which to start with (going from EASY to HARD).
To take it step-wise and with the limited time on hand, does this look like the right way to go?
- convert all custom tags to CFC's and Application.cfm to Application.cfc (big change in thoughts)
Well you have a couple of issues here. First off - yes, it is a good idea to convert from Application.cfm to Application.cfc. That's a no brainer. Secondly - does it make sense to convert all your custom tags to CFCs? Well, most likely, but there are still a few things that I think custom tags excel at, specifically layout. You can't "wrap" with a CFC. But if you switch to a framework like Model-Glue that will be less of an issue as you treat your layout like a view.
2) start with some ORM (Reactor, Transfer or onTap) - which one?
3) ColdSpring - any other options?
Ok, I'm going to go out on a limb here, and I think people may disagree with me, and I may change my mind too. I know that very recently I expressed my deep love for ColdSpring and Transfer (Ray and Transfer sitting in a tree, K-I-S-S-I-N-G), but if you are just starting to get into frameworks, you may want to take it simpler. Baby steps. I'd probably suggest getting comfortable with your framework first. Then begin looking at ColdSpring. Then look at Transfer. (Or vice versa.)
Again though - take it slowly. At least for me I feel like if I don't truly get concept A I shouldn't move on to B.
4) FB/MachII/Model Glue/ColdBox - which one?
Luckily that is an easy question. Model-Glue. Period. No one will disagree with me, I promise.
Seriously though - this is what I experienced. I began with Mach II. It didn't feel right for me. I then tried Model-Glue and loved it. Each framework appeals to different people so you really need to just pick one - give it a try - and see how it feels for you. I'm not saying to stop trying frameworks as soon as you find one that you like, but definitely don't give up if you aren't happy with the first one. (Or just use Model-Glue. Seriously. It's the Bees Knees and every other framework is un-American. But don't quote me on that.)
Archived Comments
"Luckily that is an easy question. Model-Glue. Period. No one will disagree with me, I promise."
(Laugh) Comment-baiting, are we?
It would only be comment-baiting if I was wrong. ;)
"The force is strong with this one, hmmmn.... But one must be careful when recommending frameworks, lest the flame war start with you....." +1 Coldbox :)
Rather than just sit back and watch the flames grow, I'll throw some fuel on the fire.
I'd recommend downloading a sample application from each framework and see which type of coding pops out at you.
We had a lot of success with procedural coders that had no OO background moving easily to Mach-II. I've got a series on my site that may help you along if you'd like to try Mach-II.
http://www.iknowkungfoo.com...
I've also got a series on OOP with CF that may help regardless of which framework you choose.
http://www.iknowkungfoo.com...
I highly recommend taking a hard look at Coldbox.
Just to be clear - I don't think this needs to be a 'which framework is best' entry, but more a 'getting into frameworks and other stuff' type entry.
I made my first venture into frameworks with ColdBox, and have loved it. I originally chose it because of it's outstanding and plentiful documentation. Now that I understand it better, it's very easy to work with and organizes things well for me.
Just one man's opinion.
For a newbie to frameworks then I would say that ColdBox and the no xml version of Fusebox are a good place to start as neither uses XML configuration files.
Of course, each framework has pros and cons, but I'm currently building my 3rd app using the no xml version of Fusebox and have to say it rocks and is much faster for developing than the XML config version.
Have to agree with the CF Jedi that is Raymond in that learning a framework and Transfer / ColdSpring / Reactor / Quantum Physics all in one go really is jumping in at the deep end!
Oh and I'm English so I guess I can like an un-American framework :)
I agree with the previous poster about Coldbox. I had started frameworks with simple MVC (homegrown). But as I would bang my head on the wall with MachII and Model-Glue, I found Coldbox to be extraordinarily easier. Just the built-in layout tools alone make it work my time. It has built-in integration to Coldspring and Lightwire, the latest version has a security system in it to, with the ability to use the framework's security object or build your own with certain expected calls and return types. Luis just keeps adding and adding and adding new features to the framework.
Unfortunately for me, my full time job is taking up so much of my time that my side projects, using Coldbox, always have to take a back seat! If only there were more hours in the day!
"Just to be clear - I don't think this needs to be a 'which framework is best' entry, but more a 'getting into frameworks and other stuff' type entry."
@Ray: The problem is, there's too many frameworks out there to choose from. I often wonder how many actually overlap in concept.
I think you should use MDMVC... its my framework and its "the one true way" ... of course, I havent written it yet, until then ... use...
Whichever framework you like!
(of course, I concur with Model-Glue, but that is because I like it)
I tried to absorb Coldspring, Model-Glue, and Transfer all at once, and often would not know *where* my problem was happening as I learned them. My advice, no matter what you choose, is to remember those are distinctly different products, and you should learn them each alone before trying to combine em!
But, to agree with Ray, Model-Glue made the most sense to me when I first started this process, and Transfer continues to make me excited to be working with CF =)
Chris
I built my first "large" ColdFusion application without a framework because, well, I never heard of frameworks at the time. This was probably about 10 years ago. As the application became larger, tracking down bugs became more difficult because of the dependency of one page from the previous and to the next. It would often take me 15 minutes or so to even begin trying to determine where the source of the problem lay.
Then I discovered Fusebox. I rewrote the same application using that framework and maintenance became much easier. It was now much simpler to find the source of a bug. I used Fusebox for my next application, and used Mach-ii for my latest (and by far the largest) application. I'm a Mach-ii guy, but to each his own.
In any case I would never consider building an application---unless trivial in size---without a framework. Yes, the initial development takes longer, but the payback in maintenance more than makes up for it. My Mach-ii application has over 400 event handlers, and trying to maintain an application that large without a solid methodology would be frighteningly difficult.
I'm in the same boat as Henry. I am looking into learning Model-Glue to firm up my skillsets. Ray, you had a tutorial on Model-Glue a while back. I can't seem to find it on your site anymore. Is it still here somewhere?
I think I removed the link because it was so old, but here it is:
http://www.coldfusionjedi.c...
SOmeone else has done a series like mine, but for MG2, whereas mine was written for MG1. I still think mine has value.
I'm going to come out of lurking mode just to add to the ColdBox camp. While I know of course that Ray wasn't looking for a comment war ;) I'm still going to say that of all the frameworks that I've looked at, ColdBox takes the Cake!
Ray I think I found the tutorial you are referring to:
http://www.nodans.com/index...
I have taken a look at Model-Glue and it seems pretty solid, but I don't think it's the framework for me. I am in the process of lookin at Coldbox. Does anyone know of any Coldbox Tutorials?
Coldbox Trac site has a handful of tutorials and walkthroughs. If you haven't seen it yet, it is worth a quick peak. http://ortus.svnrepository....
Even the homepage http://coldboxframework.com has plenty of information. There is plenty of visuals, helps those who maybe new to the whole framework, design pattern, and OO approach.
This in my mind is what separates Coldbox from the rest. Not making it a better framework then the others, but giving it an edge in market growth, so to speak.
I started off with Model-Glue because I figured "hey -- if it's good enough for Ray...". I worked through his tutorial and Dan Wilson's on MG2. I was feeling pretty comfortable with it EXCEPT for the fact that you use an XML file for the application flow, which seemed weird to me. But I figured I was stuck with it since MachII and Fusebox (at the time) also used XML.
Then, I discovered ColdBox and I haven't looked back. The only problem I'm having now is trying to figure out what size application is too "trivial in size" (as joel put it) to "rate" using a framework. I guess in the back of my mind I'm always considering the possibility that a even small application will someday get bigger.
Long live COLDBOX... and it's got tons of documentation so it's easy to learn.
I'm going to the Edinburgh conference in June "Scotch on the Rocks 2008". The funny thing is that it s set up an evening session with "Frameworks Debate"... for 1 hour!!! won t be enough, so much to debate.
In my case, I like Model-Glue, but probably because it s the one i use and know. I can't work anymore without an MVC framework.
I read some good things about coldbox and I'm thinking using in next projects.
I have looked at the Coldbox Trac site, but I was wondering if anyone has put together kinda like Ray did with Model-Glue.
it may also be work checking out some of the workshops on cfFrameworks.com (http://www.cfframeworks.com... and also some of the articles we've linked to: http://www.cfframeworks.com...
(sorry for teh self promo :$)
I totally agree with this statement:
"I tried to absorb Coldspring, Model-Glue, and Transfer all at once, and often would not know *where* my problem was happening as I learned them. My advice, no matter what you choose, is to remember those are distinctly different products, and you should learn them each alone before trying to combine em!"
I recently worked on a project and the setup is Mach-ii, Coldspring and Transfer. I had previously never used any of these products. It has been hard to get my head around it all because I don't have a clear understanding of how each product works separately. I have been able to work on the project, with the help of the other developer, but I am sure I am not following best practices for each product because I don't know each individual product well enough.
That being said - Learn the frame work first and how it works before diving into the next two.
Sorry to bring an old post back to life Ray, but while researching this very topic I came across your post (as I do most times I research something to do with ColdFusion).
I was just wondering if your thoughts have changed at all in the last 3 years on his questions about frameworks?
I think the sentiments are still dead on. To a few specific points:
1) I no longer use Transfer. I use ORM in CF9. Technically I still "use" Transfer at CFLib.org, but for new dev, it's all orm.
2) I still recommend Model-Glue, but I also really, REALLY dig Framework 1 by Sean Corfield.