Re: [flexcoders] Re: Cairngorm FDS Sample

2007-02-27 Thread Douglas Knudsen

"remoteobject which requires FDS"
RemoteObject use in CF does NOT require FDS.

DK


On 2/26/07, auddaraj <[EMAIL PROTECTED]> wrote:


Thanks for getting back & posting your sample, Jeff.
Yes Cairngorm store uses remoteobject which requires FDS, however
they don't make you data management services. I would be intersted
if any one might have any tips or sample app using data management
services with Cairngorm.


--- In flexcoders@yahoogroups.com, Jeffry Houser <[EMAIL PROTECTED]> wrote:
>
>
>   I thought that any use of RemoteObject was accessing Flex Data
> Services (or a ColdFusion server).  The Cairngorm Store 2.1 uses
> RemoteObject and therefore must be using Flex Data Services.
>
>   I also converted the Cairngorm Store to work with a CF backend
if
> anyone is interested, download are more details are here:
> http://www.jeffryhouser.com/index.cfm/2007/2/19/Learning-Cairngorm-
Part-3 .
>
> At 02:53 PM 2/26/2007, you wrote:
>
> >Hi,
> >We are planning to use Cairngorm in our flex project which uses
FDS. I
> >tried looking around for samples that use FDS(not remoting) but no
> >luck. From www.cairngormdocs.org I am able to find number of
sample
> >that use webservices, remoting etc..
> >
> >Can anyone suggest a sample Cairngorm app that uses FDS(Data
> >services). I am trying to see how FDS methods like fill etc. fit
into
> >cairngorm model
> >
> >Thanks,
> >ANAND.
>
>
> --
> Jeffry Houser, Software Developer, Writer, Songwriter, Recording
Engineer
> AIM: Reboog711  | Phone: 1-203-379-0773
> --
> My Company: 
> My Podcast: 
> My Blog: 
> Connecticut Macromedia User Group: 
>





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







--
Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it?


RE: [flexcoders] Re: Cairngorm FDS Sample

2007-02-26 Thread Dimitrios Gianninas
Ok I'll chime in here since I use FDS with Cairngorm. Examples taken from the 
first Flex 2.0 app we built.

First off we initialize the DS in the model that it relates too:

public class ConsumerModel {

   public var consumerDS:DataService;

   

   public function ConsumerModel() {
 consumerDS = new DataService( "consumerDS" );
 consumerDS.autoCommit = false;
 // set other properties first
   }
}

Then in the commands that we need to, we use the DS to perform the operations 
that the command requires, as an example update:

public class SaveConsumerCmd {

   public function execute( event:CairngormEvent ):void {
 ...
 var token:AsynToken = ConsumerModel.getInstance().consumerDS.commit();
 token.addResponders( this );
   }
}

Now the examples are simple, but working with a DataService and a RemoteObject 
is different. So I don't use delegates, but because u can set responders for 
each operation, thus u can have every command handle each DataService operation 
as it sees fit.

Hope that helps,

Dimitrios Gianninas
Optimal Payments Inc.



-Original Message-
From: flexcoders@yahoogroups.com on behalf of billy_d_white
Sent: Mon 2/26/2007 4:49 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Cairngorm FDS Sample
 
So far I'm finding that using FDS mixed with Cairngorm is pretty
difficult.  

1. When I define my services in the services.xml file, if I specify
'autoSyncEnabled' in the XML declaration, it throws a null pointer
exception.  It looks to me like things are getting initialized out of
order.

2. I've had to specify fault handlers in the services.xml file if you
want to user 'fault' attributes in the service declaration tags.  If I
do not do this, then some errors do not get handled at all, even if I
have a fault handler method declared correctly on my responder (ie my
calling command)

3. Many of the solutions I read about on this forum that show how to
handle calls to the backend in FDS are not easily applied to a
Cairngorm structure.  For example, it is hard to call
service.revertChanges in my fault routine because my fault handler
method is in my command object and the service call is made in my
delegate object.  I have to create a reference to the service using
the ServiceLocator solely to call revertChanges in the event of a fault.

Anyone else experience these problems using FDS and Cairngorm
together?  If not, I'd love to see some examples showing me what I'm
doing wrong. 

Thanks

--- In flexcoders@yahoogroups.com, "auddaraj" <[EMAIL PROTECTED]> wrote:
>
> Thanks for getting back & posting your sample, Jeff.
> Yes Cairngorm store uses remoteobject which requires FDS, however 
> they don't make you data management services. I would be intersted 
> if any one might have any tips or sample app using data management 
> services with Cairngorm.
> 
> 
> --- In flexcoders@yahoogroups.com, Jeffry Houser  wrote:
> >
> > 
> >   I thought that any use of RemoteObject was accessing Flex Data 
> > Services (or a ColdFusion server).  The Cairngorm Store 2.1 uses 
> > RemoteObject and therefore must be using Flex Data Services.
> > 
> >   I also converted the Cairngorm Store to work with a CF backend 
> if 
> > anyone is interested, download are more details are here: 
> > http://www.jeffryhouser.com/index.cfm/2007/2/19/Learning-Cairngorm-
> Part-3 .
> > 
> > At 02:53 PM 2/26/2007, you wrote:
> > 
> > >Hi,
> > >We are planning to use Cairngorm in our flex project which uses 
> FDS. I
> > >tried looking around for samples that use FDS(not remoting) but no
> > >luck. From www.cairngormdocs.org I am able to find number of 
> sample
> > >that use webservices, remoting etc..
> > >
> > >Can anyone suggest a sample Cairngorm app that uses FDS(Data
> > >services). I am trying to see how FDS methods like fill etc. fit 
> into
> > >cairngorm model
> > >
> > >Thanks,
> > >ANAND.
> > 
> > 
> > --
> > Jeffry Houser, Software Developer, Writer, Songwriter, Recording 
> Engineer
> > AIM: Reboog711  | Phone: 1-203-379-0773
> > --
> > My Company: 
> > My Podcast: 
> > My Blog: 
> > Connecticut Macromedia User Group: 
> >
>



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

AVIS IMPORTANT
--