Glad to see I'm not crazy :) With this thread this afternoon, I was like "oh ya, I still need to clean my DataServices code and put it in the ServiceLocator". And then I started the work and was like, how is this going to work, a DataService ain't so simple as RPC services. As you noted below it is much more "smart" since it has properties like 'commitRequired' and 'mergeRequired'... in my app those property are binded to controls to provide visual feedback to the user.
 
So my first thought was to wrap it in some class... like a delegate, but seems redundant, so still thinking....
 
Dimitrios Gianninas
RIA Developer
Optimal Payments Inc.
 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Steven Webster
Sent: Tuesday, July 11, 2006 5:32 PM
To: [email protected]
Subject: RE: [flexcoders] Cairngorm ServiceLocator and FDS

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

AVIS IMPORTANT

WARNING

Ce message électronique et ses pièces jointes peuvent contenir des renseignements confidentiels, exclusifs ou légalement privilégiés destinés au seul usage du destinataire visé. L'expéditeur original ne renonce à aucun privilège ou à aucun autre droit si le présent message a été transmis involontairement ou s'il est retransmis sans son autorisation. Si vous n'êtes pas le destinataire visé du présent message ou si vous l'avez reçu par erreur, veuillez cesser immédiatement de le lire et le supprimer, ainsi que toutes ses pièces jointes, de votre système. La lecture, la distribution, la copie ou tout autre usage du présent message ou de ses pièces jointes par des personnes autres que le destinataire visé ne sont pas autorisés et pourraient être illégaux. Si vous avez reçu ce courrier électronique par erreur, veuillez en aviser l'expéditeur.

This electronic message and its attachments may contain confidential, proprietary or legally privileged information, which is solely for the use of the intended recipient. No privilege or other rights are waived by any unintended transmission or unauthorized retransmission of this message. If you are not the intended recipient of this message, or if you have received it in error, you should immediately stop reading this message and delete it and all attachments from your system. The reading, distribution, copying or other use of this message or its attachments by unintended recipients is unauthorized and may be unlawful. If you have received this e-mail in error, please notify the sender.

__._,_.___

--
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