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]
1  PureMVC Manifold / Demos and Utils / Re: StateMachine - A PureMVC / AS3 Utility on: January 08, 2009, 09:18:20
Seriously, that rocks  8)
Thanks for the email Darshan. I will update my demo and pass it along to you as promised.  Thanks everyone on this thread for their time!

2  PureMVC Manifold / Demos and Utils / Re: StateMachine - A PureMVC / AS3 Utility on: January 07, 2009, 02:31:23
I dug around a bit and saw this as well Jason. Thanks so much for your post  :) . It made me feel a bit better about my quick fix. Maybe it IS the best thing to do for now...I like the routing when using pipes/fab the way it is as well.  I was afraid however that for some reason unknown to myself, that removing the slashes would break something in its core functionality. This is not the case, WHEW! I am so glad these forums exist.
3  PureMVC Manifold / Demos and Utils / Re: StateMachine - A PureMVC / AS3 Utility on: January 07, 2009, 11:53:46
Yes, I agree some "regex" magic is needed to remedy this in the Fabrication package.  I want to use the state machine in a project I am doing now (that has a 30 day deadline) so went the route of a "quick fix" by just removing slashes in the event name. I see the point about pollution of notes/events.  I guess this is similar to the "addressing" of modules in a pipes application (I have done 2 now and will never go back to the single instance packages!).  I am going to go post on code drunks so both parties are aware.

Thanks for such prompt replies!

4  PureMVC Manifold / Demos and Utils / Re: StateMachine - A PureMVC / AS3 Utility on: January 07, 2009, 11:32:56
Yes I have had these thoughts too.  Underscores were my first choice.  I am going to talk to Darshan about it to see what he thinks. Until then I will work on the Fabrication sources as well to see what I can come up with.

Please understand that I was not taking issue with anything or saying it is a bad choice made, but merely pointing it out for the folks on these forums that are using Fabrication and may be running into issues.
5  PureMVC Manifold / Demos and Utils / Re: StateMachine - A PureMVC / AS3 Utility on: January 07, 2009, 10:20:32
This is a very nice edition so let me start by saying thanks to those involved with getting this put together. :D

In the last 6 months I have become very attached to the Fabrication code base that can be used to eliminate much of the need to write "glue" code in the mediators etcetera.  The State Machine is not exactly playing nice with this stuff and I really do not want to have to make a decision as to using one or the other (pureMVC+Statemachine as opposed to PureMVC+Fabrication).  Yes, I know, I want to have my cake and eat it too..then ride a rollercoaster and maybe go for a nice skateboard ride :P

The issue arises when you are trying to write your notification handlers in the mediator for your application.    With Fabrication, you don't need to use listNotificationInterests....you jsut write the handler out prefixed with "respondTo".

So a note called "userModelChanged" could be easily picked up in the mediator by writing up a function named "respondToUserModelChanged" and BAM you are off to the races.

Unfortunately the State Machine "changed" note name contains forward slashes and prevents us from using Fabrication.  I thought for a moment maybe I could just handle the state changed using "pure" pureMVC listNotificationInterests methods.   But Fabrication sees this and will not respond to other "respondTo" methods.

I REALLY wanted to continue usage of Fabrication along with this State Machine so I dug in and altered the Static constant for the "changed" name to be "stateChanged" instead of "StateMachine/states/changed".

This seemed to have no impact on the way the state machine operates and allowed me to write my "respondToStateChanged" and my originally needed "respondToUserProxy" handlers so Fabrication can do its awesome magic.

Of course I am now forced to use the uncompiled source, but hey!  It works!

 I have converted the StopWatch example to use Fabrication on top of pureMVC and the State Machine.
For some reason I also had to register the commands for them to execute. Could someone explain how the slash notation in the currentState.name is really meant to be used? I see other constants in the example using this notation and just wanted to be more clear about the impact of my own changes.

Thanks again!
6  Announcements and General Discussion / Public Demos, Tools and Applications / Scion microsite using PureMVC on: June 04, 2008, 12:49:26
Not for a slow machine but fun nevertheless. View all features for an easter egg.

http://www.scion.com/rsxd/
7  PureMVC Manifold / Demos and Utils / Re: Application Skeleton - A PureMVC AS3 / Flex / WebORB Demo on: May 30, 2008, 09:14:50
Hey there all,

Wouldn't it also be good to take it another step and have the mediator use a model reference passed in with a notification so that the model is always what you think it is when accessing its properties?  Just like view to view communication I was taught it was not a good practice and should be avoided if possible. 

I just finished a project for Toyota/Scion that uses PureMVC and only had 3 weeks.  Towards the last few days I had to do some "hot wiring" like this in order to not end up in a refactoring.  In the end it worked and the code will never be looked at by others or extended.  By hot wiring I mean mediator to mediator communication without using command/notification. I also had a case where I was talking to a model proxy through the facade instead of through a view notification reference.

I simply love how PureMVC helped me make it all happen in 3 weeks.  I do not think I could have stayed on track and kept the spaghetti to a minimum without it.  I am not a heavy 'patterns' guy but have adopted as much as I can to help keep my focus on functionality and design/interaction....instead of how my application will talk to itself.

I guess I am saying that stepping outside of your pattern usage is not too bad towards the end of a project that meets certain profile, but should be avoided as much as possible in the early stages.

Thank so much for this code base, it is truly a wondrous thing.

http://www.scion.com/rsxd/

(btw I work for Solution Set in San Francisco and was the lead developer)
Pages: [1]