This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Hi
I have question regarding DAO design pattern.
Generally we separate service layer from database layer by interface like DAO.
e.g
Now I will acccess the DAO class from the service layer as follows.
My question is as all of my DAO classes are public I can even access it from VIEW layer also.
How can I prevent the DAO access from Viwe layer.
Please help. I am very much confused.
Depends on the view layer. You may not be able to, if the view layer can instantiate arbitrary classes, at least not without some trickery. Which cannot possibly be worth it in almost all situations. What are you so afraid of that you must absolutely restrict access to your app's classes?