聊天室的实现与设计
兰州交通大学博文学院毕业设计(论文)
摘要
本聊天室设计初衷是为软件开发人员在局域网中方便交流,减少成本,消除由于交流不便带来的开发成本上升。本系统的开发主要用到了Oracle数据库技术、Hibernate框架、MVC架构技术、网络通信技术、windows的多线程技术等。本软件基于Socket通信,在此基础上,实现点对点聊天、广播聊天、一对多聊天、悄悄话,表情,可以运行于任何支持TCP/IP协议的机器上;对于数据库的连接则使用了Hibernate对象关系映射框架,基于此实现了对于系统消息和聊天记录的查询以及用户资料的查询和修改;对于软件整体架构则采用了MVC框架,这样可以大大增加系统的健壮性和可维护性。 MVC模式是一个复杂的架构模式,其实现也显得非常复杂。但是,我们已经总结出了很多可靠的设计模式,多种设计模式结合在一起,使MVC模式的实现变得相对简单易行。Views可以看作一棵树,显然可以用Composite Pattern来实现。Views和Models之间的关系可以用Observer Pattern体现。Controller控制Views的显示,可以用Strategy Pattern实现。Model通常是一个调停者,可采用Mediator Pattern来实现。
关键词 :网络通信;私人聊天;Hibernate;MVC;Socket
I
兰州交通大学博文学院毕业设计(论文)
Abstract
The original design intention of this chat room is facilitates the exchange for the software
developers in the local area network, reduces the cost, eliminates, because exchanges the development cost rise which brings differently. The development of chat room mainly to use network service technical, the file transfer technology, the windows and so on technology. This software based on the Socket correspondence, based on this, realizes chats, the broadcast to chat, one to many to chat point-to-point, the intimate conversation and the expression, may move in any supports the TCP/IP agreement on the machine. Connect to the database using the Hibernate object-relational mapping framework, based on the realization of system information for inquiries and chats, and user query and modify data; the overall framework for the software uses the MVC framework, it can greatly increase the system robust and maintainability.
MVC model structure is a complex model, which seems very complicated to achieve. However, we have summed up a lot of the design of a reliable model, combining a variety of design patterns, MVC model so become relatively easy to achieve. Views can be seen as a tree, apparently can be used to achieve the Composite Pattern. Views and Models of the relationship between the Observer Pattern can be reflected. Controller to control the display of Views can be used to achieve the Strategy Pattern. Model is usually a mediator can be used to achieve the Mediator Pattern。
Keyword: Network service;Personal chats;;Hibernate;MVC;Socket
II
兰州交通大学博文学院毕业设计(论文)
目录
1 系统概述 ............................................................... 1
1.1系统设计(研究)的背景、目的和意义 ................................ 1
1.1.1 系统开发的背景 .............................................. 1 1.1.2 系统开发的目的和意义 ........................................ 1 1.2 对已有聊天软件的分析 .............................................. 2
1.2.1 QQ .......................................................... 2 1.2.2 网页聊天室 .................................................. 2 1.2.3 本系统具有的优势 ............................................ 2 1.3 系统设计的环境与开发方案 .......................................... 2
1.3.1 系统开发环境 ................................................ 2 1.3.2 系统开发方案 ................................................ 3
2 关键技术介绍 ........................................................... 4
2.1 软件开发所采用的关键技术 .......................................... 4
2.1.1 Java语言简介 ................................................ 4 2.1.2 Socket通信技术 .............................................. 4 2.1.3 MVC模式 .................................................... 4 2.1.4 Hibernate框架技术 .......................................... 5 2.2 开发平台 .......................................................... 6
2.2.1 Eclipse简介 ................................................. 6
3 需求分析 ............................................................... 8
3.1 功能分析 .......................................................... 8 3.2 性能需求 .......................................................... 9 3.3 系统用例图 ........................................................ 9
3.3.1 服务器端 .................................................... 9 3.3.2 客户端 ..................................................... 10
4 系统设计 .............................................................. 11
4.1 系统功能模块设计 ................................................. 11
4.1.1 聊天室总体功能模块图 ....................................... 11 4.1.2 服务器端功能模块图 ......................................... 11
III
兰州交通大学博文学院毕业设计(论文)
4.1.3 客户端功能模块图 ........................................... 12 4.2 数据库设计 ....................................................... 12
4.2.1 数据库概念结构设计 ......................................... 12 4.2.2 数据库逻辑结构设计 ......................................... 12 4.2.3 数据库物理设计 ............................................. 13 4.3 聊天室服务器端设计 ............................................... 16
4.3.1 服务器设计思想 ............................................. 16 4.3.2 服务器端界面 ............................................... 17 4.3.3 服务器端各主要类的定义及其功能 ............................. 17 4.3.4 服务器端用户管理功能的设计 ................................. 18 4.3.5 服务器端显示消息的功能设计 ................................. 18 4.3.6 服务器保存系统消息日志功能的实现 ........................... 19 4.4 聊天室客户端设计 .............................................. …… 此处隐藏:4999字,全部文档内容请下载后查看。喜欢就下载吧 ……
相关推荐:
- [说明书]浅谈视觉传达设计中的色彩艺术
- [说明书]数据库原理-实验8-查询优化
- [说明书]临时用电施工组织设计
- [说明书]反假币考试试题第二套(人民币)
- [说明书]《建设工程监理规范》-2014.3.1实施
- [说明书]筋出槽,骨错缝病机诠释
- [说明书]百度预计来路对网站权重有多大影响
- [说明书]房屋面积测绘细则
- [说明书]计算机控制技术填空题汇总
- [说明书]乡镇卫生院(社区中心)死亡医学证明管
- [说明书]2013尾矿工实操试题
- [说明书]2015事业单位面试备考:贵州省事业单位
- [说明书](目录)2017-2022年半导体材料市场发
- [说明书]浙江省制造业发展“十三五”规划
- [说明书]干部选拔任用工作情况的自查报告
- [说明书]《发电厂电气部分》课后部分问答题整理
- [说明书]中国建立政府成本会计制度的思考
- [说明书]中国文化输出的现状及挑战-100分
- [说明书]通信原理实验指导(13-9)
- [说明书]HSF培训试卷(有害物质培训考试试题)
- 高中地理必修一:2.3《大气环境之六_气
- 新人教版八年级数学上期末总复习精品优
- WEB应用托管平台系统架构
- 《应用文写作》期末试卷
- 2017年秋九年级数学上册24.3正多边形和
- _空心村_形态特征与生成机理分析_以河
- 北师大版生物七年级下册12章2节感受器
- 社区卫生服务中心主任职责
- 广东省2014届广州二模材料作文“求道”
- 完整户口本英文翻译模板
- 2015年液化天然气LNG市场调研及发展趋
- 农村学校教育发展新
- 2014年注册税务师税法(Ⅱ)考试试题及答
- 东方大学俄语新版第5册第-7课课文翻译
- 路基路面工程课程设计1
- 219亩项目2011营销策略
- 第1篇 贸易术语-EXW、FCA、FAS
- 年会或大型活动防疫应急预案
- 改善提案(合理化建议)
- 初三英语第四单元ppt