<?php
-namespace DivinElegy;
+namespace DivinElegy\BLL;
class Artist
{
--- /dev/null
+Business objects go here. The should be completely decoupled from anything else. An example of a business object could be a simfile class.
+
+Whether or not the should implement an interface or extend an abstract class I have not yet decided. For now I will just implement the classes.
<?php
-namespace DivinElegy;
+namespace DivinElegy\BLL;
class Simfile
{
--- /dev/null
+This is where datamappers go, they need to extend the datamapper abstract class.
+
+The only thing a datamapper needs to know is how to save objects to the database. So SQL should go in a datamapper.
+
+I want to use PDO, so a datamapper will need a PDO instance.
--- /dev/null
+This is the model LAYER. In here there should probably be three factory classes:
+
+BusinesObjectFactory - this knows how to build a business object.
+DataMapperFactory - this knows how to build a datamapper. DataMappers populate/save business objects by communicating with the database
+ServiceFactory - to build services. Services facilitate communication between business objects and datamappers.
+
+
+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
+and controllers. The services contain the DataMapperFactory and BusinessObjectFactory.
--- /dev/null
+Services go here.
+
+A service extends the service abstract class. Services interact with the model layer, Services need a BusinessObjectFactory and a DataMapperFactory. A simfile service would know
+how to build a simfile class.
+
+Saving state would be done in a service class.
+
+
--- /dev/null
+This is where a view goes. Views need to extend the view abstract class.
+
+A view should only need the servicefactory as the a service facilitates the interaction with the model layer.
--- /dev/null
+Abstract classes go here. EG:
+
+model
+view
+controller
+datamapper
+service