Exadel Flamingo provides a set of commands that help a developer to generate initial code. To bootstrap a project, a developer answers a few questions in a wizard. Based on these questions, a standard project is generated. Flamingo is based on Maven, therefore the new application is generated according to Maven conventions, making it easy for people familiar with Maven to navigate through the project.
The generated code provides all the necessary plumbing and connectivity from JavaFX (and Flex) to Seam or Spring. A developer only needs to focus on business functionality; Flamingo takes care of the rest. All communications between the user interface and Seam or Spring components are taken care of by Exadel Flamingo. Let’s see an examples with JavaFX.
Steps
1. Download and unzip Flamingo
2. Run FlamingoInstall/bin/mvn-install-javafx. This step adds JavaFX libs to your local Maven repository
3. Run FlamingoInstall/bin/flamingoinstall
4. Run FlmaingoInstall/bin/flamingo create project. You will be asked a number of questions. My answers are in bold:
—
max@Salsa:~/Exadel/Flamingo/flamingo-1.8.1$ ./bin/flamingo create project
[INFO] Scanning for projects…
[INFO] ————————————————————————
[INFO] Building Maven Default Project
[INFO] task-segment: [com.exadel.flamingo.maven.plugin:flamingoapp:1.8.1:create-project] (aggregator-style)
[INFO] ————————————————————————
[INFO] [flamingoapp:create-project]
discovered andromdapp type –> ‘flamingo-seam’
discovered andromdapp type –> ‘flamingo-spring’
Please choose the type of application to generate (flamingo-seam, flamingo-spring):[flamingo-seam]
flamingo-seam
Please enter the location in which your new application will be created (i.e. c:/java/development): [/home/max/Exadel/Flamingo/dev/]
/home/max/Exadel/Flamingo/dev
Enter the project name (e.g. myproject): [javafx-seam]
javafx-seam
Please enter the root package name for your project (e.g. com.mydomain.myproject): [sample]
javafx.example
Is this project deployed as an EAR (with EJB components) or a WAR (with no EJB support)? (ear, war): [war]
war
Will this project have Flex or JavaFX user interface? (flex, javafx): [javafx]
javafx
Will this project use Seam Remoting or Flamingo servlets? (servlets, remoting, both): [servlets]
servlets
————————————————————————————-
G e n e r a t i n g A n d r o M D A P o w e r e d A p p l i c a t i o n
————————————————————————————-
Output: ‘file:/home/max/Exadel/Flamingo/dev/javafx-seam/build.txt’
Output: ‘file:/home/max/Exadel/Flamingo/dev/javafx-seam/flamingoproject.properties’
Output: ‘file:/home/max/Exadel/Flamingo/dev/javafx-seam/java/pom.xml’
Output: ‘file:/home/max/Exadel/Flamingo/dev/javafx-seam/javafx/pom.xml’
Output: ‘file:/home/max/Exadel/Flamingo/dev/javafx-seam/java/src/main/java/javafx/example/javafx/ILoginAction.java’
Output: ‘file:/home/max/Exadel/Flamingo/dev/javafx-seam/java/src/main/java/javafx/example/javafx/LoginClient.java’
Output: ‘file:/home/max/Exadel/Flamingo/dev/javafx-seam/java/src/main/java/javafx/example/javafx/ServiceFactory.java’
Output: ‘file:/home/max/Exadel/Flamingo/dev/javafx-seam/javafx/src/main/javafx/javafx/example/javafx/customnodes/TableNode.fx’
Output: ‘file:/home/max/Exadel/Flamingo/dev/javafx-seam/javafx/src/main/javafx/javafx/example/javafx/FXClient.fx’
Output: ‘file:/home/max/Exadel/Flamingo/dev/javafx-seam/javafx/src/main/javafx/javafx/example/javafx/LoginForm.fx’
Output: ‘file:/home/max/Exadel/Flamingo/dev/javafx-seam/pom.xml’
Output: ‘file:/home/max/Exadel/Flamingo/dev/javafx-seam/readme.txt’
Output: ‘file:/home/max/Exadel/Flamingo/dev/javafx-seam/web/build.xml’
Output: ‘file:/home/max/Exadel/Flamingo/dev/javafx-seam/web/pom.xml’
Output: ‘file:/home/max/Exadel/Flamingo/dev/javafx-seam/web/security.properties’
Output: ‘file:/home/max/Exadel/Flamingo/dev/javafx-seam/web/src/main/java/javafx/example/service/AuthenticatorAction.java’
Output: ‘file:/home/max/Exadel/Flamingo/dev/javafx-seam/web/src/main/resources/seam.properties’
Output: ‘file:/home/max/Exadel/Flamingo/dev/javafx-seam/web/src/main/webapp/hello.jsp’
Output: ‘file:/home/max/Exadel/Flamingo/dev/javafx-seam/web/src/main/webapp/index.html’
Output: ‘file:/home/max/Exadel/Flamingo/dev/javafx-seam/web/src/main/webapp/jnlp/javafx-seam.jnlp’
Output: ‘file:/home/max/Exadel/Flamingo/dev/javafx-seam/web/src/main/webapp/WEB-INF/components.xml’
Output: ‘file:/home/max/Exadel/Flamingo/dev/javafx-seam/web/src/main/webapp/WEB-INF/jboss-web.xml’
Output: ‘file:/home/max/Exadel/Flamingo/dev/javafx-seam/web/src/main/webapp/WEB-INF/web.xml’
————————————————————————————-
New application generated to –> ‘file:/home/max/Exadel/Flamingo/dev/javafx-seam/’
————————————————————————————-
[INFO] ————————————————————————
[INFO] BUILD SUCCESSFUL
[INFO] ————————————————————————
[INFO] Total time: 57 seconds
[INFO] Finished at: Wed Jun 17 11:23:07 PDT 2009
[INFO] Final Memory: 12M/81M
[INFO] ————————————————————————
max@Salsa:~/Exadel/Flamingo/flamingo-1.8.1$
—
5. Go to javafx-seam/web and run this command to sign the jar files: ant -f build.xml create-keyEntry
6. In the same directory, run mvn package
7. Almost done. Copy javafx-seam>/web/target/javafx-seam.war to JBoss Application Server (jbossas/server/default/deploy).
8. Start the server
9. In browser, go to http://localhost:8080/javafx-seam.
10. That’s it, enjoy.
Leave a comment