Advertisement
Pooky

Untitled

Sep 6th, 2011
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. For example: I have OrderController and there is action Open which show data about order. There is three groups of user - admin, user and quest. Each of them have another layout and little bit application logic.
  2.  
  3. Which is better?
  4. 1 : Create for example 3 actions like : adminOpenAction, userOpenAction, questOpenAction which every store only small piece of code and url will be very descriptive and can use ACL for authentazition becouse only specific use can access this action.
  5. 2 : Create one action which store whole logic - openAction and three view files - admin-open,user-open,quest-open. There will be only one action bat there must be whole logic in if and else structure and also validation for unauthorized access.
  6. 3 : Same as 2 bat create only one view which is really messy...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement