Re: Repository

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



On Aug 2, 2:59 am, Registered User <n4...@xxxxxxxxxxxxx> wrote:
On Sat, 1 Aug 2009 17:05:10 -0700 (PDT), shapper <mdmo...@xxxxxxxxx>
wrote:

Hello,

I am working on an MVC Application and I am using the DDD pattern.

I placed the Entities under MyApp.Domain.Entities.

My problem is where to place the repositories?
I have IProductRepository interface and ProductRepository class in
MyApp.Domain.Repositories.

Should they be on the same namespace? The interface and the
implementation ...

I use top level folders in my domain model projects. Interfaces go in
the Abstract folder while interface implementations go in the Concrete
folder. By default interfaces and implementations are in different
namespaces. The namespaces can be manually altered if desired.

regards
A.G.

Where do you put your entities? In a Entities folder?
And the folders are correspondent to namespaces? Is it?

I use 4 projects, correspondent to 4 main namespaces, and then I have
"child" namespaces as follows:

- Proj.Infrastructure
(Contains common elements used in other layers.
Example: StringExtensions, IUnitWork, etc)

- Proj.Domain
(Contains Entities, Repositories interfaces and Implementations,
Factories, Services that deal with Entities, etc)

At the moment I have the following namespaces: Services,
Repositories, Entities, Factories, ...

So you say that inside Proj.Domain.Repositories I should have
Abstract and Concrete namespaces?

Or inside Proj.Domain I should have Abstract namespace witll all
Services and Repositories interfaces.
Inside Proj.Domain.Concrete I would have all Services and
Repositories implementations?
And where the Entities would go?

- Proj.Application
Here I have only a few type of Services like TwiiterService,
MailService, etc

- Proj.Presentation
Here I have the ASP.NET MVC Web Application or the NET WPF
application,

Please, anyone, any suggestion to improve my implementation is
welcome.

I am just creating a base pattern to work from but there might be some
things that I am missing.
One is: what should I place in Proj.Application. The services I
suggested? But can I separated the services from Proj.Application and
Proj.Domain?
Besides TwitterService and MailService I am not sure what other
services I could have since I already have repositories.

I am not sure where the services come in when using repositories.

Anyway, any suggestion is welcome.

Thanks,
Miguel





.



Relevant Pages

  • Re: Repository
    ... The interface and the ... the Abstract folder while interface implementations go in the Concrete ... The namespaces can be manually altered if desired. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Java Feature Proposal
    ... > conflict. ... No, there is no naming conflict with Java interfaces, since they contain ... class to inherit multiple conflicting implementations of a method. ... I don't see why multiple inheritance of fields is any more of a problem ...
    (comp.lang.java.programmer)
  • Re: How to implement pppIp MIB on Linux
    ... considered ioctl() but it's not something I've used often enough to be ... Admin status is shakier. ... Some OSs implementations or some network programmers? ... If you're looking for IP interfaces, the standard way to get these (on ...
    (comp.protocols.ppp)
  • Re: [PHP] maybe we could all?
    ... interfaces ... and abstracts, then implementations. ... including space with php support; ... abstract class Object { ...
    (php.general)
  • Re: Run code part (like threadproc) in separate process
    ... session interface. ... destruction/release of the interfaces. ... It could be a genuine bug in the COM object. ... single thread session accessing this special mailbox folder? ...
    (microsoft.public.vc.language)