Welcome Guest, Not a member yet? Register   Sign In
Sub category
#11

[eluser]darkhouse[/eluser]
I'm talking about creating area to control the content of your site, whether it has a news/blog area, event calendar, photo gallery, or any other custom CMS items. I create an admin area to handle this, and the default controller is the gateway to the rest of the files. Now I've created my own authorization library which allows me to easily restrict anything I want, but I still need some sort of gateway, so I use the default controller in my admin folder.

I've been developing solutions for clients for 8 years now, and my approach has evolved over that time based on client requests and just exploring alternative ways of doing things. But, if there's a better way to handle this, I'm always open to suggestions.
#12

[eluser]Colin Williams[/eluser]
Well, there's a difference between the architecture of an application on the backend and how it appears to the user. Controller as gateway just seems like a bad approach.

A "controls" or "control_panel" or even "settings" controller would make more sense to me. Actually, what it is named really isn't the point. It's the role it serves that can get to be a problem.
#13

[eluser]darkhouse[/eluser]
I guess I don't understand how you display a login page to a user then. My thinking is that there needs to be SOME controller that loads a login view, and I use a default controller under an admin folder to achieve that. But if that's a bad way to do it, how should I be doing things?

Like everyone else, I'm here to learn, so that I can provide better solutions to my clients. That structure (admin folder, default controller, handle login) makes sense to me. But I want to do things properly also, so I'm always willing to learn something new.
#14

[eluser]Colin Williams[/eluser]
If your site/application has users, then it should have a "user" controller. So your login would be at "user/login"
#15

[eluser]darkhouse[/eluser]
What if it only has 1 user for the client to make changes. This is the case in most of my projects.




Theme © iAndrew 2016 - Forum software by © MyBB