Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Hope this helps:</p> <ul> <li><p><a href="http://en.wikipedia.org/wiki/Multitier_architecture" rel="nofollow">Layer your system</a>: as you mention in your answer, always split bz logic from the data access logic. I would recommend to implement different layers in different binary modules, this will give you the flexibility to deploy different layers in different tiers (if you really need it).</p></li> <li><p><a href="http://martinfowler.com/eaaCatalog/repository.html" rel="nofollow">Repository pattern</a>: the business layer has abstract definitions of how to perform data access operations with certain entities in your bz logic. The methods in the repositories always use entities defined in your bz logic as parameters (the repositories always "talk" in the the bz language ). Once the repository interfaces are defined in the bz layer, you implement them in a separate layer: the data access layer.</p></li> <li><p><a href="http://www.theserverside.com/news/1321158/A-beginners-guide-to-Dependency-Injection" rel="nofollow">Dependency injection</a>: in the application layer (GUI, application server, ...), in the initialization logic (bootstrapping) you can use a dependency container to inject the repository implementations (the ones defined in the data access layer) in your bz logic. There a lot of open source frameworks with dependency injection containers.</p></li> </ul> <p>With these 3 patterns, you can separate the DA logic from your bz logic.</p> <p>Note that this is a very short answer, I would recomend you to take some time and read the following books:</p> <ul> <li><a href="http://www.martinfowler.com/books.html#eaa" rel="nofollow">Patterns of Enterprise Application Architecture</a></li> <li><a href="http://domaindrivendesign.org/books" rel="nofollow">Domain Driven Design</a></li> </ul> <p>Thanks,</p> <p>Juanjo</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload