Context

Randoms

  • flex supports HttpService, WebService or RemoteObject
  • first thought: HttpService -> ServletDispatcher -> Service -> Java -> DB -> XML -> HttpService. NO: we are in the future, something like that must already exist, I would have done that 5 years ago except for Flex which didn’t existed then
  • RemoteObject requires a special server side application such as BlazeDS
    • seems simple enough and I like that you only have a few xml files to define your services which you associate with your java classes
    • seems the only choice if you need real-time messaging which is not the case here
    • RemoteObject communication uses a binary communication protocol which is bad if client technology is going to change and is difficult to sniff/debug and/or test without the server. I like better the XML choice for the other 2 remote access choices
  • I would really like to have something where you define the services in a single XML and associate a service name with a java class. The java – XML conversion should be done automagically
  • This is what a webService should do…
    • jbossws is the JBoss webservices implementation based on apache axis
      • the examples don’t compile from the begining
      • deployed the examples in jboss, the WSDL seems complicated
      • the code seems even more complicated and the simplest example uses object parameters for functions. There are a lot of classes, some WSDL – java code generation seems in place. Remembers me of EJB 2
      • will it work in another application server such as websphere? hahaha!
    • switch to windows (bad thing), FlexBuilder on windows seems to generate code for WSDL services as described here
      • it’s a lot of code for a simple example. Lot of code is a bad thing.
  • WSDL, WADL, JAX-RPC, JAX-WS, … GRRRR $#@#@ seems they never got it right and it’s getting more and more complicated when trying to simplify it.
  • back to the HttpService REST model. A simple servlet which handles everything, what about restlet?

So after around 8 hours of testing various technologies the only thing of advancement seems the Flex side. On the server side I will stick to a simple servlet based dispatcher. All the WS stuff sounds very nice but it seems the original design by M$ has left a mark which cannot be erased. I really don’t like having to write so much code and XML, application server specific with all the complicated examples. The blazeDS remoting-xml file seemed all I needed. Well, let’s see in a few more years, until then, back to my dispatcher.

2 days and 16h later: working prototype with the following configuration: servlet dispatcher -> services -> hibernate calls (via JBoss MBean service) -> xml results generated with XStreams