Hey Mike,
 
So that's an interesting question you ask; our intention for ServiceLocator is support for the RPC services in Flex ... at least that is the heritage of the ServiceLocator from Flex 1.5, and that's how we've personally been using it in Flex 2.
 
For the Flex Data Services apps that we're building, we're still chewing around on a number of different approaches, and haven't yet reached a conensus on what we consider "bestest-practice"; there are so many different use-cases. 
 
My instincts are that data services don't need to be declared on the ServiceLocator, and that managed collections are more akin to "intelligent model" objects; that if a command is used to manipulating a model (via the model locator) onResult of an RPC call, it makes sense in the data services world that a Command no-longer needs asynchronous result handlers, but can instead optimistically manipulate a model (a collection with data services) within the execute() method of a command.  So a command still updates the model, and binding notifies the view - so the "MVC" approach we achieve in Cairngorm still holds.
 
This then begs the question of where you define/create/initialise/etc your collections; is that the ServiceLocator, or is it somewhere else.  Jury is still out for me.
 
I'm as keen to hear your thoughts as you may be to hear ours.  It still "feels" right to me that the ServiceLocator remains "RPC only", but I can be convinced with a good argument.
 
Thoughts ?
 
Steven
 
 
Steven Webster
Practice Director (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UK
p: +44 (0) 131 338 6108
m: +44 (0) 7917 428 947 
[EMAIL PROTECTED]

 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Mike_Robinson_98
Sent: 11 July 2006 19:17
To: [email protected]
Subject: [flexcoders] Cairngorm ServiceLocator and FDS

Is it possible to define a <mx:DataService> in the ServiceLocator or
is ServiceLocator useful only for <mx:RemoteObject> and
<mx:WebService>? In the examples I have seen you retrieve a service
from the ServiceLocator with something like this:

ServiceLocator.getInstance().getService("ordersService");

However, the getService() method returns an AbstractService which only
WebService and RemoteObject extend.

Is there some other mechanism to be able to use a DataService within
the ServiceLocator? The getInvokerService method also does not look
like it is useful for this purpose.

Thanks,
Mike

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to