WEB开发网
开发学院软件开发Java 使用 AppFuse 的七个理由:学习 Java 开放源码工具... 阅读

使用 AppFuse 的七个理由:学习 Java 开放源码工具 —— 并使用这些工具提高生产效率

 2009-11-10 00:00:00 来源:WEB开发网   
核心提示: 密码提醒登记和注册SSL 转换E-mailURL 重写皮肤页面修饰模板化布局文件上载这种 “开箱即用” 的功能是 AppFuse 与其他 CRUD 代 框架的区别之一(CRUD 取自创建、检索、更新 和删除 几个操作的英文首字母),包括 Ruby on Rails、Tra

密码提醒

登记和注册

SSL 转换

E-mail

URL 重写

皮肤

页面修饰

模板化布局

文件上载

这种 “开箱即用” 的功能是 AppFuse 与其他 CRUD 代 框架的区别之一(CRUD 取自创建、检索、更新 和删除 几个操作的英文首字母),包括 Ruby on Rails、Trails 和 Grails。上面提到的这些框架,以及 AppFuse,都让我们可以从数据库表或现有的模型对象中生成主页/细节页。

图 1 阐述了一个典型 AppFuse 应用程序的概念设计:


图 1. 典型的 AppFuse 应用程序
使用 AppFuse 的七个理由:学习 Java 开放源码工具 —— 并使用这些工具提高生产效率

图片看不清楚?请点击这里查看原图(大图)。

清单 1 给出了我们在创建 devworks 项目时所使用的命令行交互操作,同时还给出了所生成的结果。这个项目使用了 WebWork 作为自己的 Web 框架。


清单 1. 使用 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

上一页  1 2 3 4 5 6 7  下一页

Tags:使用 AppFuse 七个

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接