This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
In my opinion, MVC and Factory classes are 2 different paradigms and I necessarily dont see a connection from which one can generalize something.
MVC stands for Model(DAO and Data layer), View(JSP, HTML, Presentation layer) and Controller(The layer that connects View and Model). Its a classic design technique to build an application. It separates areas of concern, i.e., you have 3 separate layers, and it promotes loose-coupling, extensibility and re-usability. What that means is, is that you can work on any layer without affecting the other layers.
A Factory is a design pattern where in you delegate the creation of objects to a factory class. So in case I need to create an object, I can place a request to the factory and its the factory which will perform some logic and give me the created instance. This gives more of an authority to the factory and gets rid of spurious creation of objects.
So, you can use the factory class across any of the layers. If you wanted a factory for the DAO classes, you can use the DAOFactory class. If you want it at the controller level you can create a ControllerFactory and so on.
The way that I follow is to have a factory package and put all my factory classes into that package.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com