Restructure application. Add README files to clearly explain what each directory...
[rock.divinelegy.git] / app / model / README.md
1 This is the model LAYER. In here there should probably be three factory classes:
2
3 BusinesObjectFactory - this knows how to build a business object.
4 DataMapperFactory - this knows how to build a datamapper. DataMappers populate/save business objects by communicating with the database
5 ServiceFactory - to build services. Services facilitate communication between business objects and datamappers.
6
7
8 Since the model is a LAYER in this application there is no one model class, instead we pass the same instance of the ServiceFactory to views
9 and controllers. The services contain the DataMapperFactory and BusinessObjectFactory.