Need to know the right coding practice in ZF2

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Need to know the right coding practice in ZF2

sanjaysnair
This post has NOT been accepted by the mailing list yet.
This post was updated on .
For a project I usually use different modules. Support I have API, Admin, Web app. I keep 4 modules. One for each part along with the default application module. I keep all models in the default Application module, and rest of the modules access model from Application module.
Is this the right practice?

I sometimes find it difficult to work with this.

Usually I need to keep different session for each of the modules. How do we achieve this. I usually end in having Application module session in all other modules (may be it traversing from  top to bottom module preference we set in application.config.php). How to deal with that? I have tried akrabatsession, not helpful for me.

Second we need different layouts for different modules. I have found some module to deal with that. But that causes probs in the API module, in which I do not require a layout to be displayed, because we have json output. Please let me know your ideas.

Please help me.

Thanks