What is the relationship between the business logic layer and the data access layer?
Posted
by
Matt Fenwick
on Programmers
See other posts from Programmers
or by Matt Fenwick
Published on 2012-03-02T14:02:33Z
Indexed on
2012/11/13
11:21 UTC
Read the original article
Hit count: 312
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
© Programmers or respective owner