Re: Repositories Global only or contextual?

Thomas Presthus <[email protected]>
Newsgroups gmane.comp.programming.domain-driven-design
Organization Erus Encodia AS
Message-ID <1390568767.16391.9.camel@thinkpad>
On Thu, 2014-01-23 at 09:15 -0800, [email protected] wrote:
> 1) is OOP required for DDD? Interface is OOP concept. What do you do
> in a language without interfaces?

I'm referring to interfaces as a mutual contract between a client and a
provider. Since the original poster is working in Java, this would
translate into the interface concept of java.

In duck-types languages this would look very different, and the same
goes for non-OO languages. The essence, however, is that the repository
is expressed in terms of the domain, but implemented as part of the
infrastructure.

> 2) Interface method have specific concept in the domain:
> specification. Interface methods usually map 1:1 to some specification
> (there are slight differences but let's ignore it for now)

Yes, it does. I saw in a previous mail of yours that you have generic
repositories in your infrastructure and specifications in the domain.
That is basically the same as I'm talking about. Your specifications
form the contract that I refer to as an interface.

> I'm due to provide code examples of what I'm talking about and plan on
> doing that as soon as I find some more free time.

I'll be sure to look at it when you get the time. It's always inspiring
to get to know how others solve known problems and design issues.

> While lazy loading is an optimization mechanism, this is something you
> should not ignore in your infrastructure. All too often I hear people
> talking about DDD saying how performance is not important. This is
> simply not true for any non-trivial project. And IQueryable from .NET
> is more about lazy materialization, then lazy load.

I think we absolutely agree here. DDD is in no way a performance
issue-solver, it is rather a way of developing software aligned to
business problems.

Performance issues, however, is not (usually) a part of the domain. And
as you mention, this should not be ignored in the infrastructure. I
whole-heartedly agree with you here. The point I was trying to make was
that optimization concerns should be cared about in your infrastructure
and not leak into the domain.


Thomas.



------------------------------------

Yahoo Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/domaindrivendesign/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/domaindrivendesign/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo Groups is subject to:
    http://info.yahoo.com/legal/us/yahoo/utos/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.