| CARVIEW |
|
equinox
|
| Summary | A lightweight version of AppFuse (changed name to appfuse-light) |
|---|---|
| Categories | None |
| License | Apache Software License |
| Owner(s) | mraible |
Message from the owner(s)
Equinox is a lightweight version of AppFuse.
I was inspired to create it while writing Spring Live
and looking at the struts-blank and webapp-minimal applications that ship with
Struts and Spring, respectively. These "starter" apps were not robust enough
for me, and I wanted something like AppFuse, only simpler.
Much of the documentation for developing with Equinox can be found in the QuickStart Chapter from Spring Live. If you have issues downloading this PDF, you might try saving it to your hard drive before opening it. The QuickStart Chapter covers developing with Struts, Chapter 4 covers developing with Spring MVC and Appendix A covers JSF, Tapestry and WebWork. AppFuse has online tutorials for developing with all of these frameworks.
Equinox uses Spring MVC and Hibernate by default. However, you can change your web framework to JSF, Struts, Tapestry or WebWork.
You can also change your persistence framework to be iBATIS, JDO (JPOX), Spring JDBC or OJB. Both Ant and Maven 2 are supported
for building and testing.
For a web framework comparison check out my presentation on comparing these frameworks.
A more detailed comparison can be found in Spring Live, Chapter 11.
AppFuse contains all 5 web framework options as well.
The major differences between AppFuse and Equinox are that AppFuse has the following features:
- Authentication and Authorization with Acegi Security
- User Management
- Code generation for CRUD-based applications
- File Upload
- Active and Vibrant User Community
Setup
To run this application, you will need to have PostgreSQL (or MySQL) installed. PostgreSQL is the default database and you will need to create a "equinox" database and "postgres/postgres" user for everything to work properly. PostgreSQL version 8.x or MySQL version 4.1.x is recommended. Both have graphical installers and easy to use GUI clients.
To change any PostgreSQL settings, see src/main/resources/jdbc.properties.
If you'd rather use MySQL or another database, perform the following steps:
- Modify jdbc.properties to have the correct settings for your database.
- If you're using Hibernate, change the "hibernate.dialect" property in src/main/webapp/WEB-INF/applicationContext-hibernate.xml.
- Modify pom.xml to replace the PostgreSQL driver with your driver.
After setting up your database properly, you should be able to run all the tests using "mvn" or "ant test-all". To create your own application, run "ant new". Then cd into your project and run "mvn jetty:run" to startup the Maven Jetty plugin. You should be able to see your project at https://localhost:8080/${app.name}. The nice thing about using this plugin is you can edit JSPs/classes/etc. and Jetty will reload them on-the-fly. If you'd prefer to use Ant rather than Maven, you will need to tell Equinox where you've installed your server. Installation Tomcat and defining an CATALINA_HOME environment variable is the recommended method, but you can also specify a "server.home" property in build.properties to use another server. For example:
server.home=$TOOLS_HOME/resin-3.0.16You can also integrate Jetty with Eclipse for rapid development with no deploy cycle. The README.txt file contains information on using Maven 2 to generate Eclipse and IDEA project files.
After setting up your environment, you can create your application using the "QuickStart" instructions below, or deploy this one using the "Build and Test" instructions.
QuickStart
See the setup section for how to setup a database for this application.
Download, extract and run "ant new". Enter your project name when prompted. Spring MVC is the default web framework. If you'd like to use JSF, Struts, Tapestry or WebWork instead, you can navigate to the the respective directory in the "extras" folder and run "ant install". You only need to do this if you download equinox-all.zip.
Hibernate is the default persistence framework, but there are installers for iBATIS, JDO (JPOX), OJB and Spring JDBC.
Build and Test
- Make sure you have junit.jar in your $ANT_HOME/lib directory.
- Download and install
Tomcat 5.x or another 2.4 container. If you setup
a CATALINA_HOME environment variable, everything should work w/o changes.
For another container (i.e. Jetty or Resin), you'll need to define a
server.home variable in build.properties (or modify build.xml).
If you're using Tomcat and you want to use Tomcat's Ant Tasks, you'll need to use the "tomcat.xml" file - calling it with "ant -f tomcat.xml target". For these targets to work, you'll need an "admin" user with a "manager" role in $CATALINA_HOME/conf/tomcat-users.xml. The password is defined in build.properties. - Run "ant test-all" to verify all tests pass.
- Run "ant deploy", start your server and view the application at https://localhost:8080/equinox
- You can also use Maven 2 with Equinox, if you'd prefer using it to build. Using "mvn jetty:run" is a great way to develop applications.
Issues
Demo
Part of the
Java Enterprise Community.
| Powered by CollabNet | Feedback |
FAQ |
Press |
Developer tools
© 1995 - 2007 CollabNet. CollabNet is a registered trademark of CollabNet, Inc. |
