admin 管理员组

文章数量: 887042


2024年1月12日发(作者:redis持久化数据备份)

核准通过,归档资 料。

未经允许,请勿外 传!

技术简介

设计模式介绍

MVC模式是“

Model-View-controller ”的缩写,中文翻译为“模式-试图-控制器”。

MVC应用程序总是由这三个部分组成。Event导致Controller改变Model或View,

或者同时改变两者。只要Controller改变了

Models的数据或者属性,所有依赖的View

都会自动更新。类似的,重要Controller改变了

View, View会从潜在的Model中获 取数据来刷新自己。MVC模式最早是Smalltalk语言研究团提岀的,应用于交互应用 程序中。Java语言是而向对象语言,很自然的SUN在应用程序事例中就推荐MVC

模式作为开发Web应用的架构模式。MVC模式是一种架构模式,英实需要英他模 式协作完成。在J2EE模式目录中,通常采用service to worker模式是新,而service to worker模式可由集中控制器模式,派遣器模式和Page Helper模式组成。

2. Struts2

简介

虽然Struts2号称是一个全新的框架,但这仅仅是相对Struts 1而言。Struts2与

Strutsl相比,确实有很多革命性的改进,但它并不是新发布的新框架。从某种程度 上来讲,Struts2没有继承Strutsl的血统,而是继承WebWork的血统。Struts2是

WebWork的升级,而不是一个全新的框架,因此稳泄性、性能等各方而都有很好的 保证:而且吸收了

Strutsl和WebWork两者的优势。

Struts2 Action类可以实现一个Action接口,也可实现其他接口,使可选和定制的 服务成为可能。Struts2提供一个ActionSupport基类去实现 常用的接口。Action接口不 是必须的,任何有execute标识的POJO对象都可以用作Struts2的Action对象。Struts2 Action对象为每一个请求产生一个实例,因此没有线程安全问题。实际上,servlet容 器给每个请求产生许多可丢弃的对象,并且不会导致性能和垃圾回收问题。Struts2 Action可以通过初始化、设置属性、调用方法来测试,"依赖注入"支持也使测试更容 易。Struts2直接使用Action属性作为输入属性,消除了对第二个输入对象的需求。输 入属性可能是有自己(子)属性的rich对象类型。Action属性能够通过web页面上的

taglibs访问。Struts2也支持ActionForm模式。rich对象类型,包括业务对象,能够用 作输入/输岀对象。这种ModelDriven特性简化了

taglib对POJO输入对象的引用。

Struts2可以使用JSTL,但是也支持一个更强大和灵活的表达式语言“Object Graph

Notation Language" (OGNL)a Struts2

使用"ValueStack"技术,使

taglib

能够访问值而 不需要把你的页而(view)和对象绑泄起来。ValueStack策略允许通过一系列划称相同但 类型不同的属性重用页而(view)o Struts2使用OGNL进行类型转换。提供基本和常用对

象的转换器。

附录2

Technical Overview

1. MVC design pattern description

MVC pattern is ”Modcl・Vicw・controllcr” of the acronym, the Chinese translation

for "mode - trying to

・ Controller/1 MVC applications are always by these three

components・ Event (events) result in Model or Controller to change the View, or to change

both at the same time・ Models change as long as the Controller of the data or attributes, all

depend on View is updated automatically・ Similarly, the important Controller changed the

View, View of the Model from the potential to obtain data to refresh themselves・ MVC

pattern was first made Smalltalk language research group applied to interactive applications・ Java language is object-oriented language, it is natural that in the application instances

SUN recommending MVC model as a framework for developing Web application model.

MVC model is an architectural pattern, in fact, other models need to be completed in

collaboration・ In the J2EE pattern catalog are commonly used service to worker pattern is

new, and the service to worker pattern may be focused on control mode, sending mode and

the Page Helper pattern.

2. Struts2 Introduction

Although the claims is a new Struts2 framework, but it is only in terms of relative

Struts 1. Struts2 with Struts 1 than there are indeed many revolutionary improvements, but it

is not a new release of the new framework, but in another prominent framework:

WebWork developed on the basis of the・ To some extent, Struts2 does not inherit StrutsTs

ancestry, but the succession WebWork lineage. Struts2 is the WebWork upgrade, rather

than an entirely new framework, therefore the stability, performance and other areas have a

very good assurance: it absorbed the advantages of both Struts 1 and WebWork, therefore, is

a very worth the wait framework・

Struts2 Action class can implement an Action interface and other interfaces can also be

achieved to enable optional and custom services possible・ Struts2 provides a

ActionSupport to achieve common base class interface・ Action interface is not necessary,

any POJO object execute identity can be used as an object Struts2 in Action・ Struts2

Action object for each instance of a request to generate a, there is no thread-safety problems・(In fact, servlet containers generate many for each request can be discarded objects, and

will not lead to performance and garbage collection issues). Struts2 Action does not depend

on the container, allowing Action out of the container to be tested separately. If necessary,

Struts2 Action can still access the original Request and Response, however, other elements

to reduce or eliminate direct access to HttpServetRequest and HttpServletResponse

necessary. Struts2 Action can be initialized, set properties, call methods to test,

^dependency injection0 support also makes testing easier. Struts2 using the Action attribute

directly as input properties, eliminating the need for the second input object needs・ Input

properties may have their own (sub) attribute the rich object type・ Action properties able to

access web pages on the taglibs・ Struts2 also supports the ActionForm pattern・ rich

object types, including business objects, can be used as input / output objects・ This

ModelDriven feature simplifies the taglib reference to the POJO input objects.

型 号

)

制造厂家

额定功率(KW

额定电压(V

额定电流(A

额定频率(Hz )

额定转速(「/min

功率因数

励磁电流(A

励磁电压(V )

560

400

1010

50

1500

0.8 (滞后)

2

40

定子绕组接线

冷却方式

励磁方式

绝缘等级

Yo

风冷

强励倍数2

H

防护等级

蓄电池容量(Ah )

92

式 闭式循环水冷却、涡轮增压

额定功率(KW )

额定转速(r/min )

冷却方式

起动方式

628

1500

闭式循环水带热交换器

24V直流电起动

燃油消耗(L/h)

保护与报 定值与结果 保护与报警 定值与结果

灯110%曜,大于120%m 5秒

过载

跳闸

出口电压高卸

大于108%

出口电压低卸

短路

200% ,延时0.08秒跳闸

低于85%

电流不平

不平衡电流大于20%

,延时5秒跳

电压高跳闸

二相电压不平

大于110%

漏电电流

大于30% ,延时10秒

逆功率

超速

大于8% ,延时0.5秒

大于115% ,延时5秒跳闸

过频率

低频率

大于110%

小于85%

小于2IV

差动保护

畜电池电压咼

大于30V

0秒跳闸

失磁保护 跳闸

跳闸

过电流保护 跳闸

润滑油压

跳闸

三次自起动失

冷却水温

发信

润滑油温度高 发信

跳闸

冷却水断

跳闸

油箱油位

发信

桩曲餾氐 发信

燃油量过低 发信

冷却水水位低 发信


本文标签: 模式 对象 属性