On Tue, Mar 27, 2012 at 12:45:14PM -0700, Richard Shank wrote:

> >Model hides storage, change storage and only the model needs to know
> >about it.

> Perhaps I wasn't clear enough on this. The abstract model class in
> the Model directory would contain code that is common across any
> type of persistence layer.

I'm with you here.

>  The model in MongoDB would inherit from
> the model in the Model directory, but implement code specific to
> MongoDB, ORM would also inherit from the model in the Model
> directory, but implement ORM specific code.

But here we disagree. Model should inherit the storage/persistence, not
like you describe it. 

Then I can always ask for and make new \Model\Foo in all my code and not 
having to ponder how it's stored, Entity, Document, REST, whatever which
would be \Entity\Foo and then later \REST\Foo when it's changed.

But this is a digression.

> The "but with the db specific model," goes with the next part of the
> sentence below. So I am saying I like having db agnostic code in the
> Model directory.

Good, sorry.

> I also think that we should be using the directory
> names "CouchDB", "ORM", "PHPCR", "Propel" and "MongoDB" for database
> specific models.

Except for "ORM" being "Doctrine" with that name scheme I can't think 
of any better solution to it. For some reason I have to admit it feels wrong
putting names in there but I cannot point my finger at it so I vote
for doing this.


Thomas.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" 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/symfony-devs?hl=en

Reply via email to