Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought

Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Author Topic: Application needs architecture  (Read 8861 times)
Full Member
Posts: 26

View Profile Email
« on: July 22, 2009, 09:38:14 »

I have problem with architecture of LiteFtpClient application(Flex/Multicore PureMVC, Pipes, StateMachine). You can see mockup below.

Initial window

Ftp address, username, password were entered. Application is in a process of connecting to the server(logging, getting directories), popup window is visible.

User can browse through files and folders in CONNECTED mode.

'New Folder' was clicked, popup window is visible

User is able to rename files, 'Rename' button was clicked

'OK' button was clicked in 'Delete File/Folder' popup window. 'delete item' request was sent to the server, application is waiting for response from the server. Popup window is still visible, 'OK' button is disabled.

I got following questions:

-should i create modules and StateMachines for each popup window? Maybe i am wrong, but i think it would be good to have FSMs(similar to that one below) for each popup window, application then can have States and SubStates.

-If i have modules for popups, when i should load them? Should i load modules one by one after user is successfully connected or maybe when for example, 'New Folder' button was clicked and popup window is about to be created.

- Do you add any view components into shell application? Should shell application only be responsible for loading, unloading, connecting and disconnecting modules?

-What are steps in your application development? Do you start with designing User Interfaces, Use Cases, States, etc?
I started with User Interfaces(screenshots) then i worked on States. Later i created SubStates, now i need modules since i have SubStates.

-How should i name modules, popup windows? DeletingModules or DeleteModule, FolderDeletingWindow...?

-How do you know how many modules you need? Is there any rule?
It looks like i need modules for states with substates.


Am i wrong?

I think i should have MainModule, BrowsingModule, DeletingModule and couple more for each popup windows.

MainModule, Main FSM Diagram, user is 'DISCONNECTED'.

BrowsingModule, Below FSM diagram can only happened when user(application) is in CONNECTED state.

DeletingModule, FSM Diagram for 'Delete' popup window

-Do you know any links to real world applications with source codes, any tutorials on how to architect this type applications?

I would like to to here your thoughts.

NOTE!!! Above application is for my practice purpose only(not for a client) and I will be happy to share source code with the community at the end.

Mariush T.
Global Moderator
Hero Member
Posts: 2871

View Profile WWW Email
« Reply #1 on: July 26, 2009, 11:19:51 »

I think your conception of the client into modules with sub-states is quite good and would be an excellent non-trivial example.

As for when to load the modules; for simplicity's sake you can actually just instantiate them within the shell as needed. I see no reason to load them at runtime, and for demonstration purposes, it would cloud the sub-state focus by complicating the Shell. If you wanted to demonstrate that as well, then I'd expand the FSM for the Shell to include LOADING and PLUMBING states.

You can keep all the code in the same project tree (see an example structure: http://forums.puremvc.org/index.php?topic=1308.msg6048#msg6048).

Pages: [1]