Note that there are some explanatory texts on larger screens.

plurals
  1. POMVVM, BusinessLogic, Entities, DTO's and tying it all together
    text
    copied!<p>I'm working on a new project and have been pondering about the structure of my application. </p> <p>Specifications:</p> <ul> <li>Multiple possible clients (at the very least a WPF based desktop application) </li> <li>BusinesLogic that will be (at least partially) exposed to third parties </li> <li>DataAccess and entities will be generated with LLBLGen Pro V3</li> </ul> <p>There's a myriad of questions on SO dealing with these (or related) issues. Picking up bits and pieces here and there I've come to this:</p> <ul> <li>A separate DAL, including all generated entities </li> <li>A BLL</li> <li>A thin WCF service on top of that turns said entities into DTO's (with the use of, say, Automapper) </li> <li>A WPF based client using MVVM</li> </ul> <p>A few additional ponderings:</p> <p>All entities sit in the DAL and are only known to the BLL. Presentation does not need to know the entities, because of the DTO's returned by the servicelayer. Since Presentation uses MVVM, DTO's do need to be converted to a ViewModel though. </p> <p>Am I correct in stating that entities don't need to be a in shared assembly referenced by Presentation as well as BLL? This is the case in an older project of mine with neither WCF or WPF involved. Entities were in a shared assembly and BLL returned these entities which were directly databound to controls in Presentation. This time though, using a servicelayer warrants using DTO's for transport, thus clients don't need to know the entities anymore, just the DTO's. </p> <p>Additional pondering: who's responsible for creating the DTO's? It's just a mode of transport, so I'd guess the servicelayer.</p> <p>Conrete question: is this a good approach? Because it feels a bit like overengineering things, I'm already mapping my database model to entities, those entities to DTO's and those to ViewModels, and that feels like it's a lot of overhead.</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