【正文】
ment process. System uses iBatis as the data persistence layer. IBatis is simple to use, excellent in performance. With IBatis a large number of SQL is avoid in business logic code, it 基于 B/S 的在線考試系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn) 2 provides a convenient maintenance for the future. Compared to the similar class libraries, iBatis gives excellent performance. The control layer relates to many codes that view dependent, so we extract business logic layer (or so called service layer) from control layer. The system uses Bootstrap as the front end library. Compared to similar libraries, The Bootstrap has the advantages of high efficiency, excellent characteristics such as appearance, and adaptive. The system use Spring Ioc to mechanic the dependence of objects, with improve the scalability of the system. The system use Maven to management the dependence of open source libraries, which make the configuration and pilation simpler. The bination of black box testing and white box testing is used to test the system. We use JUnit to act the white box testing to make sure the special plex logic is work well. We use black box testing to test user registration, login, user list, enable and disable of user, and test the addition, listing, modification of questions. We also test the creating, listing, modification of exam paper and testing, test scores and reporting of test. We give the test screen snap of tesing in this paper. The testes show that the system has implement the needs that defined in needs and requirements analysis. In a word, the system presented in this paper has an excellent architecture, use an efficient source code management tool, use many relevant technologies which are open source. This design and open source tools bring efficient, stable, beautiful characteristics for the system. Key Words: B/S Architecture Spring IBatis 基于 B/S 的在線考試系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn) 1 目 錄 1 綜述 ............................................ 1 ............................................................................................................. 1 ...................................................................................................... 1 ............................................................................................................. 2 2 相關(guān)技術(shù)與框架 ................................... 3 C/S架構(gòu)與 B/S架構(gòu) ............................................................................................ 3 MVC架構(gòu) 與 Spring MVC...................................................................................... 4 數(shù)據(jù)持久化與 Hibernate vs iBATIS ..................................................................10 控制反轉(zhuǎn)與 Spring IoC......................................................................................14 面向切面與 Spring AOP......................................................................................16 依賴管理與 Maven ..............................................................................................17 數(shù)據(jù)庫與 MySQL ..................................................................................................18 JSP容器與 Tomcat .............................................................................................19 前段框架與 Bootstrap .......................................................................................20 標(biāo)簽庫與 JSTL ..................................................................................................21 自動(dòng)化測(cè)試與 JUnit .........................................................................................22 3 需求分析 ........................................ 25 功能分析 ...........................................................................................................25 數(shù)據(jù)需求 ...........................................................................................................25 質(zhì)量需求 ...........................................................................................................26 開發(fā)工具 ...........................................................................................................26 4 概要設(shè)計(jì) ........................................ 28 結(jié)構(gòu)設(shè)計(jì) ...........................................................................................................28 外觀設(shè)計(jì) ...........................................................................................................30 模塊劃分 ...........................................................................................................30 5 詳細(xì)設(shè)計(jì)與實(shí)現(xiàn) .................................. 32 開發(fā)流程 ...........................................................................................................32 數(shù)據(jù)庫設(shè)計(jì) ........................................................................................................33 用戶管理模塊設(shè)計(jì) .............................................................................................42 基于 B/S 的在線考試系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn) 2 用戶管理的 模型層 .......................................................................................42 用戶管理的數(shù)據(jù)訪問層 ................................................................................43 用戶管理的業(yè)務(wù)邏輯層 ................................................................................43 用戶管理的業(yè)務(wù)控制層 ................................................................................44 與 Spring Security結(jié)合的權(quán)限控制 ...........................................................52 題庫模塊設(shè)計(jì)與實(shí)現(xiàn) ..........................................................................................58 題目的模型層 ..............................................................................................58 題目的內(nèi)容 XML表示 ...................................................................................62 題庫的 DAO層 ..............................................................................................63 題庫的BLL層 ....................................................