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 ... 13 14 [15] 16 17
211  Announcements and General Discussion / Fabrication / Re: Fabrication 0.4 released on: October 20, 2008, 07:19:06
One more minor question/curiosity.

Is there a reason FlashApplication extends MovieClip rather than Sprite? MovieClip tends to carry a lot of extra code that isn't needed. Just curious. I can change my local copy to extend Sprite instead of MovieClip but was curious if there was a specific reasoning for it.
212  Announcements and General Discussion / Fabrication / Re: Fabrication 0.4 released on: October 20, 2008, 06:16:44
Jason,
However, If you intend to use Reflexive notification interests, you will need to extend FlashMediator/FlexMediator. Moving forward this is going to the key integration point for new Mediator specific features.

I'm using Pure AS3 for the moment so the Reflexive Notes aren't much use to me. But I'll keep in mind that future features will be added to the mediator and update my files accordingly. Thanks for the input.
213  Announcements and General Discussion / Fabrication / Re: Fabrication 0.4 released on: October 18, 2008, 11:21:07
There is no need for the JunctionMediator at all. The routing of pipe messages happens entirely underneath the system.

Sorry I may have mislead you with that statement. What I meant was the that we are replacing our old JunctionMediator with the Fabrication style mediator, but my other Mediators could remain the same (extending just Mediator) unless they needed the functionality of routing. Since my project is already well underway, I'm trying to add fabrication into my existing code and was just "speaking out load" about where I could avoid changing old code.
214  Announcements and General Discussion / Fabrication / Re: Fabrication 0.4 released on: October 17, 2008, 11:11:22
With the elimination of the ApplicationFacade, does one register all their commands in the StartupCommand now? So essentially the old ApplicationFacade has moved to the StartupCommand? I haven't tested yet, but I wonder how well the StartupManager utility will play with Fabrication. I think it should be fine.

Just trying to wrap my head around building large apps (many commands) using Flash with Fabrication. I assume only our old "JunctionMediator" mediator extends FlashMediator. The rest of our mediators still extend PMVC's Mediator unless we need the routing of Fabrication?

Just want to make sure I understand correctly.
215  Announcements and General Discussion / Fabrication / Re: Fabrication 0.4 released on: October 17, 2008, 09:43:44
Awesome news! Thanks, Darshan!
216  PureMVC Manifold / Standard Version / Re: The good logic for command ? on: October 16, 2008, 11:22:42
but you mean that you dont use binding ?

Sorry, I forget sometimes that the term "binding" means something in Flex, I'm an AS3 only guy. What I meant was that using Commands allows the View to access the Model without tying it directly to the Model. This allows you to change out the Model at anytime and reuse the View. But when you access the Model [Proxy] directly from the View [Mediator] that "binds" or "ties" the View to that particular Model.  Which is why I tend to use Commands and not access the Proxy in Mediators. I was only trying to illustrate one of the major roles a Commands has.

My point though was that you don't have to use Commands when dealing with Proxy-to-Proxy communications. You'd end up building tons of Commands just for your Model alone if you did, and this is unnecessary. Your Model should be walled off from your View, and vice-versa. But there's no need to add such separation between parts of your Model.
217  PureMVC Manifold / Standard Version / Re: The good logic for command ? on: October 16, 2008, 06:13:55
There's nothing wrong with Proxy's talking with other Proxy's, they are all part of the model and don't need to be partitioned from each other.

In my opinion, commands are best used in keeping the View from binding directly with the model (though some argue that using proxy's in Mediators is ok), and to handle domain logic as well as centralizing repetitive tasks used by multiple views.
218  Announcements and General Discussion / Fabrication / Re: Fabrication - Simplified PureMVC multicore modules on: October 15, 2008, 09:22:42
Any chance we can get a peak at the updated source code while we wait for it to be set-up in SVN? This is something I could really use in my AS3 project but waiting till it's in SVN might be too long for my project.

Again, great work and thanks for sharing this.
219  PureMVC Manifold / Demos and Utils / Re: Pipes - A PureMVC AS3 MultiCore Utility on: October 15, 2008, 06:15:15
I try to cover the difference in this thread. http://forums.puremvc.org/index.php?topic=457.msg3379#msg3379

There's no difference in using Pipes between Flex and Flash, the only difference is how you load modules since there is no Module class in as3. I gave a very simple example in the thread above on how to implement a module loader in as3. You might also look at the new Fabrication utility from Darshan  http://forums.puremvc.org/index.php?topic=681.0;topicseen since it covers the loading of modules AND applying pipes I believe.

There's also a new StateMachine Utility which us AS3 only guys might want to keep an eye on. http://forums.puremvc.org/index.php?topic=739.0
220  PureMVC Manifold / MultiCore Version / Re: When are we getting a Pipes demo on: October 15, 2008, 06:08:53
there's nothing on this link...
where is the as3 mvc multicore pipes sample?

http://trac.puremvc.org/Demo_AS3_MultiCore_Flex_PipeWorks

It's Flex and AS3, not as3 alone. They are more or less the same though. Very little difference in there use, only how you load modules.
221  Announcements and General Discussion / Getting Started / Re: Doub about sending that from view to mediator on: October 15, 2008, 06:06:57
Thanks for your reply.

What about sending the notification right from the event in the view?

Does this breaks the model a lot?

You shouldn't have PMVC code in your view components themselves, as this will bind your components to the particular app (by using the ApplicationFacade.NOTE_NAME). Best to have your mediator listen for the event, then have it dispatch the notification from there. This keeps your components oblivious to how those events are being used and thus making them reusable in other apps.
222  PureMVC Manifold / Demos and Utils / Re: Pipes - A PureMVC AS3 MultiCore Utility on: October 14, 2008, 07:29:20
The first class is a ModuleLoader "Component" (like the Flex SWFLoader), which the proxy uses to load the swf modules and then discard them after they return. The next time a module is loaded a new ModuleLoader class (component) is created. It just allows me to use the same ModuleLoader Class in other projects/areas since it has no ties to PMVC, unlike the proxy which basically proxies the calls through to the ModuleLoader and is able to listen and respond using PMVC specific notifications.

As I mentioned earlier, the process of adding and using pipes is identical to the Flex examples once you have the swf modules loaded. Make a ModuleMediator and have it lay the pipes (or send a message to your shell to lay them, up to you) whenever a notification is received of a new module being loaded. You can see this process, minus the dynamic modules, in the PipeWorks demo.

NOTE: I only quickly cut out portions of my classes to give as a guide, they are missing other parts that weren't quite relevant to what I was trying to explain so I wouldn't use them directly :)
223  Announcements and General Discussion / General Discussion / Re: How to manage multi-view in one mediator? on: October 14, 2008, 07:29:11
Oops, looks like I misread the question. I thought you wanted new instances of one mediator to handle each component. My bad.
224  Announcements and General Discussion / Getting Started / Re: Doub about sending that from view to mediator on: October 14, 2008, 12:49:23
I'm not sure I understand the question. What you have should work fine, passing the ItemId in the body of the notification, then the command using the body of the message and does it's thing.

If you mean how do you send the ID in the event, the simple answer is to create a custom event that has a variable containing the value.
225  Announcements and General Discussion / Getting Started / Re: Accessing properties on components from Commands on: October 14, 2008, 10:43:23
Sounds to me like it is something that should be saved in your model if it's being used in multiple places. Use Cliff's example above to set the value on the model when it changes, then later have commands request the info from the model when they need to "read" it.

I guess it depends on the level of importance the value has. The above might be overkill and probably shouldn't be done if the value is purely a view related value, you have to be the judge on that. The other option is to expose a getter on the Mediator that then gets it from the component. I don't see anything wrong with that if you only need one or two values like this. But if you need to read in multiple values and reuse them, I'd argue you are better off creating a VO and storing it in your model somewhere and updating/getting values from that.

A third option is to add listeners to the component in the mediator, and have it update a public var. Then commands read the var on the mediator but there's no direct access the component (since it got its value from the change event).

:
public var sliderValue:Number;

public function onRegister():void {
     viewComponent.addEventListener(Event.Change, onChangeHandler, false, 0, true);

}

public function onChangeHandler(event:Event):void {
     sliderValue = event.target.slider.value //probably use a custom event containing the value rather than direct access
}
Pages: 1 ... 13 14 [15] 16 17