RIA Continuous Integration with Flex and Java
January 16th, 2009In the last month I have been working intensively to set up a professional environment for developing Rich Internet Applications at enterprise level.
Here is a summary of the setup I use:
IDE
Eclipse
Plugin - Subclipse
Plugin - FlexBuilder
Plugin - PHPEclipse
Plugin - Mylyn
Testing environment
Backend - JUnit
Frontend - FlexUnit
Frontend - FlexMonkey, run with FlexMonkeyLauncher, just put it in the same library as the swf-file. Record the steps, save them as test cases.
Testing with mock objects in frontend and backend
Code coverage
Backend - Java Code Coverage - Cobertura
Frontend - FlexCover (I am not using this, as it doesn’t really make sense to me with Flex development)
Performance testing
Backend - Java (JProbe or similar)
JMeter - double click “ApacheJMeter.jar”
Frontend - Flex Profiler (still need to set this up)
Compilation, dependencies and deployment environment
Maven2 with Flex-Mojos
Continuous Integration server
Continuum
I have set up Maven to generate several reports about the code style, changes, etc.
Maven links:
—————–
Improving site reporting
http://www.javaworld.com/javaworld/jw-02-2006/jw-0227-maven.html?page=1
Maven configuration
—————————-
To restart tomcat from within Maven on a Mac, add the following:
<settings xmlns=”http://maven.apache.org/POM/4.0.0″
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”
xsi:schemaLocation=”http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd”>
<servers>
<server>
<id>tomcatserver</id>
<username>root</username>
<password>admin</password>
</server>
</servers>
</settings>
to a file called: settings.xml and put it in: ~/.m2
For compilation of Adobe with Maven. Install the following in your local repository:
—————————————————————————————————————
mvn install:install-file -DgroupId=com.adobe.flex.sdk -DartifactId=playerglobal -Dversion=3.2.0 -Dpackaging=swc -Dfile=”/Applications/Development/Adobe Flex Builder 3 Plug-in/sdks/3.2.0/frameworks/libs/player/10/playerglobal.swc”
mvn install:install-file -DgroupId=com.adobe.flex.sdk -DartifactId=flex -Dversion=3.2.0 -Dpackaging=swc -Dfile=”/Applications/Development/Adobe Flex Builder 3 Plug-in/sdks/3.2.0/frameworks/libs/flex.swc”
mvn install:install-file -DgroupId=com.adobe.flex.sdk -DartifactId=rpc -Dversion=3.2.0 -Dpackaging=swc -Dfile=”/Applications/Development/Adobe Flex Builder 3 Plug-in/sdks/3.2.0/frameworks/libs/rpc.swc”
mvn install:install-file -DgroupId=com.adobe.flex.sdk -DartifactId=datavisualization -Dversion=3.2.0 -Dpackaging=swc -Dfile=”/Applications/Development/Adobe Flex Builder 3 Plug-in/sdks/3.2.0/frameworks/libs/datavisualization.swc”
mvn install:install-file -DgroupId=com.adobe.flex.sdk -DartifactId=framework-rb -Dversion=3.2.0 -Dpackaging=swc -Dfile=”/Applications/Development/Adobe Flex Builder 3 Plug-in/sdks/3.2.0/frameworks/locale/en_US/framework_rb.swc”
mvn install:install-file -DgroupId=com.adobe.flex.sdk -DartifactId=rpc-rb -Dversion=3.2.0 -Dpackaging=swc -Dfile=”/Applications/Development/Adobe Flex Builder 3 Plug-in/sdks/3.2.0/frameworks/locale/en_US/rpc_rb.swc”
mvn install:install-file -DgroupId=com.adobe.flex.sdk -DartifactId=datavisualization-rb -Dversion=3.2.0 -Dpackaging=swc -Dfile=”/Applications/Development/Adobe Flex Builder 3 Plug-in/sdks/3.2.0/frameworks/locale/en_US/datavisualization_rb.swc”
Frameworks
—————–
Frontend
Technology - Flex
Frameworks - Mate (IoC pattern)
Backend
Technology - Java
Frameworks - Spring (IoC pattern)
- DAO (separate data access layer from service layer)
- DTO (improve performance)
- Transaction Management (still to be decided)
