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

Pages: [1]
Print
Author Topic: ServiceLocator RemoteObjects?  (Read 7671 times)
jgervin
Courseware Beta
Sr. Member
***
Posts: 50


View Profile Email
« on: May 21, 2009, 07:37:42 »

So how would you implement a Cairngorm style servicelocator in Puremvc?

I am thinking you would have some sort of "Main" proxy, for instance, I have a stage mediator that listens to the stage for certain things so maybe a StageProxy would be the best location for this servicelocator or would I create some sort of ServicesUtil.as that the StageProxy would then use to its liking?
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 on: May 22, 2009, 12:25:48 »

The idea of a StageProxy is a little whacky in an MVC sense. The Stage is a View tier entity, Proxies are Model tier entities.

If you wanted a ServiceLocator you could make one, but generally, we write the services directly into the Proxies that need them. The Proxies wrap the service and associated data. Essentially, the Model ends up being the ServiceLocator, because you retrieve the named Proxy from the service and make calls against it.

-=Cliff>
Logged
Gilbi
Full Member
***
Posts: 22


View Profile Email
« Reply #2 on: May 25, 2009, 10:21:01 »

I posted an example in the Utilities forum that uses ServiceLocator. It's janky junky though. Just use mx.rpc, your file size will be smaller also.
Logged
Pages: [1]
Print