| Topic : Web 2.0 and XML |
|
|
|
|
||
|
Source : http://www.ibm.com
Activity:
2 comments
434 views
last activity : 07 06 2010 20:18:04 +0000
|
||
|
|
AppFuse is an open source project and application that uses open source tools built on the Java platform to help you develop Web applications quickly and efficiently. I originally developed it to eliminate the ramp-up time I often found when building new Web applications for customers. At its core, AppFuse is a project skeleton, similar to the one that's created by your IDE when you click through a wizard to create a new Web project. When you create a project with AppFuse, it prompts you for the open source frameworks you'd like to use and then creates your project. It uses Ant to drive testing, code generation, compilation, and deployment. It provides your directory and package structure, as well as the libraries you'll need to develop a Java language-based Web application.
Unlike the products of most "new project" wizards, AppFuse-created projects contain a number of classes and files from the very beginning. These files are used to implement features, but they also serve as examples for you when you're developing your application. By using AppFuse to start new projects, it's possible to eliminate the usual first week or two of development time. You don't have to worry about configuring open source frameworks together because that's already done for you. Your project is preconfigured to talk to a database, deploy in an application server, and authenticate users. There's no need for you to implement security features because they're already integrated.
When I first developed AppFuse, it only supported Struts and Hibernate. Over the years, I've found better Web frameworks than Struts, so I added options for them as well. Today, AppFuse supports Hibernate or iBATIS as persistence frameworks. For the Web framework, you can use JavaServer Faces (JSF), Spring MVC, Struts, Tapestry, or WebWork.
AppFuse comes out of the box with features that many applications need, including:
- Authentication and authorization
- User management
- Remember Me (which saves your login information so you don't have to log in every time)
- Password reminder
- Signup and registration
- SSL switching
- URL rewriting
- Skinability
- Page decoration
- Templated layout
- File upload
This out-of-the-box functionality is one of the main things that separate AppFuse from the other CRUD generation frameworks (from create, retrieve, update and delete), including Ruby on Rails, Trails, and Grails. The aforementioned frameworks, as well as AppFuse, allow you to generate master/detail pages from database tables or existing model objects.
Listing 1 illustrates the command-line interaction you'd go through to create a project named devworks, along with the resulting output. This project uses WebWork as its Web framework (see the Resources section below for a link).
Listing 1. Creating a new project with AppFuse
alotta:~/dev/appfuse mraible$ ant new
Buildfile: build.xml
clean:
[echo] Cleaning build and distribution directories
init:
new:
[echo]
[echo] +-------------------------------------------------------------+
[echo] | -- Welcome to the AppFuse New Application Wizard! -- |
[echo] | |
[echo] | To create a new application, please answer the following |
[echo] | questions. |
[echo] +-------------------------------------------------------------+
[input] What would you like to name your application [myapp]?
devworks
[input] What would you like to name your database [mydb]?
devworks
[input] What package name would you like to use [org.appfuse]?
com.ibm
[input] What web framework would you like to use [webwork,tapestry,spring,js
f,struts]?
webwork
[echo] Creating new application named 'devworks'...
[copy] Copying 359 files to /Users/mraible/Work/devworks
[copy] Copying 181 files to /Users/mraible/Work/devworks/extras
[copy] Copying 1 file to /Users/mraible/Work/devworks
[copy] Copying 1 file to /Users/mraible/Work/devworks
install:
[echo] Copying WebWork JARs to ../../lib
[copy] Copying 6 files to /Users/mraible/Work/devworks/lib
[echo] Adding WebWork entries to ../../lib.properties
[echo] Adding WebWork classpath entries
[echo] Removing Struts-specific JARs
[delete] Deleting directory /Users/mraible/Work/devworks/lib/struts-1.2.9
[delete] Deleting directory /Users/mraible/Work/devworks/lib/strutstest-2.1.3
[echo] Deleting struts_form.xdt for XDoclet
[delete] Deleting directory /Users/mraible/Work/devworks/metadata/templates
[echo] Deleting Struts merge-files in metadata/web
[delete] Deleting 7 files from /Users/mraible/Work/devworks/metadata/web
[echo] Deleting unused Tag Libraries and Utilities
[delete] Deleting 2 files from /Users/mraible/Work/devworks/src/web/org/appfu
se/webapp
[echo] Modifying appgen for WebWork
[copy] Copying 12 files to /Users/mraible/Work/devworks/extras/appgen
[echo] Replacing source and test files
[delete] Deleting directory /Users/mraible/Work/devworks/src/web/org/appfuse/
webapp/form
[delete] Deleting directory /Users/mraible/Work/devworks/src/web/org/appfuse/
webapp/action
[copy] Copying 13 files to /Users/mraible/Work/devworks/src
[delete] Deleting directory /Users/mraible/Work/devworks/test/web/org/appfuse
/webapp/form
[delete] Deleting directory /Users/mraible/Work/devworks/test/web/org/appfuse
/webapp/action
[copy] Copying 5 files to /Users/mraible/Work/devworks/test
[echo] Replacing web files (images, scripts, JSPs, etc.)
[delete] Deleting 1 files from /Users/mraible/Work/devworks/web/scripts
[copy] Copying 34 files to /Users/mraible/Work/devworks/web
[delete] Deleting: /Users/mraible/Work/devworks/web/WEB-INF/validator-rules-c
ustom.xml
[echo] Modifying Eclipse .classpath file
[echo] Refactoring build.xml
[echo] ----------------------------------------------
[echo] NOTE: It's recommended you delete extras/webwork as you shouldn't ne
ed it anymore.
[echo] ----------------------------------------------
[echo] Repackaging info written to rename.log
[echo]
[echo] +-------------------------------------------------------------+
[echo] | -- Application created successfully! -- |
[echo] | |
[echo] | Now you should be able to cd to your application and run: |
[echo] | > ant setup test-all |
[echo] +-------------------------------------------------------------+
BUILD SUCCESSFUL
Total time: 15 seconds
.....................................follow http://www.ibm.com/developerworks/java/library/j-appfuse/

|
|
|
|
|
|
|
|
|
|
Some management mistakes are so common that you can actually compile them into a list. If you’re a manager struggling to find out why your team is dysfunctional, take a look at the behaviors in this list and see if any look familiar. Not... |
A resume is an essential element in the job seeking process and it assists the candidates in getting interview calls. It is pre-dominantly a sketch of the candidate’s employment and educational past. A resume is an essential element in the job... |
As an interviewer, you sometimes have to get tough to circumvent the pat answers of job candidates. One blogger says that you shouldn’t be afraid to go negative. Here are his tips. There is a host of interviewing advice out there for job... |