Im creating a 4 layer project like this
i have always until now mixed the DAL and the BLL together and referenced the DAL from the website directly. this time, i would like to have some real separation of concerns here and i want to create a DAL which is a real DAL and unit testable coupled with a BLL that is really persistence agnostic (you know, like the pros do it) Im planning on using EF5
I have read lot of sites like
soo basically i know i´ll have to use the factory, the repository and unit of work patterns but i dont know what goes where and what is a simple (but clear enough example) i could follow
what i know is that i shouldnt reference the DAL on the website bt i really dont know how to make the bridge.
Is there any example of this with say, a Product and an Order table?
soo basically i know i´ll have to use the factory, the repository and unit of work patterns but i dont know what goes where and what is a simple (but clear enough example) i could follow
You say you know you'll have to use them but do you have a precise idea why you need each of them in the first place ? ;)
Aren't you taking the wrong approach trying to mimic how "the pros" do and throw all of these patterns at your system at once ? Maybe you could just start writing the simplest, most naive implementation that fulfills your requirements (testable DAL + persistence-ignorant BLL) based on more general principles.
Design patterns are only a means to an end. Chances are you'll feel the need for them while designing or trying to improve your implementation, but maybe it won't be the case.
As far as good general application architecture guidelines, I'd recommend Uncle Bob's work on Clean Architecture. I've found that even when he comes to describing specific software constructs with his own vocabulary, the way he explains them makes it easy for you to see them as placeholders - general concepts that you can later equate with Repositories, Unit of work and so on.