Restructure application. Add README files to clearly explain what each directory...
authorCameron Ball <c.ball1729@gmail.com>
Thu, 19 Jun 2014 14:59:03 +0000 (22:59 +0800)
committerCameron Ball <c.ball1729@gmail.com>
Thu, 19 Jun 2014 14:59:03 +0000 (22:59 +0800)
app/bll/Artists.php [moved from public_html/vendor/DivinElegy/Artists.php with 50% similarity]
app/bll/README.md [new file with mode: 0644]
app/bll/Simfile.php [moved from public_html/vendor/DivinElegy/Simfile.php with 97% similarity]
app/datamappers/README.md [new file with mode: 0644]
app/model/README.md [new file with mode: 0644]
app/services/README.md [new file with mode: 0644]
app/view/README.md [new file with mode: 0644]
lib/base/README.md [new file with mode: 0644]
public_html/app/Model/queef [deleted file]

similarity index 50%
rename from public_html/vendor/DivinElegy/Artists.php
rename to app/bll/Artists.php
index 4df79b2..008951d 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-namespace DivinElegy;
+namespace DivinElegy\BLL;
 
 class Artist
 {
diff --git a/app/bll/README.md b/app/bll/README.md
new file mode 100644 (file)
index 0000000..8fec559
--- /dev/null
@@ -0,0 +1,3 @@
+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.
similarity index 97%
rename from public_html/vendor/DivinElegy/Simfile.php
rename to app/bll/Simfile.php
index 001ac99..b6eee58 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-namespace DivinElegy;
+namespace DivinElegy\BLL;
 
 class Simfile
 {
diff --git a/app/datamappers/README.md b/app/datamappers/README.md
new file mode 100644 (file)
index 0000000..74ec68e
--- /dev/null
@@ -0,0 +1,5 @@
+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.
diff --git a/app/model/README.md b/app/model/README.md
new file mode 100644 (file)
index 0000000..941fa36
--- /dev/null
@@ -0,0 +1,9 @@
+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.
diff --git a/app/services/README.md b/app/services/README.md
new file mode 100644 (file)
index 0000000..8132d96
--- /dev/null
@@ -0,0 +1,8 @@
+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.
+
+
diff --git a/app/view/README.md b/app/view/README.md
new file mode 100644 (file)
index 0000000..1e46684
--- /dev/null
@@ -0,0 +1,3 @@
+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.
diff --git a/lib/base/README.md b/lib/base/README.md
new file mode 100644 (file)
index 0000000..9b1c26b
--- /dev/null
@@ -0,0 +1,7 @@
+Abstract classes go here. EG:
+
+model
+view
+controller
+datamapper
+service
diff --git a/public_html/app/Model/queef b/public_html/app/Model/queef
deleted file mode 100644 (file)
index e69de29..0000000