Open gonzalovilaseca opened 9 years ago
:+1:
i would not say "orm" and "odm" at all, cause this would mean to have two special managers of two doctrines (in the former doctrine view). So i would suggest a way to bekome more de-coupled like:
a way to connect Object
. That said it should be irrelevant if on object is an entity in the doctrine-orm view or a document from doctrine-phpcr, doctrine-mongodb ... or even the same.
@ElectricMaxxx I think orm
and odm
is really relevant as a concept of this domain.
@malukenho but you would depend on implementations again. To avoid that should be a major Task of this library. Yea i know: it would be a short term goal to have a library that is able to reference some kind of document to an entity (or back). But i think we should think in long term goals for this library.
@ElectricMaxxx I think I understand your point.
I think a way to connect Object
not express what really we want here. a way to connect Object
can be a PDO
connection or a mysql_connect resource
, and the orm
is a OBLÍQUOS LANGUAGE to describe exactly what we want. A orm
is a concept well defined.
Just a heads up on the current architecture I thought out:
$loader->find($type, $identifier, $unitOfWork)
(note that the UoW is passed in, as it is not a dependency anymore)This sort of approach allows for:
What is missing is some sort of "reference building", and I think $loader->getReference($type, $identifier, $unitOfWork)
would cut it here.
Can the context be rewritten with this concept of "loaders" in mind?
Can you explain further the concept of "reference building", please?
@gonzalovilaseca reference building is the "lazy proxy" stuff that we have ;-) Getting an object, but not reading from the DB (yet)
@Ocramius Ok, I see, thanks. Are you sure we should rewrite the scenarios with the 'loaders' concept? Isn't that an implementation detail, not a behavior?
@gonzalovilaseca it's the actual terminology that I want to use in future. Not sure if there is a better naming, but I didn't have nor currently have time to inspect that further
@Ocramius Ok, I see no problem in using that terminology in the implementation. So if the behaviour described in the feature file looks ok, how/where can I start working on implementing it?
Start from writing down the feature context and then writing a PoC that just works with it. No interfaces needed.
Marco Pivetta
On 16 March 2015 at 10:36, Gonzalo Vilaseca notifications@github.com wrote:
@Ocramius https://github.com/Ocramius Ok, I see no problem in using that terminology in the implementation. So if the behaviour described in the feature file looks ok, how/where can I start working on implementing it?
— Reply to this email directly or view it on GitHub https://github.com/Ocramius/ChangeSet/pull/28#issuecomment-81569937.
As discussed here ir the first PR to start discussion.