Monday, July 9, 2007

Model View Controller

I was about to write this post about the various frameworks in the Model View Controller (MVC) architectural pattern. I checked Wiki to see what it had to say on MVC only to find that the two frameworks that I wanted to discuss were not listed even though I thought they conformed to this paradigm.

The two frameworks in question are Apache Cocoon and BEA Page Flows. My organisation started down the Cocoon path fairly early in its J2EE (now Java EE) history. This seemed a good open-source product for separating the user interface, data and business logic. We seemed to be a lone voice with other government departments going for Struts, which is listed in Wiki as a MVC framework.

We moved away from Cocoon when we purchased the BEA Weblogic platform and now have adopted Page Flows as our framework of choice. Page flows is not billed as a MVC framework but provides a sufficient level of detail to easily implement MVC. That means we have another choice to make in the pursuit of our set of SOA standards and technologies. If we have settled on the Page Flow framework now we may also have to specify we implement it in an MVC fashion.

Interestingly Cocoon has separation of concerns as a clear focus although it does not claim to be MVC but does provide similar separation.

It would seem that both Cocoon and Page Flows do not dictate an MVC solution however the MVC pattern can be implemented with both of them.

MVC: http://java.sun.com/blueprints/patterns/MVC.html

Cocoon: http://www.java-source.net/open-source/web-frameworks/cocoon

Page Flows: http://dev2dev.bea.com/pub/a/2004/01/Dew.html

Cocoon and MVC: http://webservices.xml.com/pub/a/ws/2003/01/29/cocoon-xforms.html

No comments: