基于javaweb的养老院管理系统

基于javaweb的养老院管理系统

摘要

进入21世纪,计算机技术迅速向着网络化的、集成化方向发展。传统的单机版应用软件正在渐渐退出舞台,取而代之的是可以对网络、多种数据信息进行支持的新一代网络版应用软件,并由此慢慢形成了信息化的社会。信息化社会的逐步形成和微电子技术日新月异的进步,对落后低效的办公手段提出了挑战,信息是管理的基础,也是进行每一步决策的基本依据。在一个组织中,信息已作为人力、物力、财力之外的第四种资源,占有着重要的地位。然而,信息是一种无实体化的,不同于旧有形式基本资源的新形式的资源。信息也是管理的对象,必须进行管理和控制才能使它发挥它的价值。本养老院管理系统是将IT技术用于养老院信息的管理, 它能够收集与存储养老院的档案信息,提供更新与检索养老院信息档案的接口;提高工作效率。

本系统是基于JAVA平台开发的一套数字化养老院管理的系统。系统以JSP为编程语言。使用现下最流行的关系型数据库之一Mysql建立数据之间的转换。论文主要介绍了本课题的开发背景,所要完成的功能以及开发的过程。重点的说明了系统设计的重点、设计思想、难点技术和解决方案等。

关键词:养老院;系统;计算机;信息

Digital nursing home management system based on JavaEE

Abstract

In twenty-first Century, computer technology was developing rapidly towards the integration and networking. The traditional single computer application software is gradually withdrawing from the stage, which is replaced by a new generation of network version application software that can support the network and a variety of data information, and thus gradually formed the information society. The gradual formation of the information society and the rapid progress of microelectronic technology have challenged the backward and inefficient office means. Information is the basis of management, and it is also the basic basis for every step. In an organization, information has been regarded as the fourth resource outside human resources, material resources and financial resources, and occupies an important position. However, information is a new form of resources that is not materialized and is different from the old form of basic resources. Information is also the object of management. It must be managed and controlled to make it play its value. The management system of this nursing home is to use IT technology to manage the information of the nursing home. It can collect and store the archives information of the nursing home, provide the interface to update and retrieve the information archives of the nursing home, and improve the working efficiency.

The system is based on the JAVA platform developed by a digital nursing home management system. The system uses JSP as a programming language. Use the Mysql, one of the most popular relational databases, to build data conversion. This paper mainly introduces the development background, the functions and the development process of the project. The emphasis is laid on the key points of system design, design ideas, difficult technologies and solutions.

Keywords: Nursing homes; system; computer; information

  1. 绪论

计算机已经从科研院所,大中型企业,走进了平民百姓之家,Internet遍及全球各地,在网上能够用计算机进行文件的拟定、修改、打印清样、文件登陆、检索、综合统计、分类、数据库管理等,用科学的方法将无序的信息进行加工整理,组成有序的、方便存储和利用的艺术科研共享信息已经日趋流行。计算机技术、网络技术和信息技术的发展,越来越多地改善现代人的工作、生活等方方面面。养老院信息管理系统是计算机技术和网络迅速发展的一个养老院信息应用解决方案。养老院管理信息系统将Internet网络技术与现代管理观念相融合,针对信息技术的特点对养老院管理信息系统进行规划和重构,对养老院信息流进行优化及合理配置,生成动态的、安全的、专有的数字化信息源,将养老院体系全面自动化,流程化,数字化。以此为桥梁,横向连接养老院信息系统,从而更明确、更有效地支持养老院信息的管理和决策。目前社会已经进入了信息时代,社会的各个领域由于信息技术革命,都发生了改天换地的变化,紧跟时代的步伐是每个养老院的发展所趋,加强养老院竞争力和提高各个养老院现代化的管理能力,来适应整个科技社会的变化和发展。养老院对信息需求的增长,使计算机、网络技术已经融合到各种养老院的平常工作当中。为了在各养老院竞争中有明显的优势,本文研究了养老院管理信息系统,从而加快了养老院信息化建设的步伐。

    1. 选题的依据及意义

信息技术的发展,带来机遇的同时,也使养老院信息管理工作面临严峻的挑战。因为,在当前互联网开放式环境下,传统的养老院信息管理模式是以资金运动为对象的,它存在许多局限性,在当前的环境下,已经很难再适应养老院经营管理的要求,可以说,传统的养老院信息管理模式,不仅不能适合养老院的发展,也已经远远不能够适应当前社会发展新形势的要求。在互联网技术还没有得到广泛应用的早期,各养老院信息之间的交流、养老院管理信息系统的处理都是人工操作完成的,随着社会进入信息时代和社会生活的快节奏化,在传统的养老院信息管理中,需要经过若干道手续,整个过程都需要手工操作,效率十分低下。旧的养老院信息的管理方法早就不能满足大量的养老院信息的快速处理与统计的需求,不能适应时代的发展趋势,且由于他们之间关联复杂,统计和查询的方式各不相同;且会出现信息的重复传递问题,因此该过程必须实现信息化,于是需要一种新的技术改善现状,因此养老院管理信息系统在适应时代发展需求中产

生。是以,作为现代社会的养老院,必须建立一种能够应付这些新形式的新的养老院信息管理模式,养老院管理信息系统便是这些养老院的一种理想的选择。养老院管理信息系统,具有创新性和革命性的功能和意义。信息化系统的建设是推进养老院管理创新、技术创新和制度创新和文化创新的强大动力,是提升养老院经营链高效运作的重要保障。同时,在当前信息经济时代,养老院信息化管理是养老院信息化的重点和核心,在养老院信息化进程中,起到关键性作用。

    1. 国内外现状研究

美国对养老院管理信息系统的研究较早,美国养老院信息学会在其 09年发表的《 基本养老院信息理论说明》当中提出了几项评定养老院信息的指标:相关性方面、可验证方面、超然方面和可定量方面。这是全世界首次正式提出了养老院信息的质量标准。这个报告对后来的养老院管理信息系统的研究产生了非常之大的影响。

国内目前已有很多养老院实现了信息化管理,建立了基于内部的局域网系统,外部和因特网相连,硬件设施也是非常完备。另外在软件应用方面,我国很多软件开发公司已开发了各种各样的养老院信息管理系统,不过这些养老院信息管理系统很多是基于当前国内的养老院信息管理制度,没有实现特别强大的功能应用,尚未能够受到国际上的认可,暂时没有实现国际化标准的要求。养老院管理信息系统怎么去面对国际化的发展要求,将会是我国面临的非常重要的问题。近年来我国信息事业发展迅速,手工管理方式在养老院信息管理等需要大量事务处理的应用中已显得不相适应,采用IT技术提高服务质量和管理水平势在必行。目前,对外开放必然趋势使信息行业直面外国同行单位的直接挑战,因此,信息行业必须提高其工作效率,改善其工作环境。

    1. 研究目的   

本课题的目的是使养老院信息管理清晰化,透明化,便于操作,易于管理。通过功能模块的优化组合实现不同的管理细节,使管理过程实现最大程度的自动化与信息化,并能自动对人工操作环节进行复查,使养老院管理信息系统出错率降至最低。

如何开发一个实用的养老院管理信息系统,是摆在设计者面前的一大难题。 通过对养老院管理信息系统进行深入分析和研究,本文从功能模块、数据格式、通用性三个方面进行细化,提出养老院管理信息系统设计的理论依据和实现的方法。 

  1. 设计技术与开发环境

2.1 相关技术介绍   

2.1.1 JSP简介

JSP是由SunMicrosystems公司倡导、许多公司参与一起建立的一种动态技术标准。在传统的网页HTML文件(*.htm,*.html)中加入Java程序片段(Scriptlet)和JSP标签,就构成了JSP网页java程序片段可以操纵数据库、重新定向网页以及发送E-mail等。1999年6月,Sun微系统公司推出一项新的技术即JSP技术,这是基于整个Java体系以及JavaServlet的设计开发Web的技术,我们利用这一技术可以建立的动态网站是安全、先进并能跨平台。在很多方面,JSP技术对动态Web页面的开发加速了。[9]我们能从以下几个方面看到它的特点:

使用JSP技术,开发人员可以使用XML或者HTML标识来设计Web页面和最终页面的格式化。页面上的动态内容可以使用JSP脚本或者标识来生成(可以根据请求来变化内容,例如请求帐号信息或者一本书的价格)。[3]生成内容的代码被封装在Servlet和JavaBean组件中,并且结合在脚本中,在服务器端运行所有的脚本,所请求的内容通过JSP引擎解释JSP标识和脚本程序来生成(例如,通过访问JavaBean组件,访问数据库使用JDBC技术,或者包含文件),并且结果将以HTML(或者XML)页面的形方法发送回到浏览器。这就有利于作者保护自己的代码,而又保证任何基于HTML的Web浏览器的完全可用性。[3]

通常JSP页面很少进行数据处理,只是用来实现网页的静态化页面,只是用来提取数据,不会进行业务处理。

JSP技术使用Java编程语言编写类XML的tags和scriptlets,来封装产生动态网页的处理逻辑。网页还能通过tags和scriptlets访问存在于服务端的资源的应用逻辑。JSP将网页逻辑与网页设计的显示分离,支持可重用的基于组件的设计,使基于Web的应用程序的开发变得迅速和容易。 JSP(JavaServer Pages)是一种动态页面技术,它的主要目的是将表示逻辑从Servlet中分离出来。

JSP页面由HTML代码和嵌入其中的Java代码所组成。服务器在页面被客户端请求以后对这些Java代码进行处理,然后将生成的HTML页面返回给客户端的浏览器。Java Servlet是JSP的技术基础,而且大型的Web应用程序的开发需要Java Servlet和JSP配合才能完成。JSP具备了Java技术的简单易用,完全的面向对象,具有平台无关性且安全可靠,主要面向因特网的所有特点。自JSP推出后,众多大公司都支持JSP技术的服务器,如IBM、Oracle、Bea公司等,所以JSP迅速成为商业应用的服务器端语言。

JSP主要优先如下:

(1)一次编写,可到多处运行。就这点来说Java比PHP更出色,除了系统之外,不需要更改任何代码。

(2)多平台支持系统。在所有平台上的任何环境之中基本上都可以开发,在任何环境中进行系统部署,在任意环境中扩展。相比JSP/PHP的局限性是显而易见的。

(3)强大的可伸缩性。从只有一个小的war文件就可以运行Servlet/JSP,到由多台服务器进行集群和负载均衡,到多台Application进行事务处理,消息处理,一台服务器到无数台服务器,Java显示了一个巨大的生命力。

(4)多样化和功能强大的开发工具支持。这一点与JSP很像,Java已经有了许多非常优秀的开发工具,而且许多可以免费得到,并且其中许多已经可以顺利的运行于多种平台之下。

2.1.2 B/S模式分析

C/S模式主要由客户应用程序(Client)、服务器管理程序(Server)和中间件(middleware)三个部件组成。客户应用程序是系统中用户与数据组件交互。服务器程序负责系统资源,如管理信息数据库的有效管理,其主要工作是当多个客户端同时请求同一个服务器上的资源,以优化这些资源的管理。中间件是负责连接客户端应用程序和服务器管理器,一个合作作业完成,以满足用户的查询的管理数据的要求。  

B/S模式首先简化了客户端。它无需象C/S模式那样在不同的客户机上安装不同的客户应用程序,而只需安装通用的浏览器软件。这样不但可以节省客户机的硬盘空间与内存,而且使安装过程更加简便、网络结构更加灵活。  

再次,它使用户的操作变得更简单。对于C/S模式,客户应用程序有自己特定的规格,使用者需要接受专门培训。而采用B/S模式时,客户端只是一个简单易用的浏览器软件。无论是决策层还是操作层的人员都无需培训,就可以直接使用。B/S模式的这种特性,还使 MIS系统维护的限制因素更少。

最后,B/S特别适用于网上信息发布,使得传统的MIS的功能有所扩展。这是C/S所无法实现的。而这种新增的网上信息发布功能恰是现代养老院所需的。这使得养老院的电子文件可以取代大部分的纸质文件,从而使养老院工作的效率得以提高,简化养老院行政工作的手续,节约了物力和人力。

鉴于B/S比C/S的具有更先进性,B/S逐步的成为了当今流行的一种MIS平台系统。本系统也采用B/S结构开发。

2.1.3 mysql简介

MySQL是一个关系型数据库管理系统,由瑞典MySQL AB公司开发,目前属于Oracle公司。Mysql是最流行的关系型数据库管理系统,在WEB应用方面MySQL是最好的RDBMS(Relational Database Management System:关系数据库管理系统)应用软件之一。MySQL是一种关联数据库管理系统,关联数据库将数据保存在不同的表中,这样就增加了速度并提高了灵活性。MySQL所使用的SQL语言是用于访问数据库的最常用标准化语言。MySQL软件采用了双授权政策(本词条“授权政策”),它分为社区版和商业版,由于其体积小、速度快、总体拥有成本低,尤其是开放源码这一特点,一般中小型网站的开发都选择MySQL作为网站数据库。

2.2 开发环境介绍  

2.2.1 Myeclipse简介 

MyEclipse 是一个十分优秀的用于开发J2EE和Java,的 Eclipse 插件集合,MyEclipse的功能十分强大,支持也非常广泛,特别是对多种不同的开源产品的支持十分不错。MyEclipse目前支持Java Servlet,AJAX, JSP, JSF, Struts,Spring, Hibernate,EJB3,JDBC数据库链接工具等多项功能。可以说MyEclipse是几乎囊括了目前所有主流开源产品的专属eclipse开发工具。

MyEclipse 是一个十分优秀的用于开发Java, J2EE的 Eclipse 插件集合,MyEclipse的功能非常强大,支持也十分广泛,尤其是对各种开源产品的支持十分不错。MyEclipse目前支持Java Servlet,AJAX, JSP, JSF, Struts,Spring, Hibernate,EJB3,JDBC数据库链接工具等多项功能。可以说MyEclipse是几乎囊括了目前所有主流开源产品的专属eclipse开发工具。[1]

2.2.2 Tomcat简介

Tomcat 服务器是一个免费的开放源代码的Web 应用服务器,属于小量级的应用服务器,广泛应用于中小型系统和并发访问用户不是很多的场合,是JSP程序首选的开发方式和调试方式。对于一个初学者,这可能是因为当一个好的Apache服务器上配置了一台机器,你可以用它来访问HTML页面的请求作出回应。 Apache Tomcat的实际上是服务器的扩展的一部分,但它是独立运行的,所以当你运行tomcat的,它实际上是作为与Apache单独运行的一个单独进程。

诀窍是,当配置正确时,Apache来提供HTML页面,但实际上运行Tomcat JSP页面和Servlet。另外,Tomcat和IIS,Apache和其他Web服务器,具有处理功能的HTML页面,而这是一个Servlet和JSP容器,独立的Tomcat Servlet容器是默认模式。不过,Tomcat是不如来处理静态HTML的Apache服务器的能力。目前Tomcat最新版本为8.0.0-RC1 (alpha) Released。

  1. 需求分析与可行性分析

3.1 需求分析

伴随着信息行业的蓬勃发展和人们办公自动化意识的增强,养老院信息管理部门的工作也越来越繁重,原来的养老院管理信息系统已经不能完全满足相关人员使用的需要。为了协助信息开展养老院信息管理工作,提高工作效率,充分利用信息行业的现有资源,开发更好的养老院管理信息系统势在必行。

本系统采用B/S结构、结合网络数据库开发技术来设计。本系统是一个独立的系统,用来解决养老院信息的管理问题。采用JSP技术构建了一个有效而且实用的养老院信息管理平台,目的是为高效地完成对养老院信息的管理。本系统具有标准养老院管理信息系统所具有的现实中完整的养老院信息管理步骤,完全的虚拟现实实现。真正实现节约资源、提高效率、业务处理的同时真正实现养老院管理信息系统的功能作用。

3.1.1应用需求分析

服务器

硬件

处理器:Intel 酷睿

内 存:512M 或更大

硬 盘:120G 或更大

软件

Microsoft Windows 7

Microsoft mysql

Microsoft tomcat 6.0 或更高版本

Microsoft Office 2003

客户机

硬件

无特殊要求,只要能上连接互联网即可

软件

Microsoft Windows XP

Microsoft IE 6.0 或更高版本

系统的性能要求通常指系统需要的存储容量以及后援存储,重新启动考虑到运行效率和安全性等方面的问题。系统的硬件环境:Core 5600、1G MB(RAM)、120GB(HD)。运行系统的时候对数据的安全保密性能要求不高,一般对数据不进行加密要求。另外,也不依赖其他的软件,程序有比较好的健壮性。

3.1.2 运行需求分析

硬件条件:局域网;酷睿 CPU、1G RAM、PC机要求10G硬盘以上;打印机。

软件条件:Windows XP  IE6.0以上。

3.1.3 其他需求分析

本次要开发的系统有效率,可理解性、可靠性和可维护性都比较高。用户很容易理解和学会操作。可维护性包括两种含义,即可读性和可测试性等。可靠性一般是指健壮性和正确性。在开发这个系统的过程中,需要权衡多种矛盾的目标,并在(时间、经费、可能用到的硬件和软件资源等条件)的限制下,使上面所说的各种要求得到最大限度的满足。

3.2 数据流程分析

3.2.1 系统操作流程

图3-1  系统操作流程图

3.2.2 数据增加流程

添加信息时,编号字段由系统自动生成,且不能修改,其他信息由用户输入,之后对数据进行合法判断,合法则写入保存至数据库,不合法则重新输入数据。数据增加流程图:

图3-2  数据增加流程图

3.2.3 数据修改流程

在修改信息时,先选中一条待修改的记录,然后直接输入数据,判断合法性,合法则保存至数据库,不合法重新输入。数据修改流程图如图3-3所示。

图3-3  数据修改流程图

3.2.4 数据删除流程

当用户选定一条记录时,单击删除按钮,会提示用户是否确定删除,然后删除数据库相关内容。数据删除流程图如图3-4所示。

图3-4  数据删除流程图

3.3 可行性研究

现在许多养老院用的都是纸和笔的人工管理方式,这样的管理及困难又浪费时间和成本,很容易出错。所以应该掌握先进的管理方式,从而提高养老院的效率和降低成本。养老院管理信息系统主要有以下优势:

3.3.1 经济可行性

经济可行性研究是对组织的经济现状和投资能力进行分析,对系统建设运行和维护费用进行估算,对系统建成后可能取得的社会和经济效益进行估计。由于本系统是作为毕业设计由我们自己开发的,在经济上的投入甚微,系统建成之后将为今后养老院信息管理提供很大的方便,估算新系统的开发费用和今后的运行、维护费用,本次研究开发的养老院管理信息系统可取代传统的养老院管理的业务流程,减少人工开支,节省资金,并且可大大提高信息量的取得,缩短信息处理周期,提高信息管理的效率,具有用户使用更简单、界面更直观、权限分配更合理等优点大大减少管理成本。本项目开发经费在经济上是可以接受的,并且本项目实施后可以显著提高工作效率,节省开支。所有开支都不大,所以本项目在经济上是可行的。

3.3.2 技术可行性

技术可行性要考虑利用现有的技术能否顺利的完成开发系统的工作,硬件和软件配置能不能满足开发的需求等。本次要开发的养老院管理信息系统用的是比较流行的JSP技术,用它来创建使用脚本语言,结合HTML代码来制作动态网页。即可快速完成系统的应用程序,不进行编译,容易编写,可直接在服务器端口执行,使用Windows记事本这种普通的文本编辑器,就可以设计编辑,不需要用到浏览器。因此较为简单易学调试也比较简单,软件方面:由于使用的是目前相对成熟发展的B/S模式软件,故软件开发的平台可行,因此在技术上本次开发是绝对可行的。

3.3.3 运行可行性

系统的开发,是典型的Mis开发,主要是对数据的处理,包括数据的收集,数据的变换,及数据的各种报表形式的输出。

新的系统运行后对现行旧的系统带来包括(工作环境、管理方式、组织机构等)的后果以及影响来进行评判和估计。同时更需要考虑到的是:对现有的管理人员进行培训,补充、分析在给出的时间里是不是能完成预定开发系统的任务等。

我国目前技术已经相当的普及信息化,各种工作人员都具备一定的高度的水平,所以本系统在运行上具备了可行性。

3.3.4 时间可行性

从时间上看,在两个月的时间里学习相关知识,并开发养老院管理信息系统,时间上是有点紧,但是不是不可能实现,在做毕业设计的这几个月里,我通过努力使得功能应该基本可以实现。

3.3.5 法律可行性

  • 所用到的技术资料全部都是合法的。
  • 在开发系统的过程里并没有存在知识产权的问题。
  • 并无抄袭任何已存在的养老院管理信息系统,故没有侵犯版权的问题。
  • 在设计开发系统的过程中并未涉及任何法律上的责任。

综上所述,开发本次系统从经济上、从技术上、从法律上都是完全可靠的。

  1.  系统设计

4.1 系统总体设计

系统不仅要求功能完善,而且还要界面友好,因此,对于一个成功的系统设计,功能模块的设计是关键。由于本系统可执行的是一般性质的养老院信息管理工作,本系统具有一般适用性,其所实现的功能满足养老院对日常性养老院信息的管理。首先,整个系统分成几个小的模块,小的问题,然后,进一步细分模块,添加细节。

系统功能模块如图4-1所示:

图4-1系统功能模块图

4.2 系统开发步骤

  一般说来,信息管理系统的应用和成立可以分为三个阶段的:开发系统,总体规划和操作系统,可进一步划分为系统开发系统实施,系统设计和系统分析和工作等方面的阶段。每个发展阶段安排在一个严格的线性序列来开发,在每一个阶段所产生的工作指导和依据每个阶段处理文件审查下一阶段的完整的技术文档,相信这个阶段已经完成,之后实现要求进入下一个阶段,而在以后的工作中不能轻易对以前的评估结果有所改变。

上述开发的方法是有便于进行设计开发工作的管理和组织的最大优点,而且在最大程序上减少了开发信息管理系统的复杂性。国内外有很多已经开发好的系统的实际例子都能证明这是一个效果非常不错的开发方法。

4.3 概要设计

在系统需求分析阶段,搞清楚了要开发的这个软件需要“做什么”的问题,形成一个系统目标的逻辑模型来。然后我们所要做的就是要把软件需要“做什么”的这个逻辑模型转换成“怎么做”的一个物理模型,最后再着手实现系统的需求。首先,我们需要描述的是系统的总的体系结构。

4.4 数据库概念结构设计

在每一个应用程序中,数据库的设计是其中非常重要的部分,选择合适的数据库并创建合计的结构式开发程序时首要的问题。数据库将用mysql进行设计和管理。数据库安全性就是保证数据库信息的保密性,完整性,一致性和可用性,防止非法用户越权使用数据库从而窃取,更改或破坏数据库中数据[6],将提供一些安全措施来保证数据库的安全。根据以上章节对系统所做的需求分析和系统设计,规划出本系统中使用的数据库实体E-R图如图4-2所示: 

图4-2系统实体E-R图

4.5 数据库逻辑结构设计

模式设计的目的是确定物理数据结构。它的主要问题是处理具体的数据库管理系统的结构约束。第三范式形式的实体及关系模型是模式设计过程的输入。我们通常用“范式”定义来对数据冗余的程度进行消除。第一范式(1NF)数据冗余很大程度上,第五范式(5NF)最小的数据冗余水平。但是,范式级别越高,则需要存储相同的数据被分解成多个表,随着范式水平的提高,数据结构的存储结构和问题的域之间的匹配程度也在不断变化的数据需求下降的时候,因此,不太稳定。第三范式是需要提高访问表中增加的水平,因此性能(速度)将减少。从实际的角度来看,选择在大多数情况下,第三范式是比较合适的。该系统的大致轮廓确定以下,一个重要的步骤就是设计一个数据库的内容以及表的设计直接影响了开发的系统的质量。在设计的过程中,考虑了设计数据表范式规则,但更重要的考虑了用户使用的方便性。根据E-R模型,该软件建立了以下逻辑数据结构。

数据库概念模型独立于任何特定的数据库管理系统,因此,需要根据具体使用的数据库管理系统的特点进行转换。本系统的数据结构比较清晰,依据养老院管理信息系统的功能要求,主要设计出数据库的表如下:

admin管理员信息表

列   名

数据类型

长度

说  明

id

int

4

编号

name

varchar

50

管理员ID

password

varchar

50

管理员密码

Realname

varchar

50

增加时间

Sex

varchar

50

性别

age

varchar

50

年龄

address

varchar

50

地址

tel

varchar

50

电话

addtime

varchar

50

时间

Fy费用信息表

列   名

数据类型

长度

说  明

id

int

4

编号

Lr

varchar

50

姓名

Fy

varchar

50

费用

Kc

varchar

50

扣除

Zt

varchar

50

状态

Hgqj护工请假信息表

列   名

数据类型

长度

说  明

id

int

4

编号

Lr

varchar

50

姓名

Fy

varchar

50

时间

Kc

varchar

50

事由

Zt

varchar

50

状态

qj请假信息表

列   名

数据类型

长度

说  明

id

int

4

编号

Lr

varchar

50

姓名

Fy

varchar

50

时间

Kc

varchar

50

事由

Zt

varchar

50

状态

Xz薪资信息表

列   名

数据类型

长度

说  明

id

int

4

编号

Lr

varchar

50

姓名

Fy

varchar

50

费用

Kc

varchar

50

扣除

Zt

varchar

50

状态

  1.  系统实现

5.1 系统登陆模块 

本模块将要实现用户登录功能。接受用户输入的登录名和密码信息,先做客户端的有效性检验,通过检验后提交给服务器端,由服务器端提交信息与数据库里的信息相比较,如果二者不符则返回相应的出错信息,否则登录进入系统。

登陆页面的运行结果如图5-1所示:

图5-1系统登陆界面 

5.2 系统首页实现 

系统首页为用户提供了信息管理的功能导航菜单,用户登录后可以通过点击里面的菜单链接按钮跳转到其页面来完成相应的功能操作。

系统首页效果如图5-2所示:

图5-2 系统首页界面

5.3 密码管理模块实现 

经常对密码进行管理和新密码的设置有利于系统和自身信息的安全性保障。

修改密码界面效果如图5-3所示:

图5-3 密码管理模块界面

5.4 用户信息管理模块

实现用户信息的增加、删除、修改、查找操作,用户信息管理的运行结果如图5-4所示: 

图5-4用户信息管理界面

package com.action;

/**

 * 管理员登陆 增加 修改 删除  

 */

import java.io.IOException;

import java.text.SimpleDateFormat;

import java.util.Calendar;

import java.util.List;

import java.util.StringTokenizer;

import javax.servlet.ServletException;

import javax.servlet.http.HttpServlet;

import javax.servlet.http.HttpServletRequest;

import javax.servlet.http.HttpServletResponse;

import javax.servlet.http.HttpSession;

import com.bean.ComBean;

import com.util.Constant;

import com.util.MD5;

public class AdminServlet extends HttpServlet {

public AdminServlet() {

super();

}

public void destroy() {

super.destroy(); // Just puts "destroy" string in log

// Put your code here

}

public void doGet(HttpServletRequest request, HttpServletResponse response)

throws ServletException, IOException {

doPost(request,response);

}

public void doPost(HttpServletRequest request, HttpServletResponse response)

throws ServletException, IOException {

response.setContentType(Constant.CONTENTTYPE);

request.setCharacterEncoding(Constant.CHARACTERENCODING);

String date=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(Calendar.getInstance().getTime());

String date2=new SimpleDateFormat("yyyy-MM-dd").format(Calendar.getInstance().getTime());

try{

String method=request.getParameter("method").trim();

ComBean cBean = new ComBean();

HttpSession session = request.getSession();   

if(method.equals("one")){//用户登录

String username = request.getParameter("username");

String password = request.getParameter("password");  

String sf = request.getParameter("sf");  

String sql="select realname from admin where username='"+username+"' and  password='"+password+"'  and  sf='"+sf+"' ";

String str=cBean.getString(sql);

if(str==null){

request.setAttribute("message", "登录信息错误!");

request.getRequestDispatcher("index.jsp").forward(request, response);

}

else{

session.setAttribute("user", username); session.setAttribute("sf", sf);

request.getRequestDispatcher("admin/index.jsp").forward(request, response);

}  

}

else if(method.equals("uppwd")){//修改密码

String username=(String)session.getAttribute("user");

String oldpwd = request.getParameter("oldpwd");

String newpwd = request.getParameter("newpwd");

String str=cBean.getString("select id from admin where username='"+username+"' and  password='"+oldpwd+"'");

if(str==null){

request.setAttribute("message", "原始密码信息错误!");

request.getRequestDispatcher("admin/system/editpwd.jsp").forward(request, response);

}

else{

int flag=cBean.comUp("update admin set password='"+newpwd+"' where username='"+username+"'");

if(flag == Constant.SUCCESS){

request.setAttribute("message", "操作成功!");

request.getRequestDispatcher("admin/system/editpwd.jsp").forward(request, response);

}

else {

request.setAttribute("message", "操作失败!");

request.getRequestDispatcher("admin/system/editpwd.jsp").forward(request, response);

}

}

}

else if(method.equals("adminexit")){//退出登录

session.removeAttribute("user");  session.removeAttribute("sf");

request.getRequestDispatcher("index.jsp").forward(request, response);

}

else if(method.equals("addm")){//增加系统用户

String username = request.getParameter("username");

String password = request.getParameter("password");

String realname = request.getParameter("realname");

String sex = request.getParameter("sex");

String age = request.getParameter("age");

String address = request.getParameter("address");

String tel = request.getParameter("tel");

String str=cBean.getString("select id from admin where username='"+username+"'");

if(str==null){

int flag=cBean.comUp("insert into admin(username,password,realname,sex,age,address,tel,addtime ) " +

"values('"+username+"','"+password+"','"+realname+"','"+sex+"','"+age+"','"+address+"','"+tel+"','"+date+"' )");

if(flag == Constant.SUCCESS){

request.setAttribute("message", "操作成功!");

request.getRequestDispatcher("admin/system/index.jsp").forward(request, response);

}

else {

request.setAttribute("message", "操作失败!");

request.getRequestDispatcher("admin/system/index.jsp").forward(request, response);

}

}

else{

request.setAttribute("message", "该用户名已存在!");

request.getRequestDispatcher("admin/system/index.jsp").forward(request, response);

}

}

else if(method.equals("upm")){//修改系统用户

String id = request.getParameter("id");

String password = request.getParameter("password");

String realname = request.getParameter("realname");

String sex = request.getParameter("sex");

String age = request.getParameter("age");

String address = request.getParameter("address");

String tel = request.getParameter("tel");  

int flag=cBean.comUp("update admin set password='"+password+"',realname='"+realname+"',sex='"+sex+"',age='"+age+"'," +

"address='"+address+"',tel='"+tel+"' where id='"+id+"'");

if(flag == Constant.SUCCESS){

request.setAttribute("message", "操作成功!");

request.getRequestDispatcher("admin/system/index.jsp").forward(request, response);

}

else {

request.setAttribute("message", "操作失败!");

request.getRequestDispatcher("admin/system/index.jsp").forward(request, response);

}

}

else if(method.equals("delm")){//删除系统用户

String id = request.getParameter("id");  

int flag=cBean.comUp("delete from admin where id='"+id+"'");

if(flag == Constant.SUCCESS){

request.setAttribute("message", "操作成功!");

request.getRequestDispatcher("admin/system/index.jsp").forward(request, response);

}

else {

request.setAttribute("message", "操作失败!");

request.getRequestDispatcher("admin/system/index.jsp").forward(request, response);

}

}

else{//无参数传入转到错误页面

request.getRequestDispatcher("error.jsp").forward(request, response);

}

}catch(Exception e){

e.printStackTrace();

request.getRequestDispatcher("error.jsp").forward(request, response);

}

}

public void init() throws ServletException {

// Put your code here

}

}

5.5 老人信息管理模块实现 

老人信息管理子模块的主要功能就是管理员对老人信息进行增删改查的操作,即增加老人信息、修改老人信息、删除老人信息、查询老人信息。

老人信息管理的运行结果如图5-5所示:

 

图5-5老人信息管理界面

package com.action;

import java.io.IOException;

import java.text.SimpleDateFormat;

import java.util.Calendar;

import java.util.List;

import javax.servlet.ServletException;

import javax.servlet.http.HttpServlet;

import javax.servlet.http.HttpServletRequest;

import javax.servlet.http.HttpServletResponse;

import javax.servlet.http.HttpSession;

import com.bean.ComBean;

import com.util.Constant;

public class ComServlet extends HttpServlet {

public ComServlet() {

super();

}

public void destroy() {

super.destroy(); // Just puts "destroy" string in log

// Put your code here

}

public void doGet(HttpServletRequest request, HttpServletResponse response)

throws ServletException, IOException {

doPost(request,response);

}

public void doPost(HttpServletRequest request, HttpServletResponse response)

throws ServletException, IOException {

response.setContentType(Constant.CONTENTTYPE);

request.setCharacterEncoding(Constant.CHARACTERENCODING);

HttpSession session = request.getSession();

ComBean cBean = new ComBean();

String date=new SimpleDateFormat("yyyy-MM-dd").format(Calendar.getInstance().getTime());

String date2=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(Calendar.getInstance().getTime());

String method = request.getParameter("method");

if(method.equals("addlr")){  //老人信息   

//String xm="";String xb="";String nl="";String st="";String hj="";String sfz="";String lxr="";

//String dh="";String zz="";String cw="";String hg="";String rz="";String cy="";

String xm = request.getParameter("xm");

String xb = request.getParameter("xb");

String nl = request.getParameter("nl");

String st = request.getParameter("st");

String hj = request.getParameter("hj");

String sfz = request.getParameter("sfz");  

String lxr = request.getParameter("lxr");  

String dh = request.getParameter("dh");  

String zz = request.getParameter("zz");  

String cw = request.getParameter("cw");  

String hg = request.getParameter("hg");  

String rz = request.getParameter("rz");  

String cy = request.getParameter("cy");   

int flag = cBean.comUp("insert into lr(xm,xb,nl,st,hj,sfz,lxr,dh,zz,cw,hg,rz,cy)  " +

"values('"+xm+"','"+xb+"','"+nl+"','"+st+"','"+hj+"','"+sfz+"','"+lxr+"','"+dh+"','"+zz+"','"+cw+"','"+hg+"','"+rz+"','"+cy+"' )");

if(flag == Constant.SUCCESS){

request.setAttribute("message", "操作成功!");

request.getRequestDispatcher("admin/lr/index.jsp").forward(request, response);

}

else{

request.setAttribute("message", "操作失败!");

request.getRequestDispatcher("admin/lr/index.jsp").forward(request, response);

}

}

else if(method.equals("uplr")){ //修改老人信息

String id=request.getParameter("id");

String xm = request.getParameter("xm");

String xb = request.getParameter("xb");

String nl = request.getParameter("nl");

String st = request.getParameter("st");

String hj = request.getParameter("hj");

String sfz = request.getParameter("sfz");  

String lxr = request.getParameter("lxr");  

String dh = request.getParameter("dh");  

String zz = request.getParameter("zz");  

String cw = request.getParameter("cw");  

String hg = request.getParameter("hg");  

String rz = request.getParameter("rz");  

String cy = request.getParameter("cy");     

int flag = cBean.comUp("update lr set xm='"+xm+"',xb='"+xb+"',nl='"+nl+"',st='"+st+"',hj='"+hj+"',sfz='"+sfz+"'" +

",lxr='"+lxr+"',dh='"+dh+"',zz='"+zz+"',cw='"+cw+"',hg='"+hg+"',rz='"+rz+"',cy='"+cy+"' where id='"+id+"'");

if(flag == Constant.SUCCESS){

request.setAttribute("message", "操作成功!");

request.getRequestDispatcher("admin/lr/index.jsp").forward(request, response);

}

else{

request.setAttribute("message", "操作失败!");

request.getRequestDispatcher("admin/lr/index.jsp").forward(request, response);

}  

}

else if(method.equals("dellr")){//删除老人信息

String id = request.getParameter("id");

int flag = cBean.comUp("delete from lr where id='"+id+"'");

if(flag == Constant.SUCCESS){

request.setAttribute("message", "操作成功!");

request.getRequestDispatcher("admin/lr/index.jsp").forward(request, response);

}

else{

request.setAttribute("message", "系统维护中,请稍后再试!");

request.getRequestDispatcher("admin/lr/index.jsp").forward(request, response);

}

}

  1.  程序测试与评价

6.1 程序调试

在设计系统的过程中,存在一些错误是必然的。对于语句的语法错误,在程序运行时自动提示,并请求立即纠正,因此,这类错误比较容易发现和纠正。但另一类错误是在程序执行时由于不正确的操作或对某些数据的计算公式的逻辑错误导致的错误结果。这类错误隐蔽性强,有时会出现,有时又不出现,因此,对这一类动态发生的错误的排查是耗时费力的。

6.2 程序的测试

6.2.1 测试的重要性及目的

(1)测试的重要性

在软件生命周期中,软件的测试占据着一个重要的位置,在传统的瀑布模式中,软件测试学只是处于在运行维护阶段之前,是软件产品交付给大众用户使用之前用以保证软件质量重要的一个方法。近来,软件工程界中更加趋向于一种新观点,即认为软件每一阶段中的生命周期都理应包含测试,因此使检查本阶段的成果能不能接近预期的结果目标,进而尽可能早一点发现到错误并加以改正,如果测试不是在早期阶段进行的,那么错误将延时扩散,最后常常会导致成品测试面临巨大的困难。

对于软件来讲,事实上,无论采用任何方法或者任何技术,系统中仍然会出现错误。采用新的开发方式、先进的语言、完善的开发过程,可以最大限度的降低错误的引进,但还是不能完全的杜绝软件中有可能出现的错误,这些引入的错误需要通过测试找出来,系统中错误的密度也需要通过测试来进行估量。测试是所有学科的工程的最基本的组成单元,是软件开发的一个很重要的部分。自有设计程序的那天起测试就一直伴随着。统计表明,在典型的软件开发项目中,软件测试工作量往往占软件开发总工作量的40%以上。而在软件开发的总成本中,用在测试上的开销要占30%到50%。如果把维护阶段也考虑在内,讨论整个软件生存期时,测试的成本比例也许会有所降低,但实际上维护程序的工作相当于二次开发,甚至是多次开发,其中一定又包含了很多测试的工作。

在实践中,测试软件非常困难,从而常常使我们敷衍了事或望而却步,这是因为对测试还是存在了一些错误的看法和不正确的态度,这包括:

①难以给测试的工作人员某种成就感; 认为测试工作并不像编码和设计那样容易进行发展

②在测试的过程中发现错位其实是一种对责任者工作的否定; 测试是以发现软件的错误为目标的,这是非建设性的,甚至还是具有破坏性的,

③测试的工作过程非常枯燥无味,因此不足以引起我们的兴趣和爱好;

④测试工作需要是细致而艰苦的进行;

⑤一般来说,我们都对自己编写出来的程序比较盲目的自信,在发现到错误的时候,可能会顾虑别人对我们自己开发的能力的看法。

以上这几个观点对测试系统的工作进行是尤为不利的,我们必须要端正态度、澄清认识,才可能将系统产品的质量加以提高。

(2)测试的目的

如果测试程序的目的是为了尽可能全面地找出系统中的错误,那么测试就必须直观的针对软件较为复杂的部分或者是前期出现错误比较多的位置。

①系统的测试是为了检查出错误而执行程序的运行过程;

②测试则是为了证明程序中有错误,而不是用来证明程序没有错误;

③每一个好的测试的用例是因为它能检查到至今未出现的错误;

④一个很成功的测试就是检查出了至今未能发现的错误的测试。                             

这种观点可以提醒人们测试要以查找错误为中心,而不是为了演示软件的正确功能。但是仅凭字面意思理解这一观点可能会产生误导,认为发现错误是软件测试的唯一目,查找不出错误的测试就是没有价值的,事实并非如此。

首先,测试并不仅仅是为了要找出错误。通过分析错误产生的原因和错误的分布特征,可以帮助项目管理者发现当前所采用的软件过程的缺陷,以便改进。同时,这种分析也能帮助我们设计出有针对性地检测方法,改善测试的有效性。其次,没有检查出错误的测试也有它的价值,完整的测试是测试质量评定的一种方式。

6.2.2 测试的步骤

类似系统开发的过程,测试工作的过程也需要分步骤来进行,每个步骤在逻辑上是前一个步骤的继续。大型系统软件一般是由若干个子系统而组成的,每一个子系统又是由若干个小的模块组成的。因此,大型系统软件的测试功过基本上由下面的几个步骤组成:

(1)模块测试 在对模块进行的测试工作步骤中所发现的经常是详细设计和编码的错误。

(2)系统测试 在对系统进行的测试工作步骤中发现的经常是软件设计时出现的错误,也有可能会发现需求说明中的出现错误。

(3)验收测试 在对验收进行的测试工作步骤中发现的经常是系统需求说明书中出现的错误。

6.2.3 测试的主要内容

我们在进行测试工作的时候为了保证系统的质量,可以将测试工作的内容分成以下所说的几个部分,即: 审查代码、集成测试、单元测试、系统测试和确认测试。

(1)单元测试

检查系统设计最小的单位(—个模块)就是单元测试,通过测试检查出用来定义该模块的功能说明不符合与实现该模块的实际功能的情况,以及编码时的错误。

(2)集成测试

我们可以将每个小的模块按照设计的需求组装起来后同时进行集成测试,集成测试的主要目的是检查与接口有关联的某些问题。假设一个模块和另一个模块可能会出现由于疏忽的问题而引起有危害的影响;把子功能模块组合起来后可能不能产生预期的主功能;有个别的看起来视乎能接受的误差却很有可能积累到不能接受的程度;全程数据结构可能有错误等。

(3)确认测试

确认测试的目的是向未来的用户表明系统能够像预定要求那样工作。经集成测试后,已经按照设计把所有的模块组装成一个完整的软件系统,基本排除了接口的错误,接下来我们就应该进一步的检验系统软件的有效性,就是确认测试工作的任务,是将系统软件的性能和功能发挥到如用户们合理期待的一样。

(4)系统测试

完成软件设计开发以后,最后还要将它与系统中其他的部分整合运行,从性能测试、安全测试、强度测试和恢复测试等四个方面来进行系统测试。

此外对系统的单独测试主要从以下三个方面入手:

① 功能测试:测试能否满足开发的要求,能否实现了设计所描述的功能,能否让用户的需求得到满足。系统测试必须和最常用的测试是功能测试。一般来说还会以对软件正式的说明书为标准进行测试。

② 性能及强度的测试:最高实际限度的测试系统能力,即软件在某些超负荷环境下功能是否还实现的情况。

③ 安全测试:对安装在系统内的安全保护机构确实能能不能保护系统进行验证,使系统不会受到各种不正常的干扰。因此针对本次开发的系统主要是测试错误的数据、无效的数据,测试权限系统和对抗非法数据干扰的能力。

经过了一系列的需求分析、设计和编码等开发工作后,本设备管理系统的设计也将接近尾声,接下来需要对系统的一些功能进行测试是否能够达到预期的结果。由于在测试前系统的各个模块都会存在一定的错误和缺陷,从而可能导致系统的非正常运行,有时候会出现很严重的后果。所以,对于程序设计开发来说,软件测试是一项非常重要的工作。

(1)  测试案例的内容

周期:测试时间域。

层次:测试的层面。

类型:测试的分类。

系统:测试何系统。

分系统: 测试何分系统。

模块: 测试何模块。

平台: 测试的环境。

描述: 对测试问题说明与叙述。

目的: 测试的目标与期望。

此外,还包括测试文档号、测试设置、输入条件、测试结果和期望结果。

(2) 测试案例与脚本

1)测试案例与脚本设计主要包括以下内容:

检查集成测试策略

制定测试数据目的和性能目标

找出关键测试条件

检查已有的在线测试脚本

输入或抓取在线测试脚本

检查已有的用于测试的数据

生成测试数据

检查重要的数据

执行测试数据和测试脚本

6.2.4 测试用例 

(1) 用户登录测试

用户登录信息测试过程如表6-1所示:

表6-1  用户登录测试表

测试目的

操作流程

测试用例

预测结果

测试结果

用户登录

填写用户名密码,点击首页【登录】按钮

用户名:1

密码:a

登录失败

提示错误信息

用户名:liu

密码:123456

登录成功

登录成功

(2) 信息发布测试

  信息发布测试过程如表6-2所示:

表6-2 信息发布测试表

测试项目

操作流程

测试用例

预测结果

测试结果

信息发布

管理员登陆后点击首页【信息】按钮,发布信息

发布失败,弹出提示按钮

发布失败,提示请填写内容

物流有可能延迟

发表成功

发表成功

(3)后台管理登录测试

后台管理登录测试过程如表6-3所示:

表6-3  后台管理登录测试

测试目的

操作流程

测试用例

预测结果

测试结果

后台管理登录

点击首页填写用户名密码,点击首页【登录】按钮

用户名:liu

密码:123456

登录失败

提示错误信息

用户名:a

密码:a

登录成功

登录成功

6.3 系统的特点和优点

本系统设计时借鉴了国内外优秀网站的优点,从界面到系统设计都是从方便用户,同时兼顾管理员的管理这一方面设计的。系统的主要特点和优点归纳如下:

(1)本系统最大的特色是相对一般养老院管理信息系统,本系统的设计比较有针对性。由于养老院的特殊性,在系统中也存在相应的特别的安全功能模块。

(2)该系统的位移性能也比较高,可以在大多数操作系统上运行,你只需要安装一个支持JSP和JDK,你还可以直接独立的服务器上运行的模拟服务器。数据库系统使用MySQL,实现动态查询,动态更新和动态输入数据,并提供强大的管理功能。主要用于Myeclipse中+ JDK1.6开发工具,操作简单,功能强大,可以进行不同的配置,根据用户的需求,以满足用户的不同需求。

(3)系统管理信息内容全面,方便于维护数据,特别是一些通用的字段,为了预防我们在手动输入的时候有可能会发生各种错误,该系统采用的是单选框或列表框下拉的方法来显示所有的数据,用户只要用鼠标点击来进行选择就可以完成输入的工作。这样的方式不单是为用户带来很多方便,工作效率也得以提高,而且尽可能的将发生错误的几率减少,让用户能顺利进行统计信息的工作。

(4)有比较友好的用户界面,使用方便,操作方法很简单。一般来说只要有操作商务网站经验的用户都能熟练的对本系统进行操作。

6.4 系统存在的不足和改进方案

系统存在的不足

本系统基本满足了一般养老院管理信息系统的基本功能,能够实现简单的养老院信息管理和查询等功能。但由于时间仓促,本系统还存在不少不足方面,主要体现在:

(1)界面不够美观,由于时间仓促,系统的主要表现方式还是以表格+文字的方式,颜色比较单调,一些界面不够美观,对整个系统造成了严重的影响。

(2)数据库和部分代码存在冗余,由于欠缺经验和考虑的不够充分,在很大一部分系统的设计开发中,系统代码都存在冗余,导致系统的运行质量不够好。

(3)后台的管理功能不够完善,由于多方面的原因,人力和时间缺乏,设计开发本系统后台方面管理的功能不是特别完善。

改进方案

针对于本系统产生不足,在以后的日子里,我准备进一步对系统进行改进,方案如下:

(1)对于系统不美观的界面,我会在系统中使用大量的图片,用photoshop优化操作本系统,并能使其不会对系统的传输速度产生太大的影响;同时系统的配色方案也要需要改进,根据商品的不同种类,不同时间设计出不同的系统配色的方案。

(2)针对数据库和系统代码冗余的问题,我要进一步简单化程序中的代码,不同的界面之间能共享一些函数、方法和变量,对数据库冗余的我利用数据库连接池技术使操作数据库的性能提高;可以进一步规范化数据库的关系模式,因此冗余现象得以减少。

6.5 设计收获和心得

系统设计已经接近尾声了,我所开发的养老院管理信息系统也已初具规模,虽然还没有达到特别完善的效果,但系统每一步的进步我们都付出了的很多心思。在设计与分析系统过程中,是对大学思念学习总结的过程,也是更深一步探索和学习的一个过程。在这个过程里,我深刻的认识到软件工程方法的设计与分析的思想,还进一步的了解和掌握了JSP技术和编程工具和使用方法,在该系统的设计与分析过程中有了很多切身的体会和认识,更重要的是在学习和实践的过程里我还丰富了经验、增长了知识。下面主要是我在本次毕业设计中的几点体会和看法:

(1)对工程软件办法的体会和分析,在我做整个毕业设计的过程里,我们遵循软件工程严格方法进行,把系统分成可行性研究,问题定义,需求分析,总体分析,详细设计,编码和测试单元,综合测试以及最后运行维护等多个阶段,系统设计得以完善。

(2)对使用JSP技术以及编程工具的体会,用JSP技术设计出来的动态主页,能接收用户提交的内容并做出反应, 其中随着实际情况的变化数据也随之而改变,无须人工对网页文件进行更 新即可满足应用需要。例如:当在浏览器上填好表单并提交HTTP请求时,可以要求在站点服务器上执行一个表单所设定的应用程序, 而不只是一个简单的HTML文件。输入数据分析应用的形式,根据本实施(通常是一组搜索结果中的数据库)发送到HTML格式的浏览器内容数据的相应结果。使用良好的编程工具相关的设计,可以大大简化开发步骤和难度,可以节省大量的时间。

(3)对毕业设计的体会,对系统的设计和分析,是一个非常辛苦的工作,但过程中又是充满乐趣的。在设计过程的时候,我们一边读书,一边不断的思实考践中遇到的新问题,继续努力探讨的问题得到解决,在艰苦的工作和只能亲身体验到乐趣,而设计一个信息管理系统,不会一步到位,需要不断补充和完善,而且,仍然存在很多问题在系统中被发现,今后在实践应用中发现问题一定认真解决。因此,应该说设计系统的工作并没有完全结束,还需要在日后的工作中继续进行。 

结论

制作毕业设计的紧张激烈和忙乱的几个月,我有机会做专业的基本理论,从而实现了学以致用。以前我们也有过一些设计的体会,但只不过是设计了一个的模块或一个小系统,而此次的毕业设计则是将所学到的计算机的知识和管理类的知识加以综合来设计出一个适合运行管理的养老院管理信息系统。要想设计使用户满意,就需要我们付出更多的努力。我在设计中经常出现一些问题不知该如何解决,在此时指导老师和许多同学给予了我帮助。在设计的过程中增加了于实际接触的机会,不仅培养了我的自学和编程能力,让我在即将离开学校进入社会之前有了一定的资本,提高了我与人沟通的能力。

尽管本次开发设计的项目已经取得一定的成效,但由于用户的需求又在不断更新着,随着进一步发展软件设计的技术和时间的推移,在接下来的开发中丰富和完善系统都是很有必要的,以下三个方面具体的说明了我对本次设计开发的项目构想展望:

1.系统通用性的问题

目前我们可以通过本系统基本实现养老院的养老院信息管理工作。为增加软件的通用性,我们可以考虑通过系统的二次开发把该系统推广到全国各养老院,使整个养老院管理信息系统管理工作更加规范完善。

2.系统的完善性问题

本系统虽然实现了养老院信息管理工作的申请审批等一般流程,但是在审核申请人材料上,还只能依赖申请人填写的信息进行审核,有些信息的真实性不能在第一时间得到准确反馈,所以对申请人信息的在线核实工作是今后一个努力的方向。

3.与其他部门系统相对接的问题

如何将养老院管理信息系统与养老院的办公管理系统等相关系统进行有效的对接,实现信息的共享也是今后开发的重点。

参考文献

  1. 福州市智慧养老服务体系研究[J]. 沈嘉璐.  学术评论. 2015(03)
  2. 张桂珠 刘丽 陈爱国 Java面向对象程序设计(第2版)北京邮电大学出版社.
  3. 保罗.Java面向对象程序设计[M]. 北京:清华大学出版社,2003年.
  4. Java-B/S结构应用系统的开发流程[J]. 石鸿远.科技情报开发与经济. 2008(21)
  5. 库俊国. 基于J2EE技术的Web应用体系研究及实践[M].北京:人民邮电出版社,2014.
  6. 李运莉. web数据库应用系统性能优化[M].北京:人民邮电出版社,2011.
  7. 缪忠剑. 基于Spring的集成化Web开发平台的研究与实现[M].北京:机械工业出版社,2013.
  8. Richard M. Enterprise Javabeans[J]. 北京:中国青年出版社,2011.
  9. Bruce E. Thinking in Java[M]. 北京:人民邮电出版社,2012.
  10. The future of pensions in Europe. M. Boldrin,J.J. Dolado,J.F. Jimeno,F. Peracchi. Economic Policy . 1999
  11. Elliotle R. Java network programming O’Reilly[M]. 北京:机械工业出版社,2011.

致谢

转眼间,大学四年学习生活即将结束,回首过去几年的校园生活,有苦亦有甜,但是总的来说还是收获更多,在大学中进行了一次更深的成长和蜕变。本论文的工作是在我的导师孟东霞副教授和陈晨老师的悉心指导下完成的,孟东霞副教授严谨的治学态度和科学的工作方法给了我极大的帮助和影响。两位老师为了指导我修改论文甚至经常占用老师的休息时间。在此衷心感谢毕业设计这段时间内孟东霞老师和陈晨老师对我的关心和指导。

同时,我还需要感谢学校的老师们不仅无私的传授给我们知识,还教会了我们懂得如何做人,对他们表示由衷的感谢。同样的,我也需要感谢我的同学们,毕竟有时我们“身在此山中”的时候就是我的同学们“一语惊醒梦中人”。养老院信息管理系统这个毕设任务较为繁重,通过这几个月充实又紧张的设计过程,深深的感到学习知识得到了一次飞跃,我相信:这次的毕业设计定将为我的大学学习生活画上一个完整的句号。

谨以此致谢,百忙之中抽出时间对本文进行审阅的各位老师,由衷的感谢。

附录

外文原文

Approach to nursing - home management system based on context-awareness

Wu Yimin

Electronic Information Dept. Hangzhou vocation & technology college Hangzhou, China

Yunzhi Chen

Zhejiang University school of medicine Hangzhou vocation & technology college Hangzhou, China

Abstract

Combined with the actual situation of nursing home in China, this paper gives an approach to nursing -home management, which uses ZigBee technology to develop old man positioning system, thus giving the elderly a better care quality.

Keyword: nursing-home; context-awareness; ZigBee

Ⅰ.INTRODUCTION

Nowadays the problems of elder people are outstanding in our society, while Nursing home mainly meets for the elderly who are more or less physically inconvenient. Because of age problem and self-care degree not as good as younger, they are susceptible to accidents. The infrastructure of nursing home is increasingly improved, generally including gardens, fitness sites, entertainment and leisure places etc. These facilities enriches the lives of old man, meanwhile bring about old people potential inconvenience. The place which nursing home involved in is large, then managers cannot care for each of the elderly in any location and anytime. Therefore it needs to locate every old man, as quickly as possible, with the help of the corresponding solutions. That is, it is necessary to adopt an effective way to care for the elderly, determine the location of the elderly real-time in the nursing home, and provide the timely services. This is to say "positioning" is even more important.

Context aware computing is an emerging field. Context awareness is a general concept that refers to the capability of a system to be aware of its physical and logical environment and to intelligently react according to this awareness. The definition of context is likely to change according to the application domain and related purposes [1].

Ⅱ.SOLUTION INTRODUCTION

Every old man wears a wrist strap, which includes a built-in ZigBee card .The card , based on ZigBee wireless technology, Using the universal 2.4 ~ 2.5 GHz frequency range, can initiatively send a message to the outside world, which has 0 ~ 100 meters transmission distance. Wristband information is received by reader, the reader can interpret the wristband information, and then learn whose wrist-strap number of the elderly comes from and what position the elderly locates. The reader then sends received information to the computer. When the old man moves to other locations, the computer can in real time monitor the elderly to a specific location. When the old man has difficulties in any place of nursing home and press the button on the wrist band, Information about the location of the elderly, together with the elderly individual's health status, diseases they had before and other related information, will immediately displays in the computer screen of monitoring center so as to guide medical staff to make rapid response for the emergency.

Ⅲ.ZIGBEE PRINCIPLE

ZigBee technology is next-generation wireless communications technology developed by IEEE (Institute of Electrical and Electronics Engineers), which can be applied to fixed, portable or moving objects or persons on the low cost, low-power and low-rate wireless connectivity technology. ZigBee belongs to microwave band 2.4GHZ frequency. It can transmit a long-range (0 to 1,500 meters) to a reader. It consists of two parts: ZigBee tag and ZigBee reader. ZigBee needs for the 2.4 ~ 3.7V power supply. Tag binding with personnel or object, transmit electromagnetic wave to reader device in a long distance. On one hand the reader deliver data to computer via serial port (Ethernet port) for system to control and analyze, on the other hand the reader can analyze and control received data by build-in chip processing system. The entire transmission process is through wireless transmission, all transfer rates is 250k/s. Moreover the transmission process of encryption data realizes fast and secure site data collection. Comparison of different wireless technologies shows as table 1[2].

ZigBee can automatically implement Ad-hoc Network , multi-hop, the nearest recognition function. When an individual routing is wrong, other routing will automatically search other lines, which won't delay the operation of the system.

TABLE 1 COMPARISON OF DIFFERENT WIRELESS TECHNOLOGIES

Standard

ZigBee

Bluetooth

UWB

Working frequency

2.4GHz

2.4GHz

3.1-10.6GHz

Range(m)

30-75+

10-30

~10

Data rate

20/40/250 kbps

1Mbps

100+Mbps

Devices

255-65K

8

Power consumption

~1mW

~40-100 mW

~80-300mW

Ⅵ.HARDWARE MODULE

4.1 Wristband

Wristbands are divided into 2 parts: shell and chip unit.

Shell is manufactured from special medical materials that don’t irritate skin and people don’t feel uncomfortable. Shell consists of wrist strap and watch. Wrist strap can be adjusted to the tightness. Watch include built-in core chip device.

Chip unit is made up of ZigBee wireless module, control module, alarm module and battery module. Wireless module is responsible for data receiving and sending. Control module is responsible for data analysis, process and control. Alarm module is responsible for inputting signal of alarm and asking for help. Battery module is responsible for circuit power supply.

Wristband Function:

The wrist strap transfers information to as far as 1500 meters, and the distance can be adjusted by software to meet for the site use distance and positioning accuracy.

There is a SOS button in wrist strap side. When the old man needs help, he can press SOS button to ask for help.

Each ID stored in wristbands that stands for the old man's electronic identity. This ID number is made up of the dozens of letters, respectively.

Each wrist strap can store the old man personal information such as personal data, health records, checking in/out information and so on. The above information can be stored into wristbands before the elderly wears wristbands. The wristband data can synchronize with the computer.

4.2 Reader

Wrist strap must be used in conjunction with the reader [4]. There are two kinds of methods for reader to interact with the strap.

The first one: the reader is passive acceptance of information transmitted from wrist strap, wrist strap can choose time or time interval to send data to the reader. The reader receives and processes information, then it sends information to the computer.

The second: the reader is actively sending instructions to the wrist strap. When the computer needs to query the location of a certain old man, the computer sends instructions to the reader. The reader sends electromagnetic waves to the wrist strap. When the corresponding reader received instructions, is activated, wrist band send information to the reader, and then report their positions.

Reader is waterproof and dustproof, which can be installed in any location.

Ⅴ.SYSTEM MODULE

5.1 System Overview

Every old man in nursing home wears a wristband. Wearing wristbands should be adjusted the fitness, avoiding discomfort. Every wristband has stored ID number and the elderly information. ID number is electronic identification number of the elderly. Old information includes: name, age, sex, room number, family information, medical records, etc. System topological graph is shown as fig.1 [3].

Fig.1 system topological graph

A certain number of readers are installed in the room, corridor, staircase, bathroom and activities places. Reader is installed to a location, and the address number of the reader is bound together with the location. For example 1st reader is installed to room 302, when 1st reader is sending messages to the computer, which knows that the old man in the room 302 transmit information.

When the old man stays within the scope of recognition of reader, the reader will transmit the elderly wristband number to the computer, which can immediately determine:

Who, what position, whether to use SOS call, medical history, whether locate in special forbid area and so on.

According to Settings, pop-up message box displays on the screen, and the computer instructs medical staff to give fast aid.

5.2 System Function Modul:

5.2.1 Automatic reporting the old man position

Wrist strap can intermittently send information to the reader and report the old man location to the system so that system can monitor the management of all the elderly. When a message for the elderly has not been uploaded to the computer, the computer will pop up warning dialog box that prompts managers to check. The system will automatically depict the elderly line of activity in a certain period of time [5].

5.2.2 The old man position querying

When managers want to see a certain position of the elderly, he can input the ID number of the elderly. If you want to search ID number 123, system would give instructions to all readers, and demand their retrieval information of No.123. The reader sends out information, when to retrieve the corresponding ID number from the reader 11, the computer is able to determine the location of ID number 123, where the reader 11 is installed.

5.2.3 The Elderly SOS Call

The elderly has difficulty in any place of the community, and press the emergency button on the wristband, then the reader immediately sends an urgent message to the computer. The computer will immediately display this old man position on the management computer screen. The health status of elderly, who have had the disease, and other related information can also display on screen so that health care workers can have rapid response to the emergency. Meanwhile its system can also monitor real-time position of staff and carries out standard management and reasonable dispatch.

5.2.4 Danger Area Alarm

Taking the elderly lack of self-care ability into account, some places in a building or a nursing home is noted as dangerous areas. If reader is installed in these regional border, when the elderly close to the danger area, it can receive information, then report to the computer which will promptly handle the treatment. Hazardous area will also control the sound and light alarm to alert the elderly pay attention to safety.

5.2.5Video Function

Video monitoring can help managers understand the real picture of the scene. When SOSalarm, the system controls the camera of the corresponding region, switches to the specified point, and monitors the scene picture.

5.2.6 Special Rule Setting

This function is set for some special old men. Some the elderly want special care and need to be limited to certain activities range or behavior.

5.2.7 Time Rule Setting

Nursing homes often care for a number of the elderly. It will have specific regulations, such as meal time, rest time, etc. For example, if it is time to rest, the system will send instructions to read every room information from the wrist strap, and judge whether each old people is in their room for rest. If people from others room stay in this room, the system will also know it, then tip management personnel to ask the old man back to his room.

VI. CONCLUSION

This paper chooses low cost, low power consumption, small radiation and good reliability ZigBee technology to construct wireless nursing-home monitoring network. Currently facing research of nursing-home wireless information monitoring network, the following several direction is worth studying.

  1. Reduce the network overall power consumption. One of the advantages of ZigBee network is low power consumption.
  2. The research of network positioning function. When the elderly is in a state of emergency, such as falling, fainting, etc., system can warn, which is one of content of wireless nursing-home monitoring service design.

REFERENCE

  1. Federica Paganelli, Emilio Spinicci, and Dino Giuli. ERMHAN: A Context-Aware Service Platform to Support Continuous Care Networks for Home-Based Assistance. International Journal of Telemedicine and Applications. Volume 2008.
  2. Meng-Shiuan Pan and Yu-Chee Tseng. ZigBee and Their Applications
  3. ZIGBEE nursing-home management system, http://solution.rfidworld.com.cn/2011_03/53b5e1155afb2 b67.html
  4. Athanasios M. Demiris and Nicolaos Ioannidis. Context awareness and nomadic devices featuring advanced information visualization in clinical routine. Journal of telecommunication and information technology, 2005(4).
  5. Jesper Kjeldskov ٛ Mikael B. Skov. Exploring context-awareness for ubiquitous computing in the healthcare domain. Pers Ubiquit Comput (2007) 11:549–562

中文翻译

基于情景意识的护理管理系统讨论

Wu Yimin

Electronic Information Dept. Hangzhou vocation & technology college

Hangzhou, China

Yunzhi Chen

Zhejiang University school of medicine

Hangzhou vocation & technology college Hangzhou, China

抽象

结合在中国养老院的实际情况,本文给出了一种护理家庭的管理方法,采用ZigBee技术开发老人定位系统,从而使老年人更好的服务质量。 

关键词:养老院,情景意识,ZigBee

Ⅰ.介绍

    目前,我国老年人的问题突出,而养老院主要是为了老年人的身体不便。由于年龄问题和自我照顾程度不如年轻人,他们容易发生事故。养老院的基础设施日益完善,一般包括园林、健身场所、娱乐休闲场所等,这些设施丰富了老年人的生活,同时也给老人带来了潜在的不便。养老院所涉及的场所很大,管理者在任何时间、任何地点都不能照顾到每一位老人。因此,需要尽快找到每一位老人,并借助相应的解决方案。也就是说,有必要采取有效的养老方式,在养老院实时确定老年人的位置,并提供及时的服务。这就是说“定位”更为重要。

情景感知计算是一个新兴的领域。情景感知是指系统意识到其物理和逻辑环境并根据这种意识智能地反应的能力的一般概念。情景感知的定义可能根据应用领域和相关目的而改变(1)。

Ⅱ.解决方案介绍

每个老人都戴着一个手腕带,包括一个内置的ZigBee卡。该卡基于ZigBee无线技术,使用通用的2.4~2.5 GHz频率范围,可以主动向外界发送一个消息,该消息具有0~100米的传输距离。腕带信息由读取器接收,读取器可以解读腕带信息,然后了解老人的腕带号码来自何方以及老人所在的位置。然后,阅读器将接收到的信息发送到计算机。当老人移居到其他地点时,计算机可以实时监控老人到特定的位置。当老人在养老院的任何地方都有困难,按下手腕上的按钮时,老年人的位置信息,连同老年人的健康状况,以前的疾病和其他相关信息,将立即显示在计算机上。监控中心ER屏幕,引导医务人员对突发事件做出快速反应。

Ⅲ.ZigBee原理

ZigBee技术是IEEE(电子电气工程师协会)开发的下一代无线通信技术,可应用于低成本、低功耗、低速率无线连接技术中的固定、便携式或移动对象或人。ZigBee属于微波频带2.4GHz频率。它可以将远程(0到1500米)传送给阅读器。它由ZigBee标签和ZigBee阅读器两部分组成。ZigBee需要2.4~3.7V的电源。标签与人员或物体绑定,远距离传送电磁波给阅读器设备。一方面,阅读器通过串口(以太网端口)向计算机传送数据进行控制和分析,另一方面,阅读器可以通过内置芯片处理系统对接收到的数据进行分析和控制。整个传输过程是通过无线传输,所有传输速率是250k/s,而且加密数据的传输过程实现了快速和安全的现场数据采集。不同的无线技术的比较显示为表1〔2〕。

ZigBee可以自动实现Ad Hoc网络,多跳,最近的识别功能。当单个路由错误时,其他路由将自动搜索其他线路,这不会延迟系统的操作。

表1不同无线技术的比较

标准

ZigBee

蓝牙

超宽带

工作频率

2.4GHz

2.4GHz

3.1-10.6GHz

范围(m)

30-75+

10-30

~10

数据速率

20/40/250 kbps

1Mbps

100+Mbps

设备

255-65K

8

耗电量

~1mW

~40-100 mW

~80-300mW

Ⅵ.硬件模块

4.1 腕带

腕带分为2部分:外壳和芯片单元。

外壳由特殊的医用材料制成,不会刺激皮肤,人们不会感到不舒服。贝壳由腕带和手表组成。手腕带可以调整到密封性。手表包括内置的核心芯片器件。

芯片单元由ZigBee无线模块、控制模块、报警模块和电池模块组成。无线模块负责数据的接收和发送。控制模块负责数据的分析、处理和控制。报警模块负责输入报警信号和求助信号。电池模块负责电路电源。

腕带功能:

腕带传递信息可达1500米,距离可通过软件进行调整,以满足场地使用距离和定位精度。

手腕带侧有一个SOS按钮。当老人需要帮助时,他可以按SOS按钮寻求帮助。

每个ID存储在腕带中,代表老人的电子身份。这个ID号是由几十个字母组成的。

每个腕带可以存储老人个人信息,如个人数据、健康记录、登记/外出信息等。以上信息可存放在腕带上,老年人佩戴腕带。腕带数据可以与计算机同步。

4.2 读者

    腕带必须与读取器结合使用[4 ]。读者有两种方法来与带进行交互。

第一种:读者被动接受从腕带传送的信息,手腕带可以选择时间或时间间隔向读者发送数据。读取器接收和处理信息,然后将信息发送到计算机。

第二:读者主动向腕带发出指令。当计算机需要查询某位老人的位置时,计算机将指令发送给阅读器。读取器向腕带发送电磁波。当对应的读取器收到指令时,激活,腕带发送信息给阅读器,然后报告它们的位置。

阅读器防水防尘,可安装在任何位置。

Ⅴ.系统模块

5.1 系统概述

养老院的每个老人都戴着腕带。佩戴腕带时应调整健身,避免不适。每个腕带都存储了ID号和老年人信息。身份证号码是老年人的电子身份证号码。旧信息包括:姓名、年龄、性别、房间号码、家庭信息、病历等。系统拓扑图如图1(3)所示。

图1系统拓扑图

    房间、走廊、楼梯、浴室和活动场所都有一定数量的读者。阅读器被安装到一个位置,阅读器的地址号与位置绑定在一起。例如,第一阅读器安装到房间302,当第一阅读器向计算机发送消息时,知道房间302中的老人发送信息。

    当老人停留在读者的认可范围内时,读者会将老人腕带号码传送给电脑,这可以立即确定:谁,什么位置,是否使用SOS呼叫,病史,是否位于特殊禁区等。根据设置,弹出消息框显示在屏幕上,计算机指示医务人员提供快速援助。

5.2 系统功能模块:

5.2.1 老人位置自动报告

腕带可以间歇性地向阅读器发送信息,并将老人位置报告给系统,使系统能够监控所有老年人的管理。当老人的留言没有上传到电脑时,电脑会弹出警告对话框,提示管理者检查。该系统将自动描绘老年人在一定时间内的活动路线[ 5 ]。

5.2.2 老人职位查询

当管理者想看到老人的特定位置时,他可以输入老年人的ID号。如果要搜索ID号123,系统会向所有读者发出指令,并要求其检索信息为123。读取器发送信息,当从读取器11检索相应的ID号码时,计算机能够确定ID号123的位置,其中阅读器11被安装。

5.2.3 老年人求救信号

老年人在社区的任何地方都有困难,并按下腕带上的紧急按钮,读取器立即向计算机发送紧急信息。计算机将立即在管理计算机屏幕上显示这位老人的位置。老年人的健康状况、患病情况等相关信息也可在屏幕上显示,使医护人员对突发事件有快速反应。同时,系统还可以对员工的实时位置进行监控,并进行规范管理和合理调度。

5.2.4危险区域报警

    考虑到老年人缺乏自理能力,一些建筑物或疗养院的地方被称为危险区域。如果阅读器安装在这些区域边界,当老人靠近危险区域时,它可以接收信息,然后向计算机报告,这将及时处理。危险区还将控制声光报警,提醒老年人注意安全。

5.2.5视频功能

视频监控可以帮助管理者了解场景的真实画面。当SOSalarm,系统控制相应区域的相机时,切换到指定点,并监视场景图片。

5.2.6特殊规则设置

这个功能为一些特殊的老年人设定的。有些老年人需要特殊照顾,需要限制某些活动的范围和行为。

5.2.7 时间规则设置

养老院经常照顾一些老年人。它将有特定的规定,如吃饭时间、休息时间等。例如,如果是休息的时候,系统将发送指令从腕带上读取每个房间信息,并判断每个老人是否在他们的房间休息。如果人们从其他房间呆在这个房间里,系统也会知道它,然后小费管理人员让老人回到自己的房间。

VI.结论

本文选择低成本、低功耗、小辐射、可靠性好的ZigBee技术构建无线护理家庭监控网络。目前面对护理家庭无线信息监测网络的研究,以下几个方向值得研究。

(1)降低了网络的整体功耗。ZigBee网络的优点之一是功耗低。

(2)网络定位功能的研究。当老年人处于紧急状态,如跌倒、晕倒等时,系统可以报警,这是无线护理家庭监控服务设计的内容之一。

参考

〔1〕paganelli西塔,spinicci giuli埃米利奥,和Dino Giuli。ermhan上下文感知的服务平台:支持连续的护理家庭援助网络为基。国际杂志和远程应用。2008年卷。

〔2〕潘和孟轩玉之井。ZigBee和their applications

〔3〕ZigBee家庭护理管理系统,solution.rfidworld.com.cn http:http://solution.rfidworld.com.cn/2011_03/53b5e1155afb2 b67.html

〔4〕M demiris阿萨纳。nicolaos Ioannidis和。以先进的设备和上下文感知nomadic信息可视化在临床常规。通信与信息技术杂志,2005,(4)。

〔5〕迈克尔kjeldskovٛJesper B株。探索在计算中上下文相关ubiquitous for the Healthcare域。PEO ubiquit comput(2007年11 549–562):

外文原文

DESIGN AND IMPLEMENTATION OF WEB APPLICATIONS USING:JAVA SERVLET AND JSP

Srijan S Rawat, Surbhi Thakur

Student, Dronacharya College Of Engineering ,Gurgaon

Abstract- : This paper reviews the  development of Web applications in the Java programming language, namely the creation of a Web application through three-layer architecture using Java Servlet technology and Java Server Pages. The advantages that we specified in this paper are the development of web applications applying Java technology. Motivated by the current popularity of this technology, our aim was to introduce a way of developing web applications that will become a trend in the future. Primary goal of this paper is to  present  the  most  appropriate  methods of developing web applications. Conclusions from our study are that the Java is programming language with exceptional opportunities when it comes to web development in terms of simplicity of implementation and speed of execution of the final product.

  1. Introduction

This paper shows the development of Web applications in the Java programming language In order to respond to User’s Request, Web Application are used i.e. generate Web pages on the client's request. The applications are stored on the server and operate on the principle of client- server connection, i.e. client sends a server request, when the server fulfills the request, it sends response to the client. Web applications are by nature distributed applications, which means that they are those programs which are able to run on multiple computers and can communicate through server or a network. Specifically, web applications are accessed with a web browser and are popular because of the ease of using the browser as a user client. In the Java platform, web components provide the dynamic extension capabilities  for a web server. Web components are either Java Servlets or JSP pages. Java Servlets are Java classes that extend the functionality of the server. They are executed on a Web server and act as a connection between the client and the server and their life cycle lasts for as long as there is a connection between the client and the server. JSP technology is a mixture of HTML and Java. It is used to display text on the Web, but has full functionality of Java. The application is created in the three-layer architecture. It is divided into three layers -presentation, business and data layer. Three-layer architecture is used because the applications built into it are easy to transfer and layers are independent. In one part of this paper we present analysis of the popularity of programming languages for web development in order to prove that Java is a leader in this field.

There were five primary goals in the creation of the Java language:

  • It should be "simple, object-oriented and familiar".
  • It should be "robust and secure".
  • It should be "architecture-neutral and portable".
  • It should execute with "high performance".
  • It should be "interpreted, threaded, and dynamic"
  1. Java EE web applications

Java EE is an application development framework that is the most popular standard for building and deploying web applications in Java. Two of the key underlying technologies for building the web components of Java EE applications are servlets and JSP. Servlets are Java classes that provide the entry point to logic for handling a web request and return a Java representation of the web response. JSP are a mechanism to combine HTML with logic written in Java. After they are compiled and deployed, JSP run as a servlet, where they also take a web request and return a Java object that is representing the response page.

Typically, in a large project, the JSP and servlets are part of the presentation layer of the application and include logic to invoke the higher level business methods. The core business functions are separated into a clearly defined set of interfaces, so that these components can be used and changed independently of the presentation layer (or layers, when using more than one interface).

Enterprise JavaBeans (EJB) are also a key feature included in the Java EE framework and are an option to implement the business logic of an application. The separation of the presentation logic, business logic, and the logic to combine them is referred to as the model view controller (MVC) pattern and is described later in this paper. Technologies, such as Struts, Java Server Faces (JSF), various JSP tag libraries, and even newer developments, such as Ajax, were developed to extend the JSP and servlets framework to improve various aspects of Java EE web developments. For example, JSF facilitates the construction of  reusable user interface (UI) components that can be added to JSP pages.

However, the underlying technologies of these tools are extensions to Java servlets and JSP. When planning a new project, the choice of technology depends on several criteria, such as the size of the project, previous implementation patterns, maturity of technology, and skills of the team. Using JSP with servlets and HTML is a comparatively simple option for building Java EE web applications. Developing Web Applications using JavaServer Pages and Servlets 3. Figure shows the relationships among the Java EE, enterprise application, web applications, EJB, servlets, JSP, and additions, such as Struts and JSF.

Advantages of Java technologies in development of web applications

Web applications are applications that are created on request by dynamic web pages, and shall be executed on the platform provided by the Web server. Java is a programming language whose major characteristic is a complete independence from the physical platform on the level of translated code. Java programs, in the form of applets, can be embedded in Web pages and thus distributed to users. The consequence of this is the possibility of automatic distribution and installation of client applications on the network, regardless of the client’s actual physical platform – Web browser with support for Java is enough for this. The combination of WWW and Java technology has enabled the implementation of client-server information systems which, unlike traditional systems, are characterized with the following features:

  • simple   and   widely   accepted   form   of   user interface (Web browser);
  • automatic distribution and installation of client applications;
  • simpler maintenance, especially in heterogeneous networks.
  1. Java EE web APIs

Below figure shows the main classes that are used within the Java EE framework and the interactions between them. The application servlet class is the only class outside of the Java EE framework and contains the application logic.

The Java EE framework has the following main classes:

Http Servlet (extends Servlet): The main entry point for handling a web request. The

doGetdoPost, and other methods invoke the logic for building the response given the request and the underlying business data and logic. In the JEE Servlet 3.0 specification, these classes are identified by the @Web Servlet annotation.

Http JSPServlet (extends Servlet): The Web Sphere Application Server automatically

compiles a JSP page into a class that extends this type. It runs similarly to a normal servlet, and its only entry point is the _jspService method.

HttpRequest (extends Request): This class provides an API to access all pertinent information in a request.

HttpResponse (extends Response): This class provides an API to create a response to a request and the application state.

HttpSession: This class stores any information required to be stored across a user session with the application (as opposed to a single request).

RequestDispatcher: Within a web application, redirecting the processing of a request to another servlet is required. This class provides methods to redirect the processing of a request to another servlet.

Other classes are available in the Java EE web components framework.

  1. JSP

You can include any valid fragment of Java code in a JSP page and mix it with HTML. In the JSP file, the Java code is marked by <% and %>. On deployment (or sometimes the first page request, depending on the configuration), the JSP is compiled into a servlet class. This process combines the HTML and the scriptlets in the JSP file in the _jspService method that populates the HttpResponse variable. Combining many complex Java code with HTML can result in a complicated JSP file. Except for simple examples, avoid this practice.

One way around this situation is to use custom JSP tag libraries. These libraries are tags defined by developers that initiate calls to a Java class within a JSP page. These classes implement Tag, BodyTag, or IterationTag interfaces from the javax.servlet.jsp.tagext package, which is part of the Java EE framework. Each tag library is defined by a .tld file that includes the location and content of the taglib class file. Although not strictly required, you need to include a reference to this file in the deployment descriptor. The most widely available tag library is the JavaServer Pages Standard Tag Library (JSTL), which provides simple tags to handle simple operations required in most JSP programming tasks, including looping, globalization, XML manipulation, and even processing of SQL result sets. The RedBank application uses JSTL tags to display tables and add URLs to a page. The final section of this paper contains references to learn more about JSP and tag libraries.

Description of two Java technologies (Java Servlet and JavaServerPages)

Web applications in the Java programming language can be implemented using two technologies: Java Servlets and Java Server Pages (JSP). The optimal result is achieved by a combination of both technologies, as described below. Servlets are Java objects that dynamically process requests and generate responses. Generated response is usually in the form of HTML (Hyper Text Markup Language), but the data can be in another form, for example XML (Extensible Markup Language).Servlets run on the server and the program code is never disclosed outside the server, only derived results are submitted. This way, the author code is fully protected, as opposed to applications that run in a Web browser using the Java Applet technology. Another more advantage of using Servlets is their port ability. They can run on different servers without changing the code .After the client sends a request to a server , it loads the servlet and creates a separate thread. Each servlet has the methods doGet() or doPost(), which are used to process the request. For each request a separate thread is created, which makes execution significantly faster than any other technology, in which, operating system must create a new process for each request, initialize it, run it and cleanup after it, which is extremely slow. One example of such technology is the application logic is "hardcoded" in the user interface. These problems are solved by combining these two technologies in order to split the Web application into layers. A typical division into three layers: the business layer, presentation layer and data layer. Business layer (business logic layer) is a layer responsible for the application logic, and is run through servlets. Presentationlayer deals with the presentation of data and application state, using the JSP technology. It takes the results of the business layer using the map of attributes. Data layer is responsible for the persistence of data. It takes care of storing data in files or databases. Presentation layer must communicate with data layer exclusively via the business layer. Servlet takes the parameter number, processes it, the result is sent to the attributes of requests map and further sends it to the file view.jsp on display by getRequestDispatcher() and forward() methods. The servlet does not even have a single HTML tag due to the fact that the jsp database takes care of the user interface, while the servlet is used solely for calculating the results

  1. Conclusion

Development of a Web page to day increasingly requires very good organization of data. Since the data increases, it is more and more difficult to create Web pages. Instead of ordinary static HTML pages, there are more  dynamic Web pages that meet the demands of customers. The need to store large amounts of data and their further processing requires the construction of complex Web applications. Web applications must serve the needs of users, and be easy to use. Because of a number of different operating systems, there is a need for changing the application. Development of Web applications in the Java programming language provides unlimited possibilities; this is why this technology is the right choice for many serious projects. Using three-layer architecture for creating Web pages greatly facilitates their maintenance because changes of one layer do not require changing the other layers, which makes the application easy to transfer. In this paper we present the possibilities of Java and provide a basis for further research. We have presented an aspect which shows why Java is considered to be as the future of software development. Most of the mobile phones these days come with built-in Java applications. Java is an extremely successful language even in the internet world when It comes to developing web applications.  Programmers  worldwide  prefer  Java  to design highly interactive web applications. Web design also has seen great success when Java is implemented. The web applications run at a faster speed saving time and cost to any company. Simply put, this is one language that has a perfect balance between the software, mobile and the web world.

Reference

[1] Developing Web Applications using JavaServer Pages and Servlets by Martin Keen, Rafael Coutinho, Sylvi Lippmann, Salvatore Sollami, Sundaragopal Venkatraman, Steve Baber, Henry Cui, Craig Fleming.

https://www.google.co.in/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&cad=rja&uact=8&ved=0CCcQFjAC&url=http%3A%2F%2Fwww.redbooks.ibm.com%2Fabstracts%2Fredp4880.html%3FOpen&ei=HNpMVM3XLuWxmAXwroHgAw&usg=AFQjCNETi7-fqVRjEbLuROL9a85Dwp0wwA&sig2=YcP-nKMR4W_EV3yztQYomg&bvm=bv.77880786, d.dGY

[2] Java technology in the  designand implementation of webapplications by Sead Mašovi,Muzafer Sara,Hamza Kamberovi,Mensura Kudumovi.

http://www.academia.edu/3248045/Java_technology_in_the_design_and_implementation_of_we b_applications

[3] Java(Software Platform). http://en.wikipedia.org/wiki/Java_(software_platform)

[4]  JavaServer Pages. http://en.wikipedia.org/wiki/JavaServer_Pages

[5]  Java Servlet http://en.wikipedia.org/wiki/Java_Servlet

中文翻译

与Web应用程序的设计实现:java servlet和jsp

Srijan S Rawat, Surbhi Thakur

Student, Dronacharya College Of Engineering ,Gurgaon

摘要:本文综述了java编程语言的Web应用程序的开发,即利用java Servlet技术和java服务器页面通过三层体系结构的Web应用程序的创建。我们指定了本文的优点是Web应用程序采用java技术的发展。由于当前技术的普及,我们的目标是引入一种开发Web应用的方法,这将成为未来的趋势。本文的主要目的是提出最合适的开发Web应用程序的方法。从我们的研究结论是,java是编程语言的难得的机会,当谈到在实施和最终产品的执行速度的简单Web开发。

一、引言

本文以java编程语言开发Web应用程序的响应用户的请求,Web应用程序使用即生成客户端的请求的网页。应用程序存储在服务器上,并根据客户机-服务器连接的原理进行操作,即客户端发送服务器请求,当服务器满足请求时,它向客户端发送响应。Web应用程序本质上是分布式应用程序,这意味着它们是能够在多台计算机上运行并可以通过服务器或网络进行通信的程序。具体地说,Web应用程序是通过Web浏览器访问的,并且由于使用浏览器作为用户客户端的方便性而受到欢迎。在java平台,Web部件的Web服务器提供动态扩展能力。Web部件是java servlet或JSP页面。java servlets是java类扩展服务器的功能。它们在Web服务器上执行,并充当客户端和服务器之间的连接,它们的生命周期持续存在。

客户端和服务器之间的连接。JSP技术是一个html和java的混合物。它是用来在Web上显示的文字,但有java的全部功能。应用程序是在三层体系结构中创建的。它分为三个层:表示层、业务层和数据层。三层体系结构的使用是因为它内置的应用程序易于传递,层是独立的。在本文的第一部分分析我们目前流行编程语言的Web开发为了证明java是这一领域的领导者。

在java语言中创作的五个主要目标:

它应该是“简单、面向对象和熟悉的”。

它应该是“健壮的和安全的”。

它应该是“建筑中立和便携”。

它应该以“高性能”执行。

它应该是“解释的、线索的、动态的”

二.java EE Web应用程序

java EE是一个应用程序开发框架,用于构建和部署java web应用中最流行的标准。建筑用java EE应用Web组件的servlet和JSP的基础技术和关键技术两。Servlet是java类提供了切入点,逻辑处理Web请求和返回的网页响应一个java表示。JSP是一种机制,HTML,java写的组合逻辑。他们是经过编译和部署,JSP运行作为一个servlet,他们还需要一个Web请求并返回一个java对象,代表响应页面。

通常,在大型项目中,JSP和servlet是应用程序表示层的一部分,并包含调用更高级别业务方法的逻辑。核心业务功能被分离成一组明确定义的接口,以便这些组件可以独立于表示层(或使用多个接口时使用和更改)。

企业JavaBeans(EJB)也是一个关键的功能包括在java EE框架,可以实现应用程序的业务逻辑。表示逻辑、业务逻辑和逻辑组合的分离被称为模型-视图-控制器(MVC)模式,本文将在后面进行描述。技术,如Struts、java Server Faces(JSF),不同的JSP标签库,甚至较新的发展,如Ajax,扩展了的JSP和Servlet的框架来提高java EE Web发展的各个方面。例如,JSF有助于构建可添加到JSP页面的可重用用户界面(UI)组件。

然而,这些工具的基本技术是java servlet和JSP扩展。当规划一个新项目时,技术的选择取决于几个标准,例如项目的规模、以前的实施模式、技术成熟度和团队的技能。使用JSP和servlet和HTML是构建java EE Web应用程序相对简单的选择。使用JavaServer页面和Servlet 3开发Web应用程序。图显示了java EE,关系企业应用、Web应用程序、EJB、Servlet、JSP、和补充,如Struts和JSF。

在Web应用程序开发的java技术的优势

Web应用程序是由动态网页请求创建的应用程序,应在Web服务器提供的平台上执行。java是其主要的特点是完全独立于物理平台上的水平翻译代码编程语言。java程序,在程序的形式,可以嵌入在网页中,分配给用户。这样做的后果是自动分配和网络上的客户端应用程序安装的可能性,无论客户的实际物理平台–Web浏览器支持java够这。WWW和java技术使客户信息系统的实施相结合,与传统的系统,具有以下特点:

简单而广泛接受的用户界面(Web浏览器);

自动分配和安装客户应用程序;

更简单的维护,特别是在异构网络中。

  • java EE Web API

下面的图显示在java EE框架以及它们之间的相互作用的主要类。应用程序servlet类是JavaEE框架之外的唯一类,包含应用程序逻辑。

java EE框架主要有以下几类:

HTTP Servlet(扩展servlet):处理Web请求的主要入口点。这个DOGET、DOPOST和其他方法调用建立请求和底层业务数据和逻辑的响应的逻辑。在JeaServlet 3规范中,这些类由@ Web servlet注释标识。

Http JSPServlet(扩展servlet):Web球应用服务器自动将JSP页面编译为扩展此类型的类。它运行类似于一个普通servlet,它的唯一入口点是yjjService方法。

HttpRequest(扩展请求):这个类提供一个API来访问请求中的所有相关信息。

HttpResponse(扩展响应):这个类提供了一个API来创建对请求和应用程序状态的响应。

HtpSession:该类存储需要在应用程序中与用户会话存储的任何信息(而不是单个请求)。

RequestDispatcher:在Web应用程序中,需要将请求的处理重定向到另一个servlet。此类提供了将请求的处理重定向到另一servlet的方法。

其他类的java EE Web组件框架是可用的。

IV.JSP

你可以包括任何一个JSP页面有效片段的java代码和将它与HTML。在JSP文件,java代码标记<%和% >。在部署(或有时根据配置的第一页请求)中,JSP被编译成servlet类。这个过程将HTML和脚本文件中的JSP文件结合在一起,填充了HypReSpsiSE变量。许多复杂的java代码与HTML结合可以形成一个复杂的JSP文件。除了简单的例子,避免这种做法。围绕这种情况的一种方法是使用自定义的JSP标记库。这些库是由开发商发起调用java类在JSP页面中定义的标签。这些类实现了标签,bodytag,或iterationtag接口从javax.servlet.jsp.tagext包,这是java EE框架部分。每个标签库由.TLD文件定义,该文件包括TAGLIB类文件的位置和内容。虽然不是严格要求,你需要在部署描述符中包含对该文件的引用。最广泛使用的标记库是JavaServer页面标准标记库(JSTL),它提供简单的标签来处理大多数JSP编程任务所需的简单操作,包括循环、全球化、XML操作,甚至SQL结果集的处理。ReBoB应用程序使用JSTL标记来显示表并向页面添加URL。本文的最后一节包含了更多关于JSP和标签库的参考。

两个java技术描述(java servlet和JSP技术)

在java编程语言的网络应用程序可以使用两种技术来实现:java servlet和java服务器页面(JSP)。最佳的结果是通过两种技术的组合来实现的,如下所述。Servlet是java对象动态的处理请求并生成响应。生成的响应通常是HTML(超文本标记语言)的形式,但是数据可以是另一种形式,例如XML(可扩展标记语言)。servlet在服务器上运行,并且程序代码从不在服务器外部公开,只有提交的结果被提交。这样,作者的代码是完全的保护,而不是使用java applet技术,运行在Web浏览器中的应用。使用servlet的另一个优势是它们的端口能力。它们可以在不同的服务器上运行而不改变代码。在客户端向服务器发送请求之后,它加载servlet并创建一个单独的线程。每个servlet都有用于处理请求的方法DOGET()或DOPSTOME()。对于每个请求,创建一个单独的线程,这使得执行速度明显快于其他任何技术,其中,操作系统必须为每个请求创建一个新的进程,初始化它,运行它并在其之后清理,这是非常缓慢的。这种技术的一个例子是应用逻辑在用户界面中是“硬编码”的。通过将这两种技术相结合来解决这些问题,以便将Web应用程序分成层。一个典型的划分为三层:业务层、表示层和数据层。业务层(业务逻辑层)是一个负责应用逻辑的层,并通过servlet运行。表示层使用JSP技术处理数据和应用程序状态的呈现。它使用属性的映射来获取业务层的结果。数据层负责数据的持久化。它需要在文件或数据库中存储数据。表示层必须通过业务层专门与数据层通信。servlet获取参数号,进程

五、结论

如今的网页的开发越来越需要非常好的数据组织。由于数据量的增加,网页的制作变得越来越困难。而不是普通的静态HTML页面,有更多的动态网页,以满足客户的需求。需要存储大量的数据和它们的进一步处理需要构建复杂的Web应用程序。Web应用程序必须服务于用户的需求,并且易于使用。由于有许多不同的操作系统,所以需要改变应用程序。在java编程语言的Web应用程序开发提供了无限的可能性;这就是为什么这种技术是许多严重的项目的正确选择。使用三层架构来创建网页,极大地促进了它们的维护,因为一层的改变不需要改变其他层,这使得应用程序易于传输。本文介绍了java的可能性,为进一步研究提供了基础。我们提出了一个方面说明了为什么java是作为软件开发的未来。大多数的手机都内置的java应用程序。java是一个非常成功的语言即使在互联网世界的时候,Web应用程序的开发。全世界的程序员更喜欢java设计高度交互式的Web应用程序。网页设计也取得巨大成功时,java实现。Web应用程序以更快的速度运行,节省了任何公司的时间和成本。简单地说,这是一种在软件、移动和网络世界之间完美平衡的语言。

参考文献

〔1〕利用Martin Keen、Rafael Coutinho、Sylvi Lippmann、Salvatore Sollami、Sundaragopal Venkatraman、Steve Baber、Henry Cui、Henry Cui使用JavaServer页面和Servlet开发Web应用程序。

https://www.google.co.in/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&cad=rja&uact=8&ved=0CCcQFjAC&url=http%3A%2F%2Fwww.redbooks.ibm.com%2Fabstracts%2Fredp4880.html%3FOpen&ei=HNpMVM3XLuWxmAXwroHgAw&usg=AFQjCNETi7-fqVRjEbLuROL9a85Dwp0wwA&sig2=YcP-nKMR4W_EV3yztQYomg&bvm=bv.77880786, d.dGY

〔2〕java技术在Web应用程序的设计和实现通过SEAD马šOvi全,Muzafer Sara,Hamza Kamberovi,Mensura Kudumovi.

http://www.academia.edu/3248045/Java_technology_in_the_design_and_implementation_of_we b_applications

(3)java(软件平台). http://en.wikipedia.org/wiki/Java_(software_platform)

(4)JavaServer页面. http://en.wikipedia.org/wiki/JavaServer_Pages

(5) Java Servlet http://en.wikipedia.org/wiki/Java_Servlet

  • 13
    点赞
  • 22
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

源码空间站11

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值