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

Show Posts

* | |

  Show Posts
Pages: [1] 2
1  Announcements and General Discussion / Public Demos, Tools and Applications / Re: Just launched a driving game DEFEND THE DOME .COM on: January 29, 2010, 03:15:28
Season is over so they shutdown the site, I moved it to our dev server

2  Announcements and General Discussion / Public Demos, Tools and Applications / Re: Just launched a driving game DEFEND THE DOME .COM on: August 31, 2009, 10:41:14

Thanks cliff, its been a fun project!
3  Announcements and General Discussion / Public Demos, Tools and Applications / Just launched a driving game DEFEND THE DOME .COM on: August 28, 2009, 02:27:28
We just launched (18 minutes ago)


you get to drive an Ford F150 or Ford Flex from Flowery Branch to the georgia dome avoiding sofas, ladders, rocks and cars :)

It looks like flash, but is flash graphics with flex "doing the work", its all of course pureMVC, and uses the following :

  • pureMVC
  • fabrication
  • The finite state machine (FSM)
  • google's flash analytics swc
  • google code bulk loader (modfied to load fabrication modules)
  • clearspring for social networking
  • blood, sweat and tears :)

Its probably got some bugs, that we'll be fixing in due course.

Grant Davies
4  PureMVC Manifold / Demos and Utils / Re: Finite State Machine - FSM entering/exit notifications vs "system" notifications on: August 25, 2009, 05:48:43
due to the overwhelming responses :)  I've created two constants classes

DTDChallengeNotifications  (this is for "system" or "regular" notifications)
DTDChallengeStateChangeNotifications ( this is for exiting/entering/change notifications)

So far so good, and I have to say the FSM is saving me tons of complexity that I had without it.
5  PureMVC Manifold / Demos and Utils / Finite State Machine - FSM entering/exit notifications vs "system" notifications on: August 24, 2009, 11:16:57
I'm having a bit of a naming challenge with the FSM and its naming conventions.

Referring to the stopwatch demo

* When the FSM enters its STATE_READY,  the entering notification is RESET_DISPLAY - "resetDisplay"
* The command ResetDisplayCommand then call the proxy, proxy.resetTimer();
* The proxy updates the internal timer, and then sends the notification RESET -"StopWatchProxy/notes/reset"
* when this then picked up by ApplicationMediator, which gets the current elapsed time which the view is bound to.

The question I have, is both RESET_DISPLAY and RESET are notifications, but all the constants with "note" in the path ("notes/reset" are processed by commands, all the notifications without note ("reset") are processed by mediators.  There seems to be some sort of implied "domain" here, and I'm trying to keep my own app clean and following this convention.

I can see that by making the command process the state entering notification it can tell the proxy to update "data" and the proxy's notification then allows mediators to update the display as a result of business logic (by the command) and data changes (as a result of the proxy).

But if we had to "name" the notifications that the proxy is dispatching, what would we call them, since they ARE different from the notes that FSM is dispatching and the commands are registered for ?

Realisically whats the difference between the app mediators "reset" and the facades "notes/resetTimer"  seems like in a complex app this type of overlap is inevitable and could be very confusing since notifications are not for commands or mediators, they are consumed by anyone, so I'd see it very easy for someone to have their mediator listen for "notes/resetTimer" instead of just "reset" by accident on a larger team.

Is there some convention where "notes" from the FSM's entering/change/exit states would be named differently to the apps "view related" notes not just in the class they are defined in, but how they are defined ?


6  Announcements and General Discussion / Fabrication / General practice for "daisy chained" notifications on: August 03, 2009, 10:46:16
Hey guys,

I'm looking for some guidance/best practice here, I seem to be running into a common pattern in the larger pureMVC apps we create ( >300 hours), and I don't like the "ad hoc" solution I seem to be using.

A simple example :

I have a shell application for a set of games, the user can choose which game to play, when various "events" in the app occur, a game may loose "focus", the games are implemented as fabrication modules so I'm dispatching events to modules using routeNotification, I have the shell manage focus as follows :

  • The shell captures focus when someone clicks on the main application
  • The shell knows which game is active through the ShellGameProxy
  • When the main view receives a mouse click, it dispatches a notification ShellConstants.SHELL_REQUEST_FOCUS
  • The FocusRequestCommand, receives this notification and looks at the ShellGameProxy to see which game is active, when it determines that, it routes a notification directly to that module using MODULE_REQUEST as the note name, and RESUME_FOCUS as the note type
  • The modules all have their own ModuleRequestCommand, it receives the MODULE REQUEST, and the switches on the RESUME FOCUS, it then re-dispatches so it can figure out what to do with as MODULE_RESUME_FOCUS, the ModuleFocus command, receives this and determines if the module should receive focus and if so sends a RESUME_FOCUS notificaiotn, the GamePlayMediator is listening for this and tells the main view to "take" focus.

The thing I don't like is I have the shell sending focus resume notifications that differ from the module's resume focus notifications so that the module's can process the request in a command to make a decisions rather than the notification going directly to the mediator and affecting the view without any "businesss logic"

But I feel like I'm daisy chaining notifications and changing their names just so that I can control "who" hears them, and it feels "messy".

shell gets focus -> shell sends focus to module -> modules receives request and figures out if it needs focus -> modules sends focus to its mediator which applies it to the view

I seem to have

SHELL_REQUEST_FOCUS as notificaiton
GAME_RESUME_FOCUS as notification

This seems to occur a lot on large apps where some "action" requires a few decisions and information to be "passed around" before a final "do it" notification can be dispatched for a mediator to actually apply.

Any thoughts would be most welcome :) ???

7  Announcements and General Discussion / General Discussion / Re: Multiple "dependencies" for state machine "change" on: July 15, 2009, 04:06:18
ok thanks.
8  Announcements and General Discussion / General Discussion / Re: Multiple "dependencies" for state machine "change" on: July 13, 2009, 06:12:37
Thanks Cliff, is it "ok" to have multiple state machines ?  I have quite of few different things to keep state of that somewhat "do their own thing" in parallel.
9  Announcements and General Discussion / General Discussion / Multiple "dependencies" for state machine "change" on: July 12, 2009, 06:31:51
I've finally got round to looking at the FSM implementation and really like it for a project I'm game I'm working on that has has a lot of states.

couple of questions

1) can you have as many FSM's as you need ?  They are just separated by the states they are listening for ?  I would need a state manager for some game "overlays" like highscore, login, prizes and a different manager that manages where you are in the game, and they both run in parallel.

2) I load quite a few modules to run the game, one module has a game in it, another has the games videos and another has the games dialogs/overlays.  I can't be "ready" until these modules have loaded, it doesn't seem that the FSM is involved in this issue, i.e. it needs to know when an action takes place, but if I had 3 modules that had to be loaded before the the state RUNNING would be entered, it seems its up to me. The state could be INITIALIZING but after I've loaded 3 modules I could send the ACTION INTRODUCE_GAME and the new state would be INTRODUCING.  Is this "roughly" how it should be done ?  I've been trying to avoid some dependency mechanism for all my modules both being loaded and initialized, but looks like I need to suck it up :)

10  Announcements and General Discussion / Public Demos, Tools and Applications / Re: Cheerwine brand website built with flex, flash and pureMVC on: July 08, 2009, 11:14:52
Yeah, I love broccoli being a witch :)

Good cop, Naked Cop, is just wrong :)
11  Announcements and General Discussion / Public Demos, Tools and Applications / Cheerwine brand website built with flex, flash and pureMVC on: July 08, 2009, 07:42:14
hey guys,

I meant to put this up a while ago, but we built the new cheerwine brand website using Flex, Flash, pureMVC, fabrication and modules.  Its a bit of a "pig" since the creative really wanted some crazy stuff that wasn't super optimized, but its looks good and is a lot of fun.  Make sure you click around and try and dicover the hidden items, like clicking on the beach and clicking the moon etc.

for the geek side we used

clearspring social networking
the google code bulk loader (which we hadded fabrication module loading support to)
Flex component toolkit for Flash
Tweelite library

and probably a bunch of other things I've forgotten :



› b l u e t u b e i n t e r a c t i v e
.: Rich Media Solutions :.
.: Flex, Flash, Air and Rich Internet Application Development :.
.: grant davies :.
.: 404.428.6839 (c) :.
.: 678 500 9147 (skype) :.
.: 404.921.9550 (f) :.
› grant@bluetubeinteractive.com
http://theresidentalien.typepad.com/ginormous [blog]

12  Announcements and General Discussion / Fabrication / Re: Fabrication - Simplified PureMVC multicore modules on: January 21, 2009, 10:16:47
Is there a summary of what has changed from the first version of fabrication to this latest one?  I'm using the first version in a rather large project and need to evalute if we should upgrade.  The main issue we are having is modules not being unloaded properly but that could be more of a flex/garbage collection issue.  We implemented a group module loader that uses the fabrication module loader but loads multiple modules based on an xml file, maybe there have been fixed to the fabrication module loader we could do with ?

I'm surprised to see this is still not hosted within the pureMVC site/repository as a Utility. Not being rude, but it would be nice to see everything in once place in the same format as the other fine utilities.

13  Announcements and General Discussion / General Discussion / Re: Where to put some url parsing code - proxy or command ? on: January 21, 2009, 07:13:45
thanks for the feedback,

So that led me to create a "parseURLSegments" method to my command.  The reason I did this is if I send a notification to have another command do this, then the primary command can't complete all its business logic until the URLSegmentParsingCommand had completed its job and I find I end up in a "daisychaining" command cycle which although it works, its quite complex to follow when you are later doing maintenance.

lets say I have the following

PageChangeCommand - Fired as a result of a swfObject event, decides if the page really changes, and then has to parse the url arguments and store them so they can be sent to appropriate modules.

If its "all" self contained here, it works great, however if I was to break to up amongst commands

PageChangeCommand - Fired as  a result if SwfObjectEvent, figures out if the page changed and then fires a "parseURLArguments" notification, also needs to set a state on a proxy to say "we are changing pages, we just don't have all the data we need yet"

ParseURLCommand - parses the URL segments and stores them in a hashmap, then fires a "urlSegmentsParsed" notification

UrlSegmentsParsedCommand - checks the proxy to see if a page change was in progress, and checks to see the url segments are parsed, and now says 'ok' we'll actually change pages.

Which way would you go, or do you have another solution ?

14  Announcements and General Discussion / General Discussion / Where to put some url parsing code - proxy or command ? on: January 15, 2009, 05:45:22
Hi guys,

I have a fairly sizable portal architecture built with pureMVC and I'm working on the deep linking section and trying to figure out "where" to put some logic.

I get a notification that the page has changed and I need to parse the url parameters and store them in a proxy and then determine if I need to go to a new "page" in the system or if some url parameters changed e.g. a new video needs to be loaded.

The parsing of the url parameters needs to involve two proxies since one proxy has the list of parameters that are valid and the other proxy stores a hashmap of the results.  It seems that this code could go in a command like a URLParameterParserCommand but that just seems "not quite right" to me, mediators are for managing views and proxies should do business logic, so I'm back to "should a command do it?".

the other thought is to add it to the proxy and have the proxy do the parsing since the command is doing the business logic that determines the parsing should be done.

any thoughts would be appreciated :)

15  Announcements and General Discussion / Fabrication / Re: Fabrication - Simplified PureMVC multicore modules on: October 16, 2008, 11:57:29
Pages: [1] 2