Hey weaverryan,
thanks for you answer! Your description of organizing the source code opens my mind for the bundle system. The idea of decoupling the comments from the article and use them for other projects is really great. But as you mentioned my Blog project wouldn't be to big because it's only created for learning symfony 2 so i will start with putting the comments to the Article Bundle and in a second step move them out into an own bundle.

Best regards

Am 11.04.2011 14:52, schrieb weaverryan:
Hey there-

I'd say that both are fine. If you simply want to add comments to your
articles, I'd just start with having them inside the same bundle. The
advantage of having them in two bundles is more separation/
organization (and if your Blog bundle isn't too big, that's not a huge
concern) and being able to reuse *just* your Blog functionality
(without comments) or *just* your comment functionality (without the
Blog) in other projects.

So, I recommend putting them in the same bundle - you an of course
separate them into two bundles later if you need to.

Good luck!

On Apr 9, 6:02 am, nYmo<symf...@gregorpanek.de>  wrote:
Hi all,
i'm still in the learning process of symfony 2. For my learning
procedure i started to develop a small Blog application which should
include some basic articles,comments and admin interface and so on.
I'm not finished yet to read the whole symfony 2 book but read already
the chapter about bundles and some other stuff.

My main problem is now how to organize my src code in symfony 2 in a
bundle?

I will use for my description the article and comment behaviour. So
they have a one to many relation and i start to build my Articles. So
i put the under this folder structure:
/src
   /Blog
      /ArticleBundle

There i have my normal controller folder and so on. When I'm done with
the Articles i want to add the Comments for this Article. Now where
should i put the Code? Shoul i create a new Bundle called
CommentBundle?
/src
   /Blog
     /CommentBundle

or is it possible / is it the better way to put the src under this
structure
/src
   /Blog
     /Controller
       ->ArticleController.php
       ->CommentController.php
    /views
      /Article
      /Comment

What is the more convenient way?

Thanks in advance and kind regards

G.P



--
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to