What is the best way to implement a log in screen in an ExtJS Application (preferrably without having to redirect the user to a new page)?
The two ideas I have come up with so far are as follows:
- A card layout inside a viewport where the first item is the login screen and the second item is the main application. Switch cards on log in / log out and of course validate all actions on the server side.
- A view port that contains a login window. When the user logs in the log in window is removed from the view port and is replaced by the main application. Vice versa when the user logs out. Again all actions will be validated on the server side.
At least in my opinion, option one seems better. Does anybody have any reccomendations as to which option to use, other options, or modifications to my options?
I implemented option two for my site and I am happy with the results.
It is effective. All components in the main application do check with the server to make sure the user is actually authenticated before rendering based on data retrieved from the server. The main layout is fairly simple, where it is either in a signed-in state, or a need-to-sign-in-state, where different components are registered with Viewport based on the state.
I would have to try the card layout option to give an informed opinion on if it is better than 2 but they seem fairly similar to me.
Macy