View Full Version : Question about creating one application for multiple users

21 Jan 2012, 4:03 PM
Hi there,

I'm working on learning Ext JS 4 and I have a general advice question:

I'm developing a web application that will have two different user interfaces for two different types of users. One for 'managers' and another for 'users'.

I'm considering building a single ext js 4 application with a viewport that has a 'card' layout. The first card displayed by default is the login prompt, and depending on what usertype the server indicates the user is, the application will display 1 of 2 panels that represents the interface for each user type.

Is this a typical scenario? And are there any pitfalls I'm not aware of? Thanks!

22 Jan 2012, 3:35 AM
If the two interfaces are completely disjoint, I do not see any reason to try and glue them together in an accordion panel. Why not remove the login panel and add the appropriate 'welcome' panel to your viewport on login?

For all purposes, I think that's simpeler?

BTW: Im not necessarily advocating two different sets html files, js and css files. If your application is small enough that would induce more effort then necessary imho.

22 Jan 2012, 11:53 AM
Thanks @flanders, I would have to assume the approach of dynamically adding views/panels depending on the login result is probably less resource intense than trying to load all of the views simultaneously in a card layout and only displaying one card depending on what type of user logs in.

22 Jan 2012, 1:20 PM
Exactly ;)

You avoid one level of nesting all the time, so thats worth something. And at startup (inital render time is important imho) you save time for the accordion plus all the panels you'll never show.