Hi,

First I'd like to say that I really liked the library and I'm willing
to contribute sometime in the future.
Also to give you guys some background, I come from PHP and .NET world
and I've started developing with Ruby about 3 / 4 months ago.
Latelly I've been apllying Domain Driven Design principles and ideas
in my projects and I'm willing to do the same with Ruby (probably with
Rails). I really like the expresiveness of the language and I think
that DDD would really benefit from it.

Right now, the only thing that I think would "hurt" DDD in Ruby
applications is that I couldn't find an ORM that doesn't implement
Fowler's Active Record pattern.
In DDD we follow the Single Responsibility Principle
http://en.wikipedia.org/wiki/Single_responsibility_principle (BTW I
think we should always try to follow it) and AR pattern violates that
since the entity is responsible for storing data and executing
business logic.

So my questions are:
  * Would it be hard to decouple CRUD operations from entities and
have something like (N)Hibernate session that holds identity map, does
CRUD and so on...?
  * Have you ever thought about these things and are there any plans
to do implement something like it?
  * If not, do you guys think that would be possible to maybe create a
plugin for that?

I hope you guys got my point but to make things even clear, I'd like
to decouple CRUD operations from entities and make those a repository
(http://martinfowler.com/eaaCatalog/repository.html) responsibility.
Then the repository would hold the reference to "DataMapper Session"
and delegate CRUD to it. This way I can have my domain model decoupled
from infrastructure "stuff".

I really like the way DataMapper works, I think it is much better than
Sequel and Rails ActiveRecord and that's why I am here, I think it can
be a good start to do the things that I said.


Thanks for the nice library!

Regards,
--
Fábio Rehm

PS: Since english is not my native language, I hope you guys
understand me well. If you don't, just let me know and I'll try to do
it better next time.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to