How to avoid context in business layer

138 views Asked by At

I am trying to develop an android app, using multilayered architecture that consist of presentation layer, business layer and persistence layer. As I understand this architecture, persistance layer working with DB and don't know about business and presentation layer. Business layer working with persistance layer through interface and don't know about presentation layer. And presentation layer working with business layer and don't know about persistence layer. But to be able to work with DB, persistance layer need context, that I can get from activity, that in presentation layer. The only way I can think of is to pass context from presentation layer to business layer, than to persistance layer. How can I organize it, so business layer don't need context?

0

There are 0 answers