4 Replies Latest reply on Jan 14, 2012 4:11 AM by SourceSkyBoxer

    Flex and Java - Getting Started

    DiodeDan

      Hello All,

       

      I would like to create an application that loads images and text from a server database, as well as returns numeric data to the server for checking and recording. I understand that Flex can't directly connect to a server database. I was thinking of using the following architecture:

       

              (Client)                       (Server)

      Flex Web Application <--> Java Server <--> Database (MySQL or something like that)

       

      Can anyone suggest how I can start testing such an application? Can I "fake" a Java front end and database on my computer for testing the application? Any suggestions on the most efficent way to start would be very much appreciated.

       

      Thanks!

        • 1. Re: Flex and Java - Getting Started
          drkstr_1 Level 4

          The inability to directly connect to a server-side database is a good thing, trust me.

           

          Setting up a turn-key BlazeDS install is pretty portable (although I personally prefer jetty+GraniteDS, but the learning curve is a bit steeper).

           

          I always debug on localhost, regardless of the technology (albiet, with a few exceptions).

           

          Have you tried anything yet? If so, what problems did you run into?

          • 2. Re: Flex and Java - Getting Started
            DiodeDan Level 1

            drkstr_1,

             

            Thanks for the speedy reply. I have not tried anything yet because I wanted to ask for some feedback before I jumped in headfirst to server tech. I have experience in both Java and Python, but that is primariliy on desktop and not internet tech. I was hoping that there would be a way where I could use Spring & Blaze DS (Java) and compile it on my local machine as well as simulate the server's internet protocol response with Flex on my host machine.

             

            Is this the right way to get started? Can you elaborate on how to debug with the local host (are there any tutorials you could point me towards?)

             

            Thanks

            • 3. Re: Flex and Java - Getting Started
              CRed101

              I know tis is a little late, but I have setup an open source project that has a flex client with a Java Jersey Rest server using MySQL. You can either use it as a basis for your project or you can just look at the code and see how i do it.

               

              There is a blog that goes into some detail on how to setup and run the project

              http://credindustries.blogspot.com/

               

              and you can find the source code at

               

              http://code.google.com/p/java-rest-platform/

               

              You should be able to run and test this on your local machine, you just need to update the update the server config information in

              com.cred.industries.dao.ServerDAODefines

              to point to your localhost

               

              If you need any further info just let me know.

              • 4. Re: Flex and Java - Getting Started
                SourceSkyBoxer Level 1

                Hey dear people

                 

                i have great book for Flash Builder and Java. I have been readden. That is not heavy. Flash Builder and Java are very easy. But Flex SDK is 4.0 Version in the kickstart book

                 

                @Drkstr_1, your solution is good. I have been readden. Keep your work!

                 

                @CRed101, are you reworking with Flex-MySql with Java server-side. Great idea! But you are trying and build heavy becasue solution of Flex SDK and Java need more call and callback after you can try nice Flex- and Java-Application. Keep in your work!

                 

                Regards, Jens