教学文库网 - 权威文档分享云平台
您的当前位置:首页 > 精品文档 > 说明书 >

聊天室的实现与设计

来源:网络收集 时间:2025-09-14
导读: 兰州交通大学博文学院毕业设计(论文) 摘要 本聊天室设计初衷是为软件开发人员在局域网中方便交流,减少成本,消除由于交流不便带来的开发成本上升。本系统的开发主要用到了Oracle数据库技术、Hibernate框架、MVC架构技术、网络通信技术、windows的多线程技

兰州交通大学博文学院毕业设计(论文)

摘要

本聊天室设计初衷是为软件开发人员在局域网中方便交流,减少成本,消除由于交流不便带来的开发成本上升。本系统的开发主要用到了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字,全部文档内容请下载后查看。喜欢就下载吧 ……

聊天室的实现与设计.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.jiaowen.net/wendang/449201.html(转载请注明文章来源)
Copyright © 2020-2025 教文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:78024566 邮箱:78024566@qq.com
苏ICP备19068818号-2
Top
× 游客快捷下载通道(下载后可以自由复制和排版)
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能出现无法下载或内容有问题,请联系客服协助您处理。
× 常见问题(客服时间:周一到周五 9:30-18:00)