Re: [flexcoders] Flex and REST

2009-09-04 Thread DannyT
For anyone else investigating this here's a collection of reading:

http://delicious.com/danny_t/flex+REST

It's not clear-cut by any means but I think you really need a better
understanding of what's going on on the server-side (does it accept POST for
each request, does it allow x-http-method-override etc).

2009/9/3 Richard Rodseth 

>
>
> The other issue is error responses. In the apps I work on we have specific
> XML or JSON result formats for application errors, which means the Flex app
> must handle those responses differently. If the service is using HTTP header
> error responses instead I believe the Flex app can't see them, though I
> forget the details.
>
> I assume you've seen this thread:
>
>
> http://stackoverflow.com/questions/153420/is-it-feasible-to-create-a-rest-client-with-flex
>
>
> On Thu, Sep 3, 2009 at 3:52 AM, claudiu ursica wrote:
>
>>
>>
>> If your Rest API is exposing XML you won't be needing any additional
>> libs... the HTTPService class will do just fine ...
>>
>> C
>>
>> --
>> *From:* Haykel BEN JEMIA 
>> *To:* flexcoders@yahoogroups.com
>> *Sent:* Thursday, September 3, 2009 1:45:11 PM
>> *Subject:* Re: [flexcoders] Flex and REST
>>
>>
>>
>> Anyone tried one of these libs?
>>
>> http://code. google.com/ 
>> p/as3httpclient/<http://code.google.com/p/as3httpclient/>
>> http://code. google.com/ p/as3httpclientl 
>> ib/<http://code.google.com/p/as3httpclientlib/>
>>
>> They seem to support all required http verbs.
>>
>> Haykel Ben Jemia
>>
>> Allmas
>> Web & RIA Development
>> http://www.allmas-tn.com
>>
>>
>>
>>
>> On Wed, Sep 2, 2009 at 12:55 PM, DannyT > .com
>> > wrote:
>>
>>>
>>>
>>> Can anyone give me the definitive answer to whether you can build REST
>>> based apps with Flex? There seems to be an incredible amount of FUD about
>>> the topic and whilst I appreciate it might not be supported in it's purest
>>> form I need to know what is involved in supporting a full REST
>>> implementation.
>>>
>>> I have no experience with REST but we're in the position that a client is
>>> going to implement a RESTful service for us to build a Flex application
>>> against. If it will 'just work' then great, if not I need to educate them as
>>> to any considerations/ workarounds necesscary on the service side of things.
>>>
>>> Can anyone offer any advice?
>>>
>>> Cheers,
>>> Dan
>>>
>>> --
>>> http://danny-t.co.uk
>>>
>>
>>
>>
>  
>



-- 
http://danny-t.co.uk


Re: [flexcoders] Flex and REST

2009-09-03 Thread Richard Rodseth
The other issue is error responses. In the apps I work on we have specific
XML or JSON result formats for application errors, which means the Flex app
must handle those responses differently. If the service is using HTTP header
error responses instead I believe the Flex app can't see them, though I
forget the details.

I assume you've seen this thread:

http://stackoverflow.com/questions/153420/is-it-feasible-to-create-a-rest-client-with-flex


On Thu, Sep 3, 2009 at 3:52 AM, claudiu ursica wrote:

>
>
> If your Rest API is exposing XML you won't be needing any additional
> libs... the HTTPService class will do just fine ...
>
> C
>
> --
> *From:* Haykel BEN JEMIA 
> *To:* flexcoders@yahoogroups.com
> *Sent:* Thursday, September 3, 2009 1:45:11 PM
> *Subject:* Re: [flexcoders] Flex and REST
>
>
>
> Anyone tried one of these libs?
>
> http://code. google.com/ 
> p/as3httpclient/<http://code.google.com/p/as3httpclient/>
> http://code. google.com/ p/as3httpclientl 
> ib/<http://code.google.com/p/as3httpclientlib/>
>
> They seem to support all required http verbs.
>
> Haykel Ben Jemia
>
> Allmas
> Web & RIA Development
> http://www.allmas-tn.com
>
>
>
>
> On Wed, Sep 2, 2009 at 12:55 PM, DannyT  .com
> > wrote:
>
>>
>>
>> Can anyone give me the definitive answer to whether you can build REST
>> based apps with Flex? There seems to be an incredible amount of FUD about
>> the topic and whilst I appreciate it might not be supported in it's purest
>> form I need to know what is involved in supporting a full REST
>> implementation.
>>
>> I have no experience with REST but we're in the position that a client is
>> going to implement a RESTful service for us to build a Flex application
>> against. If it will 'just work' then great, if not I need to educate them as
>> to any considerations/ workarounds necesscary on the service side of things.
>>
>> Can anyone offer any advice?
>>
>> Cheers,
>> Dan
>>
>> --
>> http://danny-t.co.uk
>>
>
>
>  
>


Re: [flexcoders] Flex and REST

2009-09-03 Thread claudiu ursica
If your Rest API is exposing XML you won't be needing any additional libs... 
the HTTPService class will do just fine ...

C





From: Haykel BEN JEMIA 
To: flexcoders@yahoogroups.com
Sent: Thursday, September 3, 2009 1:45:11 PM
Subject: Re: [flexcoders] Flex and REST

   
Anyone tried one of these libs?

http://code. google.com/ p/as3httpclient/
http://code. google.com/ p/as3httpclientl ib/

They seem to support all required http verbs.

Haykel Ben Jemia

Allmas
Web & RIA Development
http://www.allmas-tn.com





On Wed, Sep 2, 2009 at 12:55 PM, DannyT  wrote:

  >
>Can anyone give me the definitive answer to whether you can build REST based 
>apps with Flex? There seems to be an incredible amount of FUD about the topic 
>and whilst I appreciate it might not be supported in it's purest form I need 
>to know what is involved in supporting a full REST implementation.
>
>I have no experience with REST but we're in the position that a client is 
>going to implement a RESTful service for us to build a Flex application 
>against. If it will 'just work' then great, if not I need to educate them as 
>to any considerations/ workarounds necesscary on the service side of things.
>
>Can anyone offer any advice?
>
>Cheers,
>Dan
>
>-- 
>http://danny-t.co.uk
>

   


  

Re: [flexcoders] Flex and REST

2009-09-03 Thread Haykel BEN JEMIA
Anyone tried one of these libs?

http://code.google.com/p/as3httpclient/
http://code.google.com/p/as3httpclientlib/

They seem to support all required http verbs.

Haykel Ben Jemia

Allmas
Web & RIA Development
http://www.allmas-tn.com




On Wed, Sep 2, 2009 at 12:55 PM, DannyT  wrote:

>
>
> Can anyone give me the definitive answer to whether you can build REST
> based apps with Flex? There seems to be an incredible amount of FUD about
> the topic and whilst I appreciate it might not be supported in it's purest
> form I need to know what is involved in supporting a full REST
> implementation.
>
> I have no experience with REST but we're in the position that a client is
> going to implement a RESTful service for us to build a Flex application
> against. If it will 'just work' then great, if not I need to educate them as
> to any considerations/workarounds necesscary on the service side of things.
>
> Can anyone offer any advice?
>
> Cheers,
> Dan
>
> --
> http://danny-t.co.uk
>  
>


Re: [flexcoders] Flex and REST

2009-09-02 Thread claudiu ursica
Yes we did it using post and get only... And it works

C



From: Guy Morton 
To: flexcoders@yahoogroups.com
Sent: Wednesday, September 2, 2009 3:56:47 PM
Subject: Re: [flexcoders] Flex and REST

   
Many REST-ish APIs just use POST and GET anyway, as support for other HTTP 
verbs can be patchy.



On 02/09/2009, at 10:10 PM, claudiu ursica wrote:

  > 
>
>
>TO go RESTfull you'll have to use all teh methods like GET, POST, PUT,  
>DELETE, which is kind of hard to do. You probably end up using lots of post 
>from flex, even instead of get... You still can build the REST api and use it 
>like that only with GET and POST... not 100% rest but will work...
>
>C
>
>
>
>
>
>

From: DannyT 
>To: flexcoders@yahoogroups.com
>Sent: Wednesday, September 2, 2009 2:55:31 PM
>Subject: [flexcoders] Flex and REST
>
>  > 
>Can anyone give me the definitive answer to whether you can build REST based 
>apps with Flex? There seems to be an incredible amount of FUD about the topic 
>and whilst I appreciate it might not be supported in it's purest form I need 
>to know what is involved in supporting a full REST implementation.
>
>I have no experience with REST but we're in the position that a client is 
>going to implement a RESTful service for us to build a Flex application 
>against. If it will 'just work' then great, if not I need to educate them as 
>to any considerations/ workarounds necesscary on the service side of things.
>
>Can anyone offer any advice?
>
>Cheers,
>Dan
>
>-- 
>http://danny-t.co.uk/
>
>
>
>

   


  

Re: [flexcoders] Flex and REST

2009-09-02 Thread Guy Morton
Many REST-ish APIs just use POST and GET anyway, as support for other  
HTTP verbs can be patchy.



On 02/09/2009, at 10:10 PM, claudiu ursica wrote:



TO go RESTfull you'll have to use all teh methods like GET, POST,  
PUT,  DELETE, which is kind of hard to do. You probably end up using  
lots of post from flex, even instead of get... You still can build  
the REST api and use it like that only with GET and POST... not 100%  
rest but will work...


C



From: DannyT 
To: flexcoders@yahoogroups.com
Sent: Wednesday, September 2, 2009 2:55:31 PM
Subject: [flexcoders] Flex and REST


Can anyone give me the definitive answer to whether you can build  
REST based apps with Flex? There seems to be an incredible amount of  
FUD about the topic and whilst I appreciate it might not be  
supported in it's purest form I need to know what is involved in  
supporting a full REST implementation.


I have no experience with REST but we're in the position that a  
client is going to implement a RESTful service for us to build a  
Flex application against. If it will 'just work' then great, if not  
I need to educate them as to any considerations/ workarounds  
necesscary on the service side of things.


Can anyone offer any advice?

Cheers,
Dan

--
http://danny-t.co.uk







Re: [flexcoders] Flex and REST

2009-09-02 Thread DannyT
Okay so as I understand it, it is not possible for Flex (or Flash) by itself
to be RESTful "out of the box". This is possibly due to Flash Player working
to the lowest common denominator of browsers some of which do not support
the full RESTful methods (namely PUT and DELETE).

This however isn't necesscarily a show-stopper as various workarounds exist,
some of which rely on using a proxy to translate the request into the
appropriate method and some of which are purely client side workarounds such
as passing the request to javascript or there may be the possibility of
using some form of socket?

If given a RESTful api to work with, with no control over the service, has
anyone tackled a project of this type and to what degree of success?

Alternatively, if you did have control over the service what are the
drawbacks of just allowing GET and POST requests for everything and not
making use of PUT and DELETE? is it just a case that you're not using the
most cohesive interface possible but you have no restriction on
functionality or are there other considerations?

Apologies, but before this I had never really given REST/RESTful any thought
or consideration so this is all new territory for me.

Dan


2009/9/2 claudiu ursica 

>
>
> TO go RESTfull you'll have to use all teh methods like GET, POST, PUT,
> DELETE, which is kind of hard to do. You probably end up using lots of post
> from flex, even instead of get... You still can build the REST api and use
> it like that only with GET and POST... not 100% rest but will work...
>
> C
>
>
>
> --
> *From:* DannyT 
> *To:* flexcoders@yahoogroups.com
> *Sent:* Wednesday, September 2, 2009 2:55:31 PM
> *Subject:* [flexcoders] Flex and REST
>
>
>
> Can anyone give me the definitive answer to whether you can build REST
> based apps with Flex? There seems to be an incredible amount of FUD about
> the topic and whilst I appreciate it might not be supported in it's purest
> form I need to know what is involved in supporting a full REST
> implementation.
>
> I have no experience with REST but we're in the position that a client is
> going to implement a RESTful service for us to build a Flex application
> against. If it will 'just work' then great, if not I need to educate them as
> to any considerations/ workarounds necesscary on the service side of things.
>
> Can anyone offer any advice?
>
> Cheers,
> Dan
>
> --
> http://danny-t.co.uk
>
>  
>



-- 
http://danny-t.co.uk


Re: [flexcoders] Flex and REST

2009-09-02 Thread claudiu ursica
TO go RESTfull you'll have to use all teh methods like GET, POST, PUT,  DELETE, 
which is kind of hard to do. You probably end up using lots of post from flex, 
even instead of get... You still can build the REST api and use it like that 
only with GET and POST... not 100% rest but will work...

C







From: DannyT 
To: flexcoders@yahoogroups.com
Sent: Wednesday, September 2, 2009 2:55:31 PM
Subject: [flexcoders] Flex and REST

   
Can anyone give me the definitive answer to whether you can build REST based 
apps with Flex? There seems to be an incredible amount of FUD about the topic 
and whilst I appreciate it might not be supported in it's purest form I need to 
know what is involved in supporting a full REST implementation.

I have no experience with REST but we're in the position that a client is going 
to implement a RESTful service for us to build a Flex application against. If 
it will 'just work' then great, if not I need to educate them as to any 
considerations/ workarounds necesscary on the service side of things.

Can anyone offer any advice?

Cheers,
Dan

-- 
http://danny-t.co.uk

   


  

Re: [flexcoders] Flex and REST

2009-09-02 Thread Fotis Chatzinikos
Can you be a bit more specific? What do you mean by REST?

If by rest you mean you hit a service you get some results and 'draw' them
in flex yes you can do that in more than one ways (remoteObject,
httpservice, urlrequest and so on), but i imagine you are interested in
httpservice with xml data as the response.

On Wed, Sep 2, 2009 at 2:55 PM, DannyT  wrote:

>
>
> Can anyone give me the definitive answer to whether you can build REST
> based apps with Flex? There seems to be an incredible amount of FUD about
> the topic and whilst I appreciate it might not be supported in it's purest
> form I need to know what is involved in supporting a full REST
> implementation.
>
> I have no experience with REST but we're in the position that a client is
> going to implement a RESTful service for us to build a Flex application
> against. If it will 'just work' then great, if not I need to educate them as
> to any considerations/workarounds necesscary on the service side of things.
>
> Can anyone offer any advice?
>
> Cheers,
> Dan
>
> --
> http://danny-t.co.uk
>  
>



-- 
Fotis Chatzinikos, Ph.D.
Founder,
Phinnovation
fotis.chatzini...@gmail.com,


[flexcoders] Flex and REST

2009-09-02 Thread DannyT
Can anyone give me the definitive answer to whether you can build REST based
apps with Flex? There seems to be an incredible amount of FUD about the
topic and whilst I appreciate it might not be supported in it's purest form
I need to know what is involved in supporting a full REST implementation.

I have no experience with REST but we're in the position that a client is
going to implement a RESTful service for us to build a Flex application
against. If it will 'just work' then great, if not I need to educate them as
to any considerations/workarounds necesscary on the service side of things.

Can anyone offer any advice?

Cheers,
Dan

-- 
http://danny-t.co.uk