I do the same thing you do...I need to load and hold some global app data at 
the very start. I refer to this as static data, card types, countries, states, 
etc... This is normal for an app to have this data, so I just created a model 
called GlobalModel.as that holds this stuff for me. I hope you are referring to 
the same thing, perhaps you want to give some details on the data you are 
referring too? Maybe them will be able to give out a better answer.
 
Dimitrios Gianninas
RIA Developer
Optimal Payments Inc.
 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Oliver 
Tupman
Sent: Friday, January 12, 2007 10:04 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Cairngorm 2.1 & temporary 'stuff'



Hi all,

I've just finished re-coding an application so that it uses Cairngorm 2.1, and 
was wondering what other people did in a few situations that I came across.

In Cairngorm the general idea is for the view to be bound to the model, or for 
some code that watches for changes to the model and then updates the view. The 
commands update the model, the stuff watching the model updates the view. 
That's great, but what does everyone do for transitory parts of their workflow, 
for something that comes and goes quite quickly? 

For example, I have an initialisation routine that needs to set various bits 
and pieces up in the application. I display a small window to the user 
informing them of this process (I don't want to use the preloader). To me, the 
Cairngorm methodology says to put some sort of initialisation status data in 
the model, perhaps an array of tasks that need to be completed before the 
application is ready to roll. My initialisation window should then watch these 
items in the model. 

To me it seems a tad wrong to put data that is required on a one-off basis into 
the model, though I can't quite put my finger on what's bad about it. Perhaps 
the fear that the model will become a dumping ground for every piece of data, 
regardless of the lifetime of that data. Has anyone got another way of doing 
this sort of thing or any thoughts on the matter? 

Another similar area that I'm curious about is the subject of presenting alerts 
to the user. A simple example is warning the user about deleting something on 
the server that will result in other items being deleted too. Let's say that 
the user decides to delete something from within the Flex app, the app queries 
the server asking whether it's possible OK to delete it, the server says not 
quite and so the app must ask the user what to do. I think that a command in 
there is going to have to present the user with an message of some description. 
I'd rather not tie a command to the Alert class because I may want to use some 
sort of custom class to display the message at a later date. 

Anyone any ideas on that? The thought that pops into my head is to have some 
sort of factory class that the command accesses to get some sort of alerter, 
one of which could wrap/extend Alert, another could be a custom alerter class. 
Or perhaps it would be better to make use of the ViewLocator? 

Cheers,

 Oliver Tupman. 

 

-- 
WARNING
-------
This electronic message and its attachments may contain confidential, 
proprietary or legally privileged information, which is solely for the use of 
the intended recipient.  No privilege or other rights are waived by any 
unintended transmission or unauthorized retransmission of this message.  If you 
are not the intended recipient of this message, or if you have received it in 
error, you should immediately stop reading this message and delete it and all 
attachments from your system.  The reading, distribution, copying or other use 
of this message or its attachments by unintended recipients is unauthorized and 
may be unlawful.  If you have received this e-mail in error, please notify the 
sender.

AVIS IMPORTANT
--------------
Ce message électronique et ses pièces jointes peuvent contenir des 
renseignements confidentiels, exclusifs ou légalement privilégiés destinés au 
seul usage du destinataire visé.  L'expéditeur original ne renonce à aucun 
privilège ou à aucun autre droit si le présent message a été transmis 
involontairement ou s'il est retransmis sans son autorisation.  Si vous n'êtes 
pas le destinataire visé du présent message ou si vous l'avez reçu par erreur, 
veuillez cesser immédiatement de le lire et le supprimer, ainsi que toutes ses 
pièces jointes, de votre système.  La lecture, la distribution, la copie ou 
tout autre usage du présent message ou de ses pièces jointes par des personnes 
autres que le destinataire visé ne sont pas autorisés et pourraient être 
illégaux.  Si vous avez reçu ce courrier électronique par erreur, veuillez en 
aviser l'expéditeur.

Reply via email to