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] 3 4
16  Announcements and General Discussion / Getting Started / Re: Managing a lot of Proxys and Mediators on: December 10, 2009, 05:22:14
If the application is a gallery, I think I would stick with a component that displays thumbnails in whatever way, and let that have a meditor that plugs it into the system.

I would not have a mediator for each thumb since these would be a natural subcomponent of a thumbnail list display. I see no need for a bunch of thumb mediators. Treat them as subcomponents of a list display and communicate through events (which you can just bubble up to the GalleryMediator).

On the other hand I would have a ImageDisplay with its own mediator that recieves notifications from a GalleryMediator (probably passing a ImageVO). Then the two displays are completely seperated which makes sense in my opinion.

17  Announcements and General Discussion / General Discussion / Re: Remove and Add Notifications Interests after registeration on: November 27, 2009, 04:22:45
I think my thoughts on it would be;

If you alter the notification interests at runtime you're essentially maintaining some form of state logic in your mediator. If the main purpose of a mediator is a view components "plug" into the system, then you don't want that kind of logic there.
Your meditator only mediates messages to and from the system, and if some notification is irrelevant under certain circumstances then that could be handled easily by a statefull view component, right?

This way the mediator is "clean", meaning it has no view relevant logic, and your view component continues its lifespan with states.
18  Announcements and General Discussion / General Discussion / Re: How to solve this thingy in an elegant way? on: August 27, 2009, 02:34:18
In an application that needs special fonts for every single label/textfield, yes I would make the method for getting a textfield with a given textformat static, and let view components get the information themselves.

I'm not sure it's considered good practice (since it makes the view components dependent on the factory), but it is very handy. 
19  Announcements and General Discussion / General Discussion / Re: How to solve this thingy in an elegant way? on: August 25, 2009, 12:14:13
Why would you use a Command to do factory work? Isn't that a bit like forcing a PMVC "paradigm", on the problem?

Couldn't you have a factory or builder that could construct your labels or whatever, and have a command create and/or populate that factory with css, fonts a.s.o (and make the methods for retrieving from the factory static, since every view component potentially needs a label)?
20  Announcements and General Discussion / Getting Started / Re: Number of mediators registred? on: August 20, 2009, 10:29:39
Ok, unfortunately I'm using the Flash CS4 IDE for compiling (and FlashDevelop for coding). But thanks for the reply :)
21  Announcements and General Discussion / Getting Started / Number of mediators registred? on: August 19, 2009, 04:39:29
Hi All

I am doing an app that constantly registers mediators and throws them away again, and for debugging I would like to see if the total number of mediators registred increase (which they shouldn't in my app).

Is there a way of asking the facade how many mediators are currently registred?

I'm sorry if this is a documented feature I've overlooked.

22  Announcements and General Discussion / Getting Started / May a view component load swfs? on: August 13, 2009, 01:22:55
Hi All

I've previously asked whether a view component can load it's own external images without breaking best practices or not. The answer was that it could.

Does the same go for swf files that implement an interface that allows the view component to control them?

I'm thinking the external swf's are subcomponents of a specific view component.

23  Announcements and General Discussion / General Discussion / Re: Using more commands. on: August 10, 2009, 01:06:30
I am curious because my understanding of MVC was that the view simply gathers the user input (or presents model data for the user) and have the controller actually process the user input?

What I've translated that into in PureMVC terms is by example;

A user requests data by a button input (the view component). The mediator sends a notification which is registred with a command that processes the request (even if it is just a proxy.getRemoteData(someID) ), and has the model (proxy) update the data, parse it, and send a notification which is listened for by the mediator.

Is this an unneccesarily complicated procedure? Are you arguing in favor of removing the command and having the mediator call proxy.getRemoteData(someID) itself?

From a fanatically purist perspective, only the View should receive notifications from the Model.

What would be the purists argument for such practice?

24  Announcements and General Discussion / General Discussion / Re: where to put a global dictionary on: July 27, 2009, 01:12:26
Hi Cliff

In this case there are only a handfull phrases. They are used for button labels like "more info", and stuff like that. Other than that translations are "pages" in a backend system and loaded as part of specific page data. The only reason for "globalising" some phrases are to make life a bit easier on the web admins.

Thank you for your input :)
25  Announcements and General Discussion / General Discussion / where to put a global dictionary on: July 23, 2009, 07:13:30
Hi All

I have a project where the various view components need to reference a global dictionary for common phrases (like "more info") - the site is versioned for more than one language.

The question is where to put this object.

My plan is to the have the method to retrieve a phrase as a public static method, so everybody can access it, and I was thinking I would keep it in my "contants" folder, and populate it from the proxy that loads all the globals for the site.

Does that make sense?

26  Announcements and General Discussion / General Discussion / Re: Object pool used by view components on: July 18, 2009, 12:59:55
That sounds like a good idea, thanks.

Where would you put factories in the folder structure? Even if it constructs view related objects is it really a view? Or would you have a factories folder (on previous projects I would have at "builders" folder)?
27  Announcements and General Discussion / General Discussion / Object pool used by view components on: July 16, 2009, 06:54:31
Hi All

I have a potential monstrous amount of text fields being created and removed at runtime, and they all need a non-system font, which means that I need a TextFormat object for all my text fields.
So I thought I'd just create a TextFormat object for each color and size and font (instead of one per text field) and reference them instead of creating new ones.

My problem is where to keep them. Would it be ok to store them in a Proxy and let a given view components mediator fetch the TextFormat object when needed?

28  Announcements and General Discussion / Getting Started / Re: notifications, commands and mediators on: July 13, 2009, 08:52:48
That makes sense. It's just that I feel like notification names are piling up in my ApplicationFacade. I've seen example projects that put notification names on Proxies (I think), and I've seen suggested that you put notification names in a seperate file?

I guess I'm looking for at way of ordering the notification names, and thought I could cut a corner by using just one under certain circumstances :)
29  Announcements and General Discussion / Getting Started / Re: Can view components load images? on: July 12, 2009, 11:58:09
Oh ok, I get what you're saying now :)
30  Announcements and General Discussion / Getting Started / Re: Can view components load images? on: July 12, 2009, 10:02:13
Tek > Why do you load it in the mediator, I was under the impression that a mediator should do nothing more than mediate?

Sammi > I was thinking about a gallery where a list of images is loaded when the callery is requested. My own perspective is the same as yours, that the view component should be able to load the images it needs - the list from which it gathers information on which images to load on the other hand I have in a Proxy.
Pages: 1 [2] 3 4