Welcome Guest, Not a member yet? Register   Sign In
Different default controller and other things
#1

[eluser]Unknown[/eluser]
Hey folks,

my first problem:
I'm developing an application with kind of a entry point. The default controller is either the registration or your profile. How to achieve this effect? I don't want to use redirection (would look pretty messy to have "url.com/registration" and "url.com/profile").

2nd problem:
My application will consist of different elements (e.g. header, which consists of different elements (notifications, ...), content, footer, etc). I've got two different solutions: 1) HMVC, 2) Libraries. I think (1) is the better way, isn't it?

Thanks
#2

[eluser]TheFuzzy0ne[/eluser]
[quote author="nestex" date="1365717107"]Hey folks,

my first problem:
I'm developing an application with kind of a entry point. The default controller is either the registration or your profile. How to achieve this effect? I don't want to use redirection (would look pretty messy to have "url.com/registration" and "url.com/profile").[/quote]

What makes you say that? The condition here is basically whether or not someone is logged in. So why not have your default controller be a login/registration page, and if the user is logged in, redirect to their profile.

Let's look at this the other way. If a user was not logged in, what would happen? They'd be redirected to the login page, wouldn't they?

It's certainly possible to show one view in place of another, but are you sure that's what you really want? Most Web sites I know of have a separate login page and a separate profile page.

[quote author="nestex" date="1365717107"]
2nd problem:
My application will consist of different elements (e.g. header, which consists of different elements (notifications, ...), content, footer, etc). I've got two different solutions: 1) HMVC, 2) Libraries. I think (1) is the better way, isn't it?[/quote]

Either approach will work. It all depends on what you prefer.




Theme © iAndrew 2016 - Forum software by © MyBB