michal_talaga
2007-02-07 08:32:55 UTC
Hello!
For some time I have been thinking on the following two sentence:
"Yet another approach for querying is to use the Specification
pattern" ... "Even those Specification classes could very well spit
out IQuery"
Those are sentences from Jimmy Nilsson's book on DDD.
As much as I like the specification pattern and the possibility to
use it with repositories like this:
Rository r = new Repository();
Specification s = new LongNameSpecification();
User[] users = r.GetBySpec(s);
I have simply no idea, what should I do with the specification object
when it comes to real implementation when using some kind of data
mapper or a plain sql even.
Jimmy Nilsson states that Specification can spit IQuery (some kind of
Query Object). OK. If I had IQuery i can work with it, but how do I
get it? I cannot accept coding the same logic once in the
IsSatisfiedBy method and once to spit IQuery and I have no idea how
to do it otherwise.
Any suggestions?
--
Michal
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:
mailto:domaindrivendesign-***@yahoogroups.com
mailto:domaindrivendesign-***@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
domaindrivendesign-***@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
For some time I have been thinking on the following two sentence:
"Yet another approach for querying is to use the Specification
pattern" ... "Even those Specification classes could very well spit
out IQuery"
Those are sentences from Jimmy Nilsson's book on DDD.
As much as I like the specification pattern and the possibility to
use it with repositories like this:
Rository r = new Repository();
Specification s = new LongNameSpecification();
User[] users = r.GetBySpec(s);
I have simply no idea, what should I do with the specification object
when it comes to real implementation when using some kind of data
mapper or a plain sql even.
Jimmy Nilsson states that Specification can spit IQuery (some kind of
Query Object). OK. If I had IQuery i can work with it, but how do I
get it? I cannot accept coding the same logic once in the
IsSatisfiedBy method and once to spit IQuery and I have no idea how
to do it otherwise.
Any suggestions?
--
Michal
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:
mailto:domaindrivendesign-***@yahoogroups.com
mailto:domaindrivendesign-***@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
domaindrivendesign-***@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/