作者:徐建祥(
netpirate@gmail.com
)
時間:
2007-01-03
網址:
http://www.anymobile.org
?
1、
項目介紹
××××項目是基于……(背景,范疇,術語)
2、
系統設計
為了降低系統的耦合性,提高系統的實用性和靈活性,對系統的頁面邏輯、業務邏輯和數據邏輯進行分層。集合當前的
Web
技術,在
Java
環境下,采用實現了
MVC
模式的
Struts
和實現了數據持久化的
Hibernate
的開源框架組合,
在
Hibernate
中整合
EhCache
,對數據進行緩存。
本系統的體系結構如下:
其中,應用表示層基于
Struts
框架,業務邏輯層包含了供應用程序調用的業務邏輯規則,以幫助應用程序完成業務操作,數據持久層基于
Hibernate
框架,采用 DAO(Data Access Object)模式操作數據庫,應用服務器采用
Tomcat
。
3、
詳細設計
本系統具有多個模塊,但各個模塊的基本設計原理相同,下面將逐個描述。
……
4、
數據庫設計
……
5、
開發示例
5.1
開發環境
?????? WinXP
?????? JDK 1.4.2
?????? Eclipse 3.2.1 SDK
MyEclipse 5.0GA
(
Struts 1.2
;
Hibernate 3.1
)
Tomcat 5.5
5.2
新建
Web Project
?????? File->New Project->MyEclipse->J2EE Projects->Web Project
5.3
建立
Struts
關聯
?????? MyEclipse->Add Struts Capabilities
5.4
建立數據庫瀏覽
?????? Window-> Preferences->MyEclipse->Database Explorer->New Driver
?????? Window->Customize Perspective->Commands
,選上
Profile
?????? Profile
窗口,
Connection it
5.5
建立
Hibernate
關聯
?????? MyEclipse->Add Hibernate Capabilities
5.6
配置應用服務器
?????? Window-> Preferences-> Application Server->Tomcat 5
,選擇
Enable
,瀏覽
Tomcat
的安裝目錄,瀏覽
JDK
的安裝目錄
??????
右鍵點擊
Project
,
MyEclipse-> Add and Remove Project Deployment
,點擊
Add
,
Server
選擇
Tomcat 5
,
Finish
后
點擊
Run server
,切換到
Web Browser
窗口,就可以訪問了。
?
參考文檔
?????? Eclipse->Help->Help Contents->MyEclipseLearningCenter->J2EE Application Development->Getting Started->Struts Development
?????? Eclipse->Help->Help Contents->MyEclipseLearningCenter->Spring/Hibernate Development->Getting Started->Hibernate Development
?????? Struts-Hibernate-Integration-Tutorial http://www.laliluna.de/download/struts-hibernate-integration-tutorial-en.pdf
<全文完>
posted on 2007-01-05 00:35
Xu Jianxiang 閱讀(911)
評論(0) 編輯 收藏 所屬分類:
Open Source