Specification Pattern vs Data Mapper
- From: "Mikeon" <mikeon@xxxxxxxxx>
- Date: 2 Feb 2007 01:52:34 -0800
Hello!
I find myself using specification pattern a lot lately, but in a
foreseaable future I will run in to following problem:
I'm using repositories as a way to abstract data access logic from my
model/domain code. There are simple methods defined on a repository
such as: GetAll, Add etc. There is also one additional method:
GetBySpecification which looks like this
MyObject[] GetMyObjectsBySpecification(ISpecification<T> spec);
nice as can be.From the model point of view, specification pattern is as clean and
The question is: what to do with the specification when it comes to
data access layer code i.e. the data mapper.
How do you translate specification into a data access layer specific
code i.e. into SQL statemenents?
--
Michal
.
- Follow-Ups:
- Re: Specification Pattern vs Data Mapper
- From: Jens Winter
- Re: Specification Pattern vs Data Mapper
- Prev by Date: Re: Domain Model and Service Layer
- Next by Date: Re: Domain Model and Service Layer
- Previous by thread: Adapter Pattern X Proxy
- Next by thread: Re: Specification Pattern vs Data Mapper
- Index(es):
Relevant Pages
|