I have been playing with flex for a couple of weeks now,and i am trying to use flex as the UI and keeping the backend in Java with as usal Spring,Hibernate stack.So in this series i will create a getting started project(CRUD contact management) using Spring,Hibernate/MySQL,Cairngorm as the UI MVC framework,GraniteDS for remoting and Tomcat as the server . For now i will create an eclipse based project and later move that to maven. The base intention of this project is to setup a prototype with all the above technologies defined and explore all the aspects of GraniteDS features to serve as the POC for other developers if they are willing to try it.
There are few other similar example available on the web such as
but it's based on BlazeDS but i want to try and explore gas3 generator,hibernate lazy-loading support from GraniteDS,To know more about GraniteDS vs BlazeDS you can see http://http://www.infoq.com/news/2008/02/granite-data-services
similarly http://code.google.com/p/igenko/ is a very good open source project but i think they are using content repository.
Anyway these are the basic 3 steps that i'll cover
- Create a server, this will contain all the java code and configuration files for both backend stack and also graniteDS related configuration files.
- Create a flex client based on Cairngorm's framework, gas3 generator from GraniteDS for generating actionscript classes for corresponding hibernate POJOs
- Deploy and run this basic project using eclipse on Tomcat
And once this is complete i'll convert the same project to maven project, and eventually try more complex hibernate mappings to explore all the aspects of lazy-loading and AMF3 serialization/deserialization support provided by GraniteDS.
So lets get started, at first create a mysql database name sample_graniteds and table contact
create database sample_graniteds;
CREATE TABLE CONTACT (
id bigint(20) not null auto_increment primary key,
In the next post i'll create a server project that contains all the business code as well as configuration files for flex rich client.