On 03/27/2012 05:29 AM, Thomas Lundquist wrote:
On Mon, Mar 26, 2012 at 01:31:05PM -0700, Richard Shank wrote:
I was looking at PHPCR and noticed that we are developing a conflict
for the location of the db specific models. Right now we have
CouchDocument for CouchDB, both Document for both MongoDB and PHPCR,
Entity for ORM, Propel for Propel and typically Model for db
agnostic model code, which is often an abstract class inherited by
the db specific model.
Which is the opposite way of what I'd like it to be (and trying to do).
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. 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.
Should we look at creating a best practice naming system?
Personally, I would like to see Model stay in the same capacity, but
with the db specific model,
Please, no. No storage specific code in Model at all please.
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. I also think that we should be using the directory
names "CouchDB", "ORM", "PHPCR", "Propel" and "MongoDB" for database
specific models.
perhaps we should be using CouchDB, ORM,
PHPCR, Propel and MongoDB. In the future, any additional dbs that
are supported, like Amazon's SimpleDB, would go into the directory
SimpleDB.
This is a good idea as loing as it's kept under another directory like
suggested in the other answer to your mail, i.e. storage/ or presistence/
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