Thinking about what everyone has said here, I stepped back for a moment to ask why we are creating persistence models. I think about most of the models I have in the Entity or Document directory in a bundle and 99% of the time they look like this

class MySuperModel extends AbstractSuperModel
{
    protected $id;

    public function getId()
    {
        return $this->id;
    }
}


I also noticed that I'll extend that model in a bundle in the src directory and it almost always deals with mapping for embedded and referenced data. After thinking about this I realized this is because Doctrine mapping is based on a bundle, not a model. I realize that in order to avoid having everyone create their own mapping. This would be a good idea, if it could actually be accomplished, without having to do all of the extra voodoo that is required. Maybe the first step is to look at how we are mapping of the persistence layer. My initial thought is to be able to set up the mapping on a per model basis, but that may not take it far enough.

I like a lot of the ideas that are in the Uncle Bob video. The hardest thing for me to do is to not look at bundles in the way we've been doing them for the last couple of years. Speaking for myself, I probably need to quit looking at things as Symfony code and start looking at it as code that happens to plug into Symfony. I'll be playing with this over the next few days and I'll report what I come up with. Symfony is loosely coupled enough that we can come up with a better solution.

Richard


--
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