Hey, maybe I can give you something to think about, it is not Module related, but either way, here are my 2 cents:
I asked myself the same question a month ago. And I go with, it depends... If you are in a company, where someone other than you has to do the support for that project, don´t force them to use different applications. If you have more then one project where support is needed the people around you demand a single application to go to. If they have to learn new ways of doing the same work for new projects it is not a good thing. My experience shows that will happen if you do admin stuff in the project. The next thing is safety, I will and can not guarantee that I make no errors. If you have really sensitive data, split the admin part from the rest. Better to be on the safe side :o I would go with 1. Greetings Marc -----Ursprüngliche Nachricht----- Von: natix [mailto:shizna...@gmail.com] Gesendet: Freitag, 12. Oktober 2012 16:05 An: fw-general@lists.zend.com Betreff: [fw-general] ZF2 Module / Application setup I am trying to get myself into ZF2 but the whole idea of Modules still seams to elude me. I have a admin section that is under its own domain (admin.example.com) and then I have a users section under www.example.com. In ZF1, I have always put each one in its own Module - so that I have a "admin" module with its own models, controllers, etc (same for the users module). Now in ZF2, it seams this idea has changed a bit and I am unsure of what would be the best way to go about it. The admin section isn't so much a CMS as it is a database data manager, but it still has many sections and the most complex stuff there. The users section just bring all the appropriate data together and displays it in a pretty layout. So, what would be the best way to structure my code? My ideas so far have been: 1) Create a separate Application for each section and only share the Zend library between them 2) Each section gets its own Module, the same way as I was doing with ZF1 3) Split things up into different Modules that are related. For example making a Companies module that has the controller for the admin section as well as the controller for the users section. #1 seams a bit...odd. Most of the configuration is the same for these sections so it seams strange to do it that way. #2 seams to make the most sense to me but I don't think this is the way modules were meant to be used in ZF2 #3 doesn't seam to make a lot of sense for me. How do I control access to the different controllers in each module, why am I loading the admin module when I just want the users module, etc etc. Although, from what I have been reading, this seams to be the way it was intended to be used I just dont see it as a good idea. If anyone can give me some advice I would be greatly appreciative. -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/ZF2-Module-Application-setup-tp4657549.html Sent from the Zend Framework mailing list archive at Nabble.com. -- List: fw-general@lists.zend.com Info: http://framework.zend.com/archives Unsubscribe: fw-general-unsubscr...@lists.zend.com -- List: fw-general@lists.zend.com Info: http://framework.zend.com/archives Unsubscribe: fw-general-unsubscr...@lists.zend.com