• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Flex and Java without BlazeDS

 
Rory Thomas
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Satish,

I am relatively new to Flex, with about 18 months of Java. As I get started with trying to connect Java and Flex, I want to avoid having to learn BlazeDS at the same time. Is this easily done, or am I trying to do something the "easy way", which is in fact the harder way?

Another major concern is that my web host will likely not allow me run BlazeDS on a shared server, so I would prefer to work with Flex and Servlets only. I have been looking for a resource on this topic, hoping your book may be it!

Thanks,
Rory
 
Rj Salicco
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rory,

I have found great success with Grails and Flex. I basically rely on RESTful services, rendering XML, created in my Grails application and I use mx:HTTPService with a result type of "e4x" to handle the XML returned. But you can easily do this with Servlets and you could also use a JSR 311 JAX-RS implementation to achieve similar RESTful services. BlazeDS is nice and it does offer a bit more features, but RESTful XML services will also allow you to change your UI technology if you need to.
 
Satish Kore
Author
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rory,

You don't need BlazeDS as long as you don't use messaging, Push or anything that requires AMF. So the simple approach as suggested by RJ use XML based request and response through HttpService method.

Or if you need to send and receive objects instead of XML then I suggest you to use JSON along with Flex HttpService. e.g. Have a JSP/Servlet that generates JSON object and send it back to Flex, on Flex side use AS3CoreLib (http://code.google.com/p/as3corelib/) to decode/encode JSON objects.

Thanks,
 
Satish Kore
Author
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rory Thomas wrote:
Another major concern is that my web host will likely not allow me run BlazeDS on a shared server, so I would prefer to work with Flex and Servlets only. I have been looking for a resource on this topic, hoping your book may be it!


BlazeDS is just bunch of Java libraries (.jar) and configuration (.xml) files so if you server allows you to run J2EE apps your should be good to host BlazeDS based application as well.

Thanks,
Satish
 
Rory Thomas
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Satish, and RJ as well.

I have found my host to particularly painful about this stuff (runs Struts 1, but not Struts 2 for example). However, maybe it's my issue!

I have used some JSON, so I will look into that option as well. Thanks for the advice, I look forward to checking out the book further.

Thanks,
Rory
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic