4 Replies Latest reply on Dec 16, 2008 12:45 AM by atta707

    DTO & Flex 3 & Servlet

    mavdzee Level 1
      Hi,

      I am looking for an alternative to XML interface with an HTTPService since the XML-envelops are becoming to big. I read something about DTO. What is the easiest way to accomplish this, preferably open-source and with servlets. Any pointers are welcome!

      Thank you,
      Andrej
        • 1. Re: DTO & Flex 3 & Servlet
          atta707 Level 2
          BlazeDS is free server side add on to a JEE application, is free and gives you options to marshal Java objects into a binary format (AMF) and then demarshal them into AS value objects (classes).

          http://opensource.adobe.com/wiki/display/blazeds/BlazeDS/

          Short of that, you might want to consider to user JSON as a lighter weight alternative to XML. Adobe has a library that can parse JSON string coming from server side.

          ATTA
          • 2. Re: DTO & Flex 3 & Servlet
            mavdzee Level 1
            Thank you for your quick reply.

            I have been reading parts of the documentation of BlazeDS just now. I want to develop and deploy the servlet and Flex client completely separate. The former in Linux/Tomcat and the latter in Windows/Apache. From the documentation, which is a bit daunting to me, this seems to be impossible. Is this true?

            Cheers,
            Andrej
            • 3. Re: DTO & Flex 3 & Servlet
              mavdzee Level 1
              Moreover, it looks that the Flex client application has to be released together with the servlet in a servlet container. Is this really true, or am I misunderstanding this point?
              Cheers,
              Andrej
              • 4. Re: DTO & Flex 3 & Servlet
                atta707 Level 2
                BlazeDS would sit with your Servlet based application on the server side on, let's just say, Tomcat. It doesn't really matter for Flex front end whether it's Tomcat or Weblogic and the OS it's running on. You can develop your Flex front end on Windows but ultimately you're going to have to put the SWF file under Tomcat on Linux server.

                Flex is a view technology. Imagine, you're replacing your JSPs with Flex generated SWF files that really Flash objects. As such, of course, you're going to have to 'release' you flex client to the web server to repleace JSPs. In real life though, you'll keep the JSPs and embed the released SWF files in them.

                Hope this helps.

                ATTA