Note that there are some explanatory texts on larger screens.

plurals
  1. POSome Questions about structuring domain-driven-design namespaces
    primarykey
    data
    text
    <p>I have some general questions about framework design. </p> <p>I am building an API for an iPhone application in C#.NET (framework 3.5), &amp; SQL 2008 (using LINQ). I have followed the Domain-Driven-Design pattern (in a book) and have the following folder structure:</p> <pre><code>Core - DataAccess --Impl -Domain -Impl </code></pre> <p>Core is my core API library - my DLLs. DataAccess contains the data access interfaces DataAccess.Impl contains the repositories (LINQ to the DB) Domain contains most of my data types and properties. Impl contains my services (i.e. AccountService.cs, EmailService.cs)</p> <p>Now, as an exercise, I have added a Windows Service to this project and am attempting to call functionality from the DLLs in this service. MY QUESTION IS, what layer should I be exposing to other applications and what should stay hidden? </p> <ul> <li>Should the service classes from the Impl folder be what programmers see? </li> <li>Or the Repositories from DataAccess.Impl?</li> <li>Or, should i just lay it all out for the programmers to see? As it looks now, this seems sort of confusing. </li> </ul> <p>When I started reading about DDD I was assuming that the repositories would be hidden and accessed by the service classes, but I am finding I need to call functionality from both in my client. Have I designed this wrong? </p> <p>My other question has do do with namespace naming. When the Windows Service calls functionality from my core library, I have to do my includes as such:</p> <pre><code>using Company.Product.ProductCore.Core.DataAccess.Impl using Company.Product.ProductCore.Core.Domain using Company.Product.ProductCore.Core.Impl </code></pre> <p>This seems wordy. Looking at Microsoft's DLLs, they seem to keep with a two-tier convention - (System.Linq, System.Text, etc). Having Company.Product.ProductCore.Core.Impl seems messy and doesn't really tell the programmer what this namespace does (but it is what was suggested by the example I read). Is there a best practice here? </p> <p>Your suggestions (and any examples) are seriously appreciated. </p> <p>Thanks. </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.
 

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