We’ve started to look at extending our home-brewed recruiting application. It is written in ColdFusion MX 6.1 with Fusebox 3.0 and Oracle 9i. We use some CFCs but mostly direct
- Extending and access the data model globally – because the queries are stored in each fuse directory, often this may require that we update the model in more than one spot
- Reusing code – copy and paste was our leading method of reuse (we had one page with essentially the same query 4 times)
- Poor separation of the Model View and Controller – the earliest parts of the application we did not understand how to practically/effectively do this in Fusebox 3
The application has grown organically with a variety of part-time developers working on it. We have been asked to customize it (or extend) it to accomodate a new union and collective bargaining agreement (CBA). The business rules and data structures required for the new CBA give us the opportunity to spend some time learning from our past mistakes (sins?). We’ve lived with the code for 18 months, and we’re excited about getting to take another run at this.
Penance
We’ve learned a lot from building the existing application. But I am glad that there are others who actually have solutions to the problems we’ve encoutered. Now it is time to start doing some research and prototyping.
- DAOs and Factory Method
Joe Rinehart has 2 great articles: Be a DAO Disciple; Learn to Love the Factory Method Pattern that describe the basics of a DAO and Factory Method in ColdFusion. This is great starting point, I think we’ll have to begin converting our data models to use CFCs to build DAOs and UserBeans. I am going to have to do some additional reading and prototyping to get my head around the relationship between DAOs, Factory Methods and Data Transfer Objects (DTOs) but this is good start. - CFCs and UDFs – arrrgghhh, we just didn’t plan very well. At the begining of summer we put all of our input objects into a CFC that draws all of the controls to the screen. We should have just done this earlier. Now we are looking for other parts of the application that use common logic.
- MVC pattern – Its not that hard, it is just that Fusebox 3 (and 4 from our prototyping) do not protect you from making poor decisions. We have been looking at Mach-ii, Fusebox and FusionTap. Check out S. Isaac Dealey’s Framework Feature Comparison. We’ll probably stay with Fusebox (probably move to version 4) just because we don’t own or have access to writing to the web root. Though we’ve begun looking at Mach-ii to better understand how to separate each of the layers in the MVC.