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.

Reply via email to