I have a typical Flex-based application that was written to use a Java/Hibernate/MySQL backend. The client changed the requirements – now they want to distribute it on a CD where the user can just run the app without any installation or a network connection.
What is the recommended migration path for this situation?
To do this, I certainly need to eliminate the web server and the database server and adapt my application (with as few changes as possible, of course) to a stand-alone application that will fit on a CD/DVD.
I’ve managed to export the data to XML and read it into Flex, but I’m wondering if there’s a way to recreate the Hibernate data structures in Flex so I could change as little code as possible. Failing that, is there any way to keep the existing Java/Hibernate external to the Flex code but retrievable without installing Apache Tomcat or MySQL? What other options exist?
If you want the simplest way to make this work, you probably want to keep the service tier (i.e. Java/Hibernate/mySQL) since switching to AIR means you will have to rewrite that logic in flex again. I would suggest running Jetty directly on the client machine (assuming that they have Java) and using HSQLDB as the backing datastore (which supports just having a database in-memory). Serve the flash file from Jetty as well and point the client’s browser at a local URL. Better yet, have a simple java app that includes an embedded browser so the jetty instance would be killed when the user closes the app.
Apart from configuring everything on the java-end, the amount of code to rewrite should be minimal.
See: