OA学习笔记-001-项目介绍
基本知識
框架工具
解決方案(經典應用)
項目 12天
==========================================
OA項目, 12天
BBS
一、什么是OA?
輔助管理、提高辦公效率的系統。
二、OA中有什么功能?
...
==========================================
一、軟件開發的步驟?
1,需求
2,設計
3,編碼<---┓
4,測試----┛
5,部署與后期維護
二、每個步驟都要做什么,誰來做?
...
三、我們要做什么?
設計、編碼、測試
^^^^
=============================================
設計、編碼、測試、部署
一、分層
3層
View serlvet/action
↓
Service 接口/實現類
↓
Dao 接口/實現類
耦合 -- 解耦
二、所用技術
Struts2 + Hibernate + Spring + JBPM + Junit + jQuery + ...
三、開發環境
Windows + Tomcat + Eclipse/MyEclipse + MySQL + IE
四、代碼規范
代碼格式:Ctrl + Shift + F
命名規范:駝峰命名法
注釋
...
// 第1步:...
int a = 1;
int b = 2;
int result = a + b;
// 第2步:...
User a = new User();
Department b = new Department();
a.setB(b);
五、一些約定
utf-8
id : Long
六、項目計劃
共12天
----------------------------
搭建環境+基本功能 1天
系統管理 2天
權限 2天
論壇 3天
工作流+審批流轉 2天 + 2天
================================================ 搭建環境
一、數據庫
mysql> create database itcastoa0720 default character set utf8;
Query OK, 1 row affected (0.03 sec)
mysql> show create database itcastoa0720;
+--------------+-----------------------------------------------------------------------+
| Database | Create Database |
+--------------+-----------------------------------------------------------------------+
| itcastoa0720 | CREATE DATABASE `itcastoa0720` /*!40100 DEFAULT CHARACTER SET utf8 */ |
+--------------+-----------------------------------------------------------------------+
1 row in set (0.02 sec)
二、MyEclipse工程
1,新Web工程,并把編碼設為utf-8
2,添加框架環境
Junit
Struts2
Hibernate
Spring
3,整合SSH
Struts2與Spring整合
Hibernate與Spring整合
4,資源分類
5,配置日志
Struts2
jar包
struts.xml, web.xml
Hibernate
jar包:核心包, 必須包, jpa, c3p0, jdbc
hibernate.cfg.xml, *.hbm.xml
Spring
jar包
appicationContext.xml/beans.xml
聲明一個bean
@Component("beanName")
@Controller
@Service
@Repository
配置bean的scope
@Scope("prototype")
注入bean
@Resource
Spring與Struts2整合
1,在web.xml中配置Spring的監聽器
2,加一個jar包
Hibernate與Spring整合
1,管理SessionFactory實例(只需要一個)
2,聲明式事務管理
Spring
IOC 管理對象..
AOP 事務管理..
代碼:
boolean needLog = ConfigFile.getBooleanValue("needLog");
if( needLog ){
System.out.println("xxx"); // System.err.println("");
}
配置文件(mylog.properties)
needLog = true/false
slf4j
JDK logging --> logging.properties
Log4j --> log4j.properties
...
debug 調試信息
info 一般信息
warn 警告
error 錯誤
fatal 嚴重錯誤
?
================================================ 基本功能
?
User, UserDao
save(User user), update(), delete(), find(), ...
Role, RoleDao
save(Role role), update(), delete(), find(), ...
Student, StudentDao
save(Student student), update(), delete(), find(), ...
...
BaseDao<T>
save(T t), update(), delete(), find()
UserDao extends BaseDao<User> { ... }
RoleDao extends BaseDao<Role>{ ... }
...
?
轉載于:https://www.cnblogs.com/shamgod/p/5225035.html
總結
以上是生活随笔為你收集整理的OA学习笔记-001-项目介绍的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: push
- 下一篇: 2014 北京邀请赛ABDHJ题解