[flexcoders] AIR Application with multiple views

2011-12-20 Thread osmanullah
We have a pretty heavyweight AIR application. Now we are expanding our product 
and I need to deliver a lightweight version of our application depending on 
which user logs in. So depending on the user's permissions they could get the 
heavyweight application (current application) or a lightweight application (new 
application). The new lightweight application doesn't have any UI in common 
with the heavyweight one. It can use the same data model but the view is 
totally different. One is a fullscreen application and the other is going to be 
a small widget. 

I'm contemplating the best way to handle this. Currently my main application 
MXML file is hosting the entire application. I am thinking about refactoring 
this so the primary MXML file is just a splash screen and login screen, and the 
actual meat of the application is moved to a separate window. That way I can 
open the appropriate window once I get the user's credentials. This will take 
some refactoring (for example, I can not longer rely on Application.application 
to get the root window, I will have to add some basic window management) but I 
think it's doable.

I just wanted to get some other opinions from people who have have had 
experience with something like this, to see if there is a better way to do it.

So, is there a better way to do it? :)

Thanks



Re: [flexcoders] AIR Application with multiple views

2011-12-20 Thread mark . jonkman
I would look into using two modules loaded into the base application. Base 
application contains a login screen and based on results of login either load 
heavy weight module or load light weight module. 


Sincerely 
Mark R. Jonkman 

http://bitsbytesandsawdust.blogspot.com 

- Original Message -
From: osmanullah osman.ul...@gmail.com 
To: flexcoders@yahoogroups.com 
Sent: Tuesday, December 20, 2011 10:41:46 AM 
Subject: [flexcoders] AIR Application with multiple views 

We have a pretty heavyweight AIR application. Now we are expanding our product 
and I need to deliver a lightweight version of our application depending on 
which user logs in. So depending on the user's permissions they could get the 
heavyweight application (current application) or a lightweight application (new 
application). The new lightweight application doesn't have any UI in common 
with the heavyweight one. It can use the same data model but the view is 
totally different. One is a fullscreen application and the other is going to be 
a small widget. 

I'm contemplating the best way to handle this. Currently my main application 
MXML file is hosting the entire application. I am thinking about refactoring 
this so the primary MXML file is just a splash screen and login screen, and the 
actual meat of the application is moved to a separate window. That way I can 
open the appropriate window once I get the user's credentials. This will take 
some refactoring (for example, I can not longer rely on Application.application 
to get the root window, I will have to add some basic window management) but I 
think it's doable. 

I just wanted to get some other opinions from people who have have had 
experience with something like this, to see if there is a better way to do it. 

So, is there a better way to do it? :) 

Thanks 



 

-- 
Flexcoders Mailing List 
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt 
Alternative FAQ location: 
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links