Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p>My business layer does not know of the data layer, my data layer knows of the business layer and my facade layer knows of the data layer and the business layer and the DTOs. Is this a bad design for an API?</p> </blockquote> <p>No layer should know about the layer above. </p> <blockquote> <p>I have a WCF service layer that I'm using as a type of facade. It calls the respository layer and converts the business objects to DTOs and passes them through the API service call via a message to the client. The client can be an ASPX website, Silverlight app, WPF app, or even a WP7 app</p> </blockquote> <p>Theres a design principle called <em><a href="http://en.wikipedia.org/wiki/You_ain%27t_gonna_need_it" rel="nofollow">You Aint Gonno Need It</a></em> which is the almost the same thing as <em><a href="http://www.makinggoodsoftware.com/2009/08/11/for-gods-sake-make-it-easy/" rel="nofollow">Keep It Simple (and) Stupid</a></em>.</p> <p>They both is all about NOT adding features that you might need. If you start with only having a website that uses the service layer, then simply use it directly without a WCF service.</p> <p>If you need a WCF service later on, then add it later.</p> <p>If you are defining the services using interfaces it's quite to swap a implementation that you are using directly to a WCF service implementation. (if you are using a <a href="http://martinfowler.com/articles/injection.html" rel="nofollow">IoC container</a>)</p> <p><strong>Concretes vs interfaces</strong></p> <p>You should always put the interfaces and business objects in a separate assembly from implementations (classes) to make it easier to swap implementations of each layer. It's a design pattern called <em>Separated interace</em> which you can read about here: <a href="http://martinfowler.com/eaaCatalog/separatedInterface.html" rel="nofollow">http://martinfowler.com/eaaCatalog/separatedInterface.html</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

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