Isaac's got some great stuff in there. I just wanted to throw in a couple things and reword what he said my own way...
Typically, a non-frameworked app with thousands of cfm and cfc files is either made very well, or it's coded like spaghetti with meatballs. If it's well constructed*, why move to a framework at all? If you are really into it, you may fare pretty well with a framework that does a lot more "convention over configuration." Fusebox 5.5 (without xml), CFWheels and I think the new Model Glue beta can pick up a lot of your files without you having to configure them all. * My idea of well constructed means it's MVC where the model is a nice and complete thing, portable between frameworks or different front-ends - not necessarily the "4 objects per database table" and certainly not "all our queries in this cfc, util functions in this one." Also, bonus points if you have unit tests, more if they pass. Read up on Hal Helms' stuff if you need hints on how to get to this point, he has a lot of thought provoking "what should the model be, really?" kind of stuff. If your app has a lot of includes, especially if nested (it's spaghetti code), and meatballed objects thrown in for whatever random thing, and especially if you have more than 1 cfc call per cfm, then you could be in trouble. Depending on how bad it is, you are looking at months of work and a partial rewrite. Of cours then if your HTML stinks too, and you have a lot of inline styles and use tables for design, you may want to re-do that as well, so, that's essentially a full rewrite. Now, to choose a framework or not. It sounds like you're doing some high-level rethinking of your app. If you decide to go non-framework, won't you just end up in this same spot again in 2 years? Do something that will last. Do something that's structured the most obvious way for new people and for yourself in the coming years. If nothing else, get your entire model into well encapsulated CFCs and your app into a generic MVC structure, then you can port it pretty freely to any MVC compatible framework. Trust me, you will thank yourself repetedly every time you need to update it, and programmers down the line will bless you instead of curse you. nathan strutz [Blog and Family @ http://www.dopefly.com/] [AZCFUG Manager @ http://www.azcfug.org/] [Twitter @nathanstrutz] On Wed, May 27, 2009 at 9:17 AM, s. isaac dealey <[email protected]> wrote: > > > I want your opinion ( or experience ) with refactoring an old project > > into a framework. I am working now on a old non-frameworked project > > with plain cfm files with .cfc function and object libraries. This > > projects contains a bunch of .cfm files and .cfc. About 1000 items. > > The discussion with my colleagues is that some want to refactor the > > whole project in a framework. I think it's to much work, and you can > > better start from scratch. My other colleagues disagrees. Do you have > > any experience or opinions? > > Both approaches work. There are a lot of variables involved, so it would > be difficult to offer a blanket suggestion about how to approach this > problem. The amount of business logic that's been placed in or left out > of the CFCs will have a dramatic impact on the amount of time it's > likely to require to convert the application to a framework. If most of > the business logic is already in the CFCs, then converting to the > framework shouldn't take very long. > > If you've got a lot of business logic in .cfm files currently, you might > want to start by converting that logic into objects -- which is what you > want anyway, irrespective of which framework you choose. And at least > for that portion of the migration project, I would tend to say that it > makes more sense to keep the business logic you have rather than start > over from scratch, since that has nothing to do with your framework. > > The rest of the project will be converting the views (HTML) and creating > events in the framework's controllers. It's not difficult but it can be > tedious. The onTap framework is designed in a particular way that allows > you to convert individual pages incrementally in a "time permitting" > fashion. None of the other frameworks I've seen will allow you to do > this yet, you either convert them all at once, or not at all. The onTap > framework will also allow you to maintain your existing links and form > actions, which again, it's the only framework I've seen that will > eliminate that step from your workload (though I've heard that upcoming > versions of FuseBox will have features that allow this... I think). > > Incidentally, I converted Ray Camden's Galleon Forums application to 5 > different frameworks - ColdBox, Mach-II, Model-Glue, 2 versions of > FuseBox (with & without XML) and the onTap framework. In total the > project took me about 2 week. I don't think it had 1000 files, however, > I was able to replicate the migration to 5 different frameworks all by > myself during that time while still maintaining a 9-5 job. So I think > that says something for the potential to be able to migrate your > existing code. Whether you want to keep the existing code is really > another question. If you're unhappy with the user interface, you may > want to scrap it if you have time to start from scratch. > > Good luck! :) > > ike > > -- > s. isaac dealey ^ new epoch > isn't it time for a change? > ph: 817.385.0301 > > http://onTap.riaforge.org/blog > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:322841 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

