What is the relationship between the business logic layer and the data access layer?
- by Matt Fenwick
I'm working on an MVC-ish app (I'm not very experienced with MVC, hence the "-ish").
My model and data access layer are hard to test because they're very tightly coupled, so I'm trying to uncouple them.
What is the nature of the relationship between them? Should just the model know about the DAL? Should just the DAL know about the model? Or should both the model and the DAL be listeners of the other?
In my specific case, it's:
a web application
the model is client-side (javascript)
the data is accessed from the back-end using Ajax
persistence/back-end is currently PHP/MySQL, but may have to switch to Python/GoogleDataStore on the GAE