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
|
Pages: 1 ... 8 9 [10] 11
|
137
|
PureMVC Manifold / Standard Version / Re: Calling Proxy from Mediator...
|
on: February 28, 2009, 06:27:21
|
Does your proxy itself or the object it controls retrieve the concerned data from a remote server or using any asynchronous call ? If not you can call the proxy exactly as you want with : retrieveProxy("YourProxyName").getSomeData() . It respects MVC, the "view" knows the model and as right to access its data like this.
If the proxy object need to do some asynchronous call behind the proxy magic, you need to use a notification. But only interested mediators will receive the notification that the data has been received. Look at "listNotificationInterests" Mediator method for details.
|
|
|
140
|
PureMVC Manifold / Bug Report / Re: Bug when calling toString on Notification
|
on: February 14, 2009, 06:50:33
|
Thanks again.
It will become :
o.toString = function()/*String*/ { var msg/*String*/ = "Notification Name:" + this.getName(); msg += "\nBody:" + (( this._body == null ) ? "null" : this._body.toString()); msg += "\nType:" + (( this._type == null ) ? "null" : this._type); return msg; }
Already fixed in the trunk.
I have added PureMVC_JS/bin/PureMVC_JS_1_0_1.js to the trunk. It is updated with your fixes.
I will check the forum often next days as it seems you are working on something new with it.
|
|
|
142
|
Announcements and General Discussion / Architecture / Re: 1000 Sprites /w data. Mediator for each? Memory?
|
on: February 14, 2009, 04:46:24
|
>I would then need to keep track of the nodes and edges in a Dictionary and do a lookup each time a get an event. No you don't need because the data which you fill your component already exists in a *Proxy* object. So it will not consume more memory, nor it will consume more CPU, it is exactly the same as used alone.
>Maybe a better question than my original is would there ever be a need to have one mediator and proxy for each 1000 nodes/edges.
No you may definitively not do that. You can at least have multiple mediators but here I'm sure you only need one proxy.
You need to create a component as smart as possible to be able to receive an XML (or anything else) with sufficient informations for each node to tell the cell that display related informations what to do when clicked. If this informations depends on the application state, you just have to update the item related to the node it in the proxy when needed.
It is possible to create a mediator for each node you have, but keep this idea as long as possible and try to better develop a smart component.
|
|
|
143
|
Announcements and General Discussion / Architecture / Re: 1000 Sprites /w data. Mediator for each? Memory?
|
on: February 13, 2009, 02:50:13
|
The mediator pattern is thought to manage one or many objects. There in PureMVC, one *Mediator* object can manage as many as *View* object you need it to manage.
In your case the mediator will receive each node event, identify the node by its index and transmit a notification to inform the whole app that a node has been clicked, give its index and acts in consequence.
|
|
|
144
|
Announcements and General Discussion / General Discussion / Re: Shared model between Javascript <-> Flex ?
|
on: December 24, 2008, 04:29:03
|
I have worked on a proof of concept that uses an Actionscript PureMVC Proxy and a Javascript proxy. Each proxy uses both the same interface. Each one offer the same access to specific data, but one could use Javascript model or Flash model, the application didn't know anything about it. Each uses External Interface to access the real business object on the other side. This way the application do not have to communicate specific instances between Javascript and Flash because you share the same model. I simply create a new Proxy for each business object I need to share, one on each side.
In my proof of concept, the Javascript side did not have any user interface, but I think that if needed, you can use a Flash or Javascript mediator that mediate the other side view(s).
In my POC commands are unique for each side, but mediator from a side can modify the model to implicitely send a notification to the other side (strict MVC usage). It is probably not a good solution when you need to execute a consequent number of clearly determined commands from one side to the other. The better solution is, I suppose to use PureMVC multicore where Javascript is one ore more plug-in with a specific development to extend the PureMVC pipes utility to let it works with External Interface.
|
|
|
145
|
Announcements and General Discussion / General Discussion / Re: What are the benefits of using pureMVC over a hand coded MVC?
|
on: November 30, 2008, 09:44:05
|
A good reason is to use a standard framework that any of your colleague working on the same project will understand immediately. To be honest, regarding my own usage, this reason was even more important than using MVC itself. It gives the good tool to start the right communication between coders. Here, as a bonus, with PureMVC we can even communicate over multiple languages.
Another reason to use PureMVC more than your own implementation is because it is widely recognized as a good implementation for everyday use and because it has many tools dedicated in many languages. In one word, it will help you to code faster.
|
|
|
148
|
Announcements and General Discussion / General Discussion / Re: Multiple project deployment
|
on: October 26, 2008, 06:31:31
|
You also can use a common project and two other projects that use it directly as a library in your development environment. I don't know the language you use, but it works for Flex and Java, I suppose it can work for almost anything that PureMVC supports. I use this configuration since a long time with Actionscript 2/3 and SVN, it's effective.
I've never use the "svn:externals" of Cliff's solution, I will give a try asap.
|
|
|
|
|
|