Quickstart
From Clickframes
Using Maven and the Clickframes archetype, starting a new Clickframes project is simple. We've even created a sample application specification ("appspec") that you can start playing with. The demo appspec is for a basic issue tracking application, since most developers are more or less familiar with that domain).
Building applications with Clickframes involves the following project lifecycle:
- Decide roughly what you want to build.
- Start a Clickframes project and write a simple appspec.
- Generate CLIPs and other artifacts to help you refine the appspec.
- Update the appspec until you're satisfied that it provides a decent representation of the application you want to build (it doesn't have to be perfect!)
- Use a Clickframes code generator to build the framework for your application
- Customize the code and continue to refine your requirements, updating the appspec and re-generating code as required.
- Use the appspec to generate a set of test cases, then customize the tests and run them.
- Release software!
This Quickstart will help get you started with the first few steps. Clickframes supports application generation in a number of languages, using different plugins (for Java applications) or stand-along utilities (for building PHP applications). For this tutorial, we're going to use the original Clickframes plugin, which generates code for the JBoss Seam platform. Seam is a general purpose web application development framework that runs on top of Java Enterprise Edition 6. It's well suited for both small, quick and dirty applications and large, scalable, highly complex systems. We don't expect you'll always want to use Seam, and that's why we have other plugins available. But this should give you an idea.
Contents |
Create and run the demo application
Step 1: Create an empty Clickframes project
Go to the parent directory where you would like to create your new project and issue the following command. Change the last two options to customize your generated package name and application name (in this case, we're using "tracker" for our issue tracker demo).
mvn archetype:generate -DinteractiveMode=n -DarchetypeArtifactId=clickframes-seam-archetype -DarchetypeVersion=0.9.7 -DarchetypeRepository=http://nexus.clickframes.org/nexus/content/repositories/releases -DarchetypeGroupId=org.clickframes -Dversion=1.0-SNAPSHOT -DgroupId=com.somecompany -DartifactId=tracker
This command uses a "Maven Archetype" to download the Clickframes software from our repository and generate a sample project structure. While the appspec is independent of the implementation technology you choose, the project structure isn't - JBoss Seam requires different settings than Spring WebFlow, for instance. So we provide archetypes for each of our Java plugins (the PHP plugin doesn't use Maven, so it doesn't need an archetype).
Step 2: Generate project artifacts from the AppSpec
cd tracker mvn clickframes:generate
You can now open the target\clickframes directory and load the index.html file in browser. You'll see the Clickframes Interactive Previews for the issue tracker application.
Step 3: Generate Code and View Application
The next step is to run the Seam plugin and run the application. The "run" goal in the plugin will generate code on disk, compile it, start Glassfish application server and load your app. All in one line! Just type:
mvn glassfish:run
Your application is now being run in an embedded Glassfish container. Visit http://localhost:8080/tracker/ to view the generated application.
If you just want to generate code without running it immediately, you can replace the "run" goal with the "generate" goal. You can then run mvn package to create a Glassfish compatible .war file, or mvn -Pjboss package to create one that will work in JBoss 4. See the JSF/Seam Plugin documentation for more detail.
Developing your own application
When you're ready to begin designing your own application, complete step one, then customize src/main/clickframes/appspec.xml with your own specifications.

