2012/5/10 Matt Jones <al2o...@gmail.com>:

> I believe most developers would regard the second form as more 
> understandable, especially if they were new to the codebase.
>

Yes they will ;)

> In the case of hobofields, there was the additional need to have 
> more-specific type information for use by code that essentially generates 
> forms on-the-fly at application load time. This arguably makes it *more* 
> database-agnostic, since code that reflects on field types isn't tied to 
> ActiveRecord::Base.columns.
>

Sometimes it seems that RoR active record implementation is not an
Object Relational Mapper but rather a one-way Relational->Object
Mapper, in the sense that it maps database columns to object methods
and not the contrary overexposing persistence to the external world.
Model declared fields should be to columns what Classes are now to
tables.

The fact that AR requires an encapsulation of the functionality of
persistence in business objects does not mean that we must strengthen
all kinds of coupling to the persistence layer.
Separation of concerns is a good idea if we can have it without make
things too complex.

Maurizio

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to rubyonrails-core@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-core+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to