Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The domain is definitely not what you're looking for, in my opinion, neither is your data access layer.</p> <p>In my humble opinion, what would have to be exposed is not yet there, that is, a static class, let's say, if we consider the Façade design-pattern, which exposes your library subsystems features and functionalities.<br></p> <p><img src="https://i.stack.imgur.com/Hkmr0.gif" alt="alt text"></p> <p>The Façade design pattern explained: </p> <ol> <li><a href="http://www.dofactory.com/Patterns/PatternFacade.aspx" rel="nofollow noreferrer">Façade Design-Pattern - (Gang of Four)</a>;</li> <li><a href="http://en.wikipedia.org/wiki/Facade_pattern" rel="nofollow noreferrer">Facade pattern (Wikipedia)</a>.</li> </ol> <p>So in the end, what is your code supposed to do? Just expose what is necessary, which you ought to know, since you're the only one to know about the system you're developing.</p> <p>In short, I often use the Façade pattern so that I can isolate my classes, implementations and several related subsystems under the hood of a façade. Let's consider we are a brand new car dealer. This façade will be the great windows which let you see the cars exposed in the show room. You got to think of what this façade exposes. Does it expose only cars?</p> <p>In my opinion, this façade exposes cars, which you will be able to buy, to borrow money to buy, to repair the car, to buy other related accessories, etc. The accessories are then to be exposed, but only what needs to. The same with the other items such as the car. That is, you might want to expose an interface only, and keep the implementation for yourself, so that through you façade, when you got to return an <code>ICar</code> or an <code>IAccessory</code>, you have to instantiate them through your implementation object class, then return the interface instance through your façade. That said, the user doesn't need to know what is going on under the hood, but only that if he wants a car, he has to order it through your façade. Just like you won't go buy a Mazda 3 to Mercedes Benz. You'll work with the right façade. Then again, the different car dealers might only be subsystems, hence some kind of factories. Then you ask the façade for a car with this and that specifications, and the façade should know what <code>ICar</code> instance to return to exchange for what you're asking it to provide you with.</p> <p>Hope this helps anyway! =)</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. 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