Framework agnostic

This is actually a post to the Google group which I want to put out to a wider audience.

Before the project carrys on going forward I think some feedback is needed on how to handle being framework agnostic (if we are to even bother):

1. How are session/cgi/application variables handled in the Controller? Do we use a scopeCFC or just access them direct? If we use a scopeCFC(?) then should we pass the objects to the model or just the values?

2. In the views variables are currently reference through MG's "viewState"? From what I remember FB doesn't have any kind of view stack. You reference all variables via the attribtutes.scope, request.scope etc ? How is the best to get around this (I have idea I want to solicit different approaches)?

3. With the efforty involved be really worth it in general?

Has anyone tried this or moved a project from one framework to another if so please leave feedback.

Comments
Kevin Roche's Gravatar The answer to your question about fusebox depends a bit on which version you are talking about version 5.5 does have an optional event like way of dealing with things.

I will think a bit about this and respond when I have had some thoughts.
# Posted By Kevin Roche | 06/06/08 20:06
Steve 'Cutter' Blades's Gravatar @Andy -

Though much smaller in scale, the LitePost project (http://code.google.com/p/litepost/) shows a model that is reusable across FB5, MG, and MII. I could see the same model fitting into a home rolled framework as well. Really, the differences between the apps was very minimal, and the lines would probably blur more with MG3.

Not sure if any framework should be used, other than ColdSpring (how did we do this before again...?) I recently did an install of MangoBlog for a client. It uses it's own framework, but it's greatest power might be it's plugin architecture. I can see this approach as being very beneficial in a project like CFCommerce.
# Posted By Steve 'Cutter' Blades | 06/06/08 21:16
Nick Tong's Gravatar I think no matter how much we try it's going to take some adapting to allow the system to work in several frameworks. As long as the model is right and we don't put to much logic in the layout files then we should be good. One way (which i use) to to API everyhing up. That way it's just a matter of making some changes in the CFCs rather that the framework layout pages
# Posted By Nick Tong | 08/06/08 22:22
Brian G's Gravatar I agree with Steve and Nick. So long as the API to the model is clean and efficient, then using it in any of the frameworks will be trivial. You might consider breaking out the controller-level wrapping of the model into sub-projects that are maintained by individuals experienced with the particular framework. Consider a directory like "controllers" with a sub-directory for each framework and inside the directory would be one file (or maybe more): CommerceController.cfc

Using the project would be as easy as grabbing the appropriate controller and the model and you'd be off and running by just adding some events to your framework (which might be mocked up in a sample XML file).
# Posted By Brian G | 11/06/08 19:24
RSS Feed / Contact Us / BlogCFC by Raymond Camden