PDA

View Full Version : Best way to approach an application with login form



stefano
13 Dec 2010, 8:47 AM
Hi all,
I want to develop a reserved application where the users have to insert login and password to access to it.
Which is the best way to create this? I mean... is it better to have a window as login popup that disappear after the authentication and then show the main window, or is it better to manage the login task in the main window application with panels that appear only after the user insert login and password? Or something else?
Thank you!

Screamy
13 Dec 2010, 9:13 AM
Opinions will most-likely vary wildly, but here's mine:

I use a bare-metal index.html file which contains the core minimum ExtJs includes. The page renders a viewport and displays a self-centering login box. I use Ext.Window to house the login FormPanel, simply because I like the nice drop-shadow and look and feel of Ext's Windows.

I do a full-page/standard submit of the users credentials, where on success my Home page gets loaded, with its own viewport, tab panel, nav menu, etc.

In my case, I'm using Spring Security on the backend, where I've configured it to deny access to my app's /js/eyesonly folder unless you're an authenticated user. So this helps prevent prying eyes from accessing your JS source files unless they're a valid user of your app.