|
|
Show Posts
|
Pages: 1 [2] 3 4 ... 17
|
16
|
Announcements and General Discussion / Getting Started / Re: Big Picture Question about Views
|
on: September 29, 2009, 06:05:47
|
More or less, that's right. You only need to mediate where data is being fed into a component or view. A ScrollBar doesn't have data, per-say (by data I mean information coming from a backend). For instance, if you had a list control, you could mediate the list because you are likely to feed data from the backend into the list. There's no need to mediate the scrollbar on the list, the list control handles that and keeps it's logic encapsulated within the control.
|
|
|
17
|
Announcements and General Discussion / Getting Started / Re: Is it ok for a mediator to make calls like this?
|
on: September 25, 2009, 06:18:35
|
Your first solution is acceptable, and often the preferred, solution. Mediators can talk directly with Proxies for simple gets and sets. I only use commands when I need to transform data before sending it to the view, or when I need to perform any action that will be called from multiple Mediators. When you simply want to check for a boolean value being set or do a direct pull of data, a command is overkill. Just have the Mediator call the Proxy directly.
For the second question, I think the same applies. If you are not transforming or manipulating the data, then just call you getData() method from the Mediator. You'll quickly become bogged down with commands if you try to funnel every single interaction through them (Cairngorm anyone?). Commands are better used for complex operations or things that will be reused by mutiple actors.
|
|
|
19
|
Announcements and General Discussion / General Discussion / Re: Presenting at Adobe MAX 09 on PureMVC
|
on: September 22, 2009, 06:18:46
|
So as a last min surprise it turns out a work mate and I are going to Max again this year after all. I'm looking forward to the framework talk. I'm very curious to see what people see as issues with PMVC vs the other frameworks.
As a side note, where you the guy hanging with Cliff in the room just before the pirate radio last year? If so, I was the guy who showed up early but left to go get my laptop at my hotel. I watched from there since there wasn't an easy way to see what was going on during the radio show at that hotel conference room...
.. now that I think about it, I think it was a guy from Ribbit that I talked to, not Kindling. Anywhoo...
|
|
|
21
|
Announcements and General Discussion / Architecture / Re: FInal State Machine..need feedback on FSM definition for videoplayer
|
on: September 08, 2009, 06:56:20
|
Just for reference sake, here is the FSM definition I use for my video player.
// Create the FSM definition var fsm:XML = <fsm initial={MediaPlayerConstants.STARTING}> <!-- STARTUP THE MEDIA PLAYER --> <state name={MediaPlayerConstants.STARTING}> <transition action={MediaPlayerConstants.MEDIA_LOAD} target={MediaPlayerConstants.MEDIA_LOADING}/> <transition action={MediaPlayerConstants.STARTUP_FAILED} target={MediaPlayerConstants.FAILING}/> </state> <!-- Media Loading --> <state name={MediaPlayerConstants.MEDIA_LOADING} changed={MediaPlayerConstants.LOAD}> <transition action={MediaPlayerConstants.MEDIA_PLAY} target={MediaPlayerConstants.MEDIA_PLAYING}/> <transition action={MediaPlayerConstants.MEDIA_STOP} target={MediaPlayerConstants.MEDIA_STOPPING}/> <transition action={MediaPlayerConstants.MEDIA_PAUSE} target={MediaPlayerConstants.MEDIA_PAUSING}/> <transition action={MediaPlayerConstants.MEDIA_LOAD} target={MediaPlayerConstants.MEDIA_LOADING}/> <transition action={MediaPlayerConstants.MEDIA_LOADING_FAILED} target={MediaPlayerConstants.FAILING}/> </state> <!-- Media Playing --> <state name={MediaPlayerConstants.MEDIA_PLAYING} changed={MediaPlayerConstants.PLAY}> <transition action={MediaPlayerConstants.MEDIA_PAUSE} target={MediaPlayerConstants.MEDIA_PAUSING}/> <transition action={MediaPlayerConstants.MEDIA_STOP} target={MediaPlayerConstants.MEDIA_STOPPING}/> <transition action={MediaPlayerConstants.MEDIA_MENU} target={MediaPlayerConstants.MEDIA_MENU_SHOWING}/> <transition action={MediaPlayerConstants.MEDIA_END} target={MediaPlayerConstants.MEDIA_STOPPING}/> <transition action={MediaPlayerConstants.MEDIA_LOAD} target={MediaPlayerConstants.MEDIA_LOADING}/> <transition action={MediaPlayerConstants.MEDIA_PLAY_FAILED} target={MediaPlayerConstants.FAILING}/> </state> <!-- Media Pausing --> <state name={MediaPlayerConstants.MEDIA_PAUSING} changed={MediaPlayerConstants.PAUSED}> <transition action={MediaPlayerConstants.MEDIA_PLAY} target={MediaPlayerConstants.MEDIA_PLAYING}/> <transition action={MediaPlayerConstants.MEDIA_STOP} target={MediaPlayerConstants.MEDIA_STOPPING}/> <transition action={MediaPlayerConstants.MEDIA_MENU} target={MediaPlayerConstants.MEDIA_MENU_SHOWING}/> <transition action={MediaPlayerConstants.MEDIA_LOAD} target={MediaPlayerConstants.MEDIA_LOADING}/> <transition action={MediaPlayerConstants.MEDIA_PAUSE_FAILED} target={MediaPlayerConstants.FAILING}/> </state> <!-- Media Stop --> <state name={MediaPlayerConstants.MEDIA_STOPPING} changed={MediaPlayerConstants.STOPPED}> <transition action={MediaPlayerConstants.MEDIA_PLAY} target={MediaPlayerConstants.MEDIA_PLAYING}/> <transition action={MediaPlayerConstants.MEDIA_PAUSE} target={MediaPlayerConstants.MEDIA_PAUSING}/> <transition action={MediaPlayerConstants.MEDIA_LOAD} target={MediaPlayerConstants.MEDIA_LOADING}/> <transition action={MediaPlayerConstants.MEDIA_MENU} target={MediaPlayerConstants.MEDIA_MENU_SHOWING}/> <transition action={MediaPlayerConstants.MEDIA_STOP_FAILED} target={MediaPlayerConstants.FAILING}/> </state> <!-- Media Menu --> <state name={MediaPlayerConstants.MEDIA_MENU_SHOWING} changed={MediaPlayerConstants.MENU}> <transition action={MediaPlayerConstants.MEDIA_PLAY} target={MediaPlayerConstants.MEDIA_PLAYING}/> <transition action={MediaPlayerConstants.MEDIA_STOP} target={MediaPlayerConstants.MEDIA_STOPPING}/> <transition action={MediaPlayerConstants.MEDIA_PAUSE} target={MediaPlayerConstants.MEDIA_PAUSING}/> <transition action={MediaPlayerConstants.MEDIA_LOAD} target={MediaPlayerConstants.MEDIA_LOADING}/> <transition action={MediaPlayerConstants.MEDIA_MENU_FAILED} target={MediaPlayerConstants.FAILING}/> </state> <!-- REPORT FAILURE FROM ANY STATE --> <state name={MediaPlayerConstants.FAILING} changed={MediaPlayerConstants.FAIL}/> </fsm>;
|
|
|
22
|
PureMVC Manifold / Standard Version / Re: Register Mediator
|
on: September 03, 2009, 09:48:50
|
If I understand your structure correctly, you have an AppControlBar that is a child component of another that has some kind of deferred instantiation, right? If this is the case, then why not just have the parent components mediator create and register the child [AppControlBar] mediator if/when the component becomes avalaible? It's quite appropriate to have mediators register other mediators for child components. See the Hello Flash demo for an nice simple example of mediators registering other mediators for children.
|
|
|
24
|
Announcements and General Discussion / General Discussion / Re: How to solve this thingy in an elegant way?
|
on: August 27, 2009, 06:21:25
|
Have you looked at how Flex and the Flash UI Components handle this? I borrowed ideas from both Flex and Flash for my component framework. My base component handles most of the styling (getStyle() and setStyle() etc) using a singleton StyleManager. The style manager is what I use in my proxy's to store the style info. I do a similar thing for Fonts using a FontManager singleton. This allows me to use my components in any framework, no direct ties to PMVC at all.
I use a XML based style sheet. My Proxy parses the XML and sets the groups/styles on the StyleManager that is later called by the base of each component to get and set style information for that component. I use a className variable to handle inheritance. As each level of the component heirchy is loaded, I have the base component call a query on the StyleManager for any styles matching "TabBar" for eaxmple. As it walks up the herichy (parent may be just "ButtonBar") it grabs styling for each level of the component. It checks along the way for which styles are allowed to override the children and which are not. This is the same concept as Flex style inheritance.
There's more to it that just that, but that is kind of the jist of it.
|
|
|
27
|
PureMVC Manifold / MultiCore Version / Re: One proxy for all modules
|
on: August 21, 2009, 09:32:44
|
Make the GlobalDataVO a Bindable class, and remember that all modules have the *same reference*, the one held by the GlobalDataProxy in the ServiceModule. -=Cliff>
Just to play devil's advocate for a min; I thought this was considered a big no-no since it only applies to Flex? Wouldn't this require putting a [Bindable] statement into a Proxy class?
|
|
|
28
|
Announcements and General Discussion / General Discussion / Re: Presenting at Adobe MAX 09 on PureMVC
|
on: August 20, 2009, 06:51:23
|
Here's my $0.02 on the subject. It's too bad I won't make it to Max this year, last years was pretty good. Hardest concepts for people to grasp initially - Pipes (I relalize it's a utility but very necessary when working with Multicore)
- Notifications
- Mediator/Proxy responsabilities
Order on introduction: - Facade
- Mediator
- Proxy
- Multicore
Coverage: The most common things I see on the forums often center around the responsabilities of a Mediators (and what should stay in components), and to a lesser extent, what Proxies handle. Community: I think the biggest is the quality of help and utilities. Unlike other frameworks/forums, there is not a lot of "fluff". There is not 10 utilities for doing the same task, there's one quality utility that everyone tries to contribute there efforts to (be it helping debug or giving suggestion on features).
|
|
|
|
|