Hi Florian,

Thanks for the heads up for DoctrineUserBundle(https://github.com/
knplabs/DoctrineUserBundle). The code layout there makes a lot of
sense to me. It's clean and consistent. One that thing that confuses
me is the files in Document and Model directories are *exactly* the
same, not sure why.... Any idea?

I love the the dependency injection part of the framework. Like this
ORM config file: 
https://github.com/knplabs/DoctrineUserBundle/blob/master/Resources/config/orm.xml
Nice and clean! Makes sense.


On Dec 7, 9:31 am, Florian <[email protected]> wrote:
> Hi,
>
> Short answer, from my little experience on the framework:
>
> You're true, some bundles are outdated, due to the fact things are
> moving fast, and the documentation is impacted too.
> So a lot of old slides are showing some examples that simply doesn't
> work!
>
> You should always follow changes on recent bundles and/or follow the
> framework commits itself ( github ).
> That's where you will find the best answers.
>
> Now, concerning best practices on Namespaces and naming conventions,
> it is still discussed by the core team, so don't forget it's still PR,
> even not beta!
> BUT, some bundles like DoctrineUserBundle are very specific on a few
> things like DAO, so I think it's normal there is no default naming or
> conventions.
>
> On 7 déc, 01:24, Flukey <[email protected]> wrote:
>
> > I've been doing a lot of fiddling around with Symfony2 (latest PR4
> > release) and reading a lot of it's documentation (I've read pretty
> > much all of it)
>
> > The problem i'm faced with now, are the best practices.
>
> > I've looked at many of the bundles/projects source on
> > symfony2bundles.org and they all have different ways of managing their
> > entities, repositories, different file structure etc.
>
> > For example, some have entity classes but no repositories. Some have
> > repositories, entities and interfaces to repositories. There doesn't
> > seem to be any best-practice consistency across all of the projects.
> > Should I put my queries in a repository class and keep it in the
> > entities folder or move it to a model folder? Should I always create
> > interfaces? When doing a doctrine query, should I always use the
> > NoResultException if a query returns null? or should I use something
> > different? I appreciate that some of the bundles/projects are old and
> > they've become outdated because of all the new changes applied to the
> > current version.
>
> > The forms part of the framework interests me greatly but there doesn't
> > seem to be much documentation (particularly for twig form templates).
> > I also don't know if I should put my form configuration in my entities
> > class or create a new model class? or should I create the form in an
> > action?
>
> > Also, from reading a presentation (http://www.slideshare.net/jwage/
> > symfony2-and-doctrine2-integration) i'm confused about actions. In
> > this slideshow it says the action should extend the
> > sfDoctrineController. Should I use that?
>
> > From looking at the framework, I can clearly see that the symfony team
> > have done a fantastic job. It's very impressive. I know it's early
> > days and I shouldn't expect too much documentation....but there
> > doesn't seem to be a little project which uses Doctrine2 and Twig
> > Forms which has been confirmed as a good project for learning best
> > practices from. (It would be great if a Symfony2 version of 'jobeet'
> > is written up)
>
> > I know it's look like i'm ranting folks but it's just a bit
> > frustrating to look at multiple bundles/projects to see they all have
> > a different file structure and code patterns. It's incredibly
> > confusing. I'm stuck between a rock and a hard place. It's a shame
> > because I *really* want to get up to speed on the framework so come
> > March 2011 when it's due to be released i'll be ready to go and start
> > developing production-ready applications.
>
> > What are your thoughts?  Are you experiencing any of the same
> > confusion?
>
> > Thanks muchly!
>
> > Jamie

-- 
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 users" 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-users?hl=en

Reply via email to