View Single Post
  #1 (permalink)  
Old 04-22-2008, 11:48 PM
albeva albeva is offline
Junior Member
 
Join Date: May 2007
Posts: 25
Default admin / public interface layout (modular, ...)

This is one thing I have not yet fully understood as what is the best practice to seperate two interfaces (public and admin) of the same web app. I have couple of ideas:
Have 2 modules - public and admin:
Code:
Application
   + Admin
      + controllers
         + IndexController, ArticlesController, ForumController, ...
      + views
      + models
   + Public
      ...
In this case I find that sharing models between 2 interfaces is combersome.

My other idea is to treat each type of the content page as a module (articles, forum, gallery) and have AdminController and PublicController files
Code:
Application
   + Articles
      + controllers
         + PublicController, AdminController
   + Forum
      ...
This approach allows to package modules and related files more closely together what I think is a plus. I am personally in favour of the second but would like to hear what other people think or what solutions have you used.

My 3rd idea is splitting both interfaces completely apart and use sort of common classes...
Reply With Quote