版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、英文原文:java is a simple, object-oriented, distributed, interpreted, robust security, structure-neutral, portable, high performance, multithreaded dynamic language. the main advantage of java language, java applications across hardware platforms and operating systems for transplant - this is because th
2、e jvm is installed on each platform can understand the same byte code. java language and platform scalability is very strong. at the low end, java language is the first open standards technology support enterprise one, support the use of xml and web service can not stride business lines to share inf
3、ormation and applications cheng xu. there are three versions of java platform, which makes software developers, service providers and equipment manufacturers can target specific market development: 1. java se formapplications. java se includes support for java web services development classes, and f
4、or the java platform, enterprise edition (java ee) to provide a basis. most java developers use java se 5, also known as java 5.0 or tiger. 2. java ee formerly known as j2ee. enterprise edition to help develop and deploy portable, robust, scalable and secure server-side java applications. java se ja
5、va ee is built on the foundation, which provides web services, component model, management and communication api, can be used to achieve enterprise-class service-oriented architecture and web 2.0 applications. 3. java me formerly known as j2me. java me devices in mobile and embedded applications run
6、ning on a robust and flexible environment. java me includes flexible user interfaces, robust security model, and many built-in network protocols and networking that can be dynamically downloaded and extensive support for offline applications. java me-based application specification only write once a
7、nd can be used in many devices and can use the native features of each device. java language is simple. java language syntax and the c language and c + language is very close, java discarded the c+, rarely used, hard to understand the characteristics, such as operator overloading, multiple inheritan
8、ce, the mandatory automatic type conversion. java language does not use pointers, and provides automated waste collection. java is an object-oriented language. java language provides classes, interfaces and inheritance of the original language, for simplicity, only supports single inheritance betwee
9、n classes, but support multiple inheritance between interfaces and support classes and interfaces to achieve between the mechanism (keyword implements) . java language fully supports dynamic binding, and c + language used only for dynamic binding of virtual functions. in short, java language is a pu
10、re object-oriented programming language. java language is distributed. java language support for internet application development, javas rmi (remote method activation) mechanism is also an important means of developing distributed applications. java language is robust. javas strong type system, exce
11、ption handling, automated waste collection is an important guarantee robust java programs. java language is safe. java is often used in network environment, this, java provides a security mechanism to prevent malicious code attacks. java language is portable. this portability comes from the architec
12、ture neutrality. java system itself is highly portable. java language is multi-threaded. in the java language, the thread is a special object, it must thread class or the son (sun) class to create. java language support simultaneous execution of multiple threads, and provide synchronization mechanis
13、ms between threads (keyword synchronized). java language features make java an excellent application of unparalleled robustness and reliability, which also reduced application maintenance costs. java on the full support of object technology and java platform api embedded applications to reduce devel
14、opment time and reduce costs. javas compile once, run everywhere feature can make it anywhere available to provide an open architecture and multi-platform, low-cost way of transmitting information between. hibernate hibernate is a lightweight jdbc object package. it is an independent object persiste
15、nce framework, and the app server, and ejb is no necessary link. hibernate can use jdbc can be used in any occasion, such as java application, database access code, dao interface implementation class, or even access the database inside a bmp code. in this sense, hibernate, and eb is not a category o
16、f things that did not exist either-or relationship. hibernate and jdbc is a closely related framework, the hibernate and jdbc driver compatibility, and databases have some relationship, but the java program and use it, and the app server does not have any relationship, there was no compatibility iss
17、ues. 1614hibernate provides two cache, first-level cache is a session-level cache, which cache belongs to the scope of services. this level of cache by the hibernate managed without the need for intervention under normal circumstances; second-level cache is sessionfactory-level cache, it belongs to
18、the process of range or scope of the cache cluster. this level of cache can be configured and changed, and can be dynamically loaded and unloaded. hibernate query results also provide a query cache, it depends on the second level cache. when an application called sessions save (), update (), saveoru
19、pdate (), get () or load (), and the query interface call list (), iterate () or filter () method, if the session cache does not exist a corresponding object, hibernate will put the object to the first level cache. when cleaning the cache, hibernate objects according to the state of the cache change
20、s to synchronize update the database. session for the application provides two methods of managing the cache: evict (object obj): removed from the cache parameters of the specified persistent object. clear (): empty the cache of all persistent objects. hibernate second-level cache strategy general p
21、rocess is as follows: 1) the condition when a query is always issued a select * from table_name where . (select all fields) such as sql statement to query the database, an access to all of the data object. 2) all the data objects to be placed under the id to the second level cache. 3) when the hiber
22、nate object-based id to access the data, the first check from the session a cache; finding out, if the configuration of the secondary cache, then the secondary cache from the investigation; finding out, and then query the database, the results in accordance with the id into the cache. 4) remove, upd
23、ate and increase the time data, while updating the cache. hibernate second against the conditions of the query cache. hibernate object-relational mapping for the delay and non-delay object initialization. non-lazy when reading an object and the object will be all read out together with other objects
24、. this sometimes results in hundreds (if not thousands of words) select statement when reading the object implementation. this problem sometimes occurs when using the two-way relationship, often leading to the databases to be read during the initialization phase out. of course, you can take the trou
25、ble to examine each object and other objects of guanxi, and to the most expensive of the shan chu, but in the last, we may therefore lose le orm tool this xiangzai obtained bian li. a cache and secondary cache of comparison: the first level cache second level cache data stored in the form of interre
26、lated persistent objects the object of bulk data cache range of the scope of services, each transaction has a separate first-level cache process range or scope of the cluster, the cache is the same process or cluster to share on all matters within the concurrent access policies because each transact
27、ion has a separate first-level cache, concurrency problem does not occur without the need to provide concurrent access policy will be a number of matters simultaneous access to the same second-level cache data, it is necessary to provide appropriate concurrent access policies, to ensure that a parti
28、cular transaction isolation level data expiration policies did not provide data expiration policies. object in a cache will never expire, unless the application explicitly clear the cache or clear a specific object must provide data expiration policies, such as memory cache based on the maximum numb
29、er of objects, allowing objects in the cache of the most a long time, and allowing the object in the cache the longest idle time of physical memory and hard disk memory storage medium. first of all bulk data objects stored in the memory-based cache, when the number of objects in memory to data expir
30、ation policy specified limit, the remaining objects will be written on the hard disk cache. caching software implementation of the hibernate session is included in the realization of the cache provided by third parties, hibernate provides only a cache adapter (cacheprovider). used to plug into a par
31、ticular cache in hibernate. way cache enabled applications by as long as the session interface implementation save, update, delete, data loading and query the database operations, hibernate will enable first-level cache, the data in the database in the form of an object copied to the cache for batch
32、 updates and bulk delete operations, if you do not want to enable first-level cache, you can bypass the hibernate api, jdbc api directly to perform that operation. users can type in a single class or a single set of second-level cache size on the configuration. if the instance of the class are frequ
33、ently read but rarely modified, you can consider using a second-level cache. only for a class or set of second-level cache is configured, hibernate will run when an instance of it to the second-level cache. user management means the first level cache of physical media for the memory cache, because t
34、he memory capacity is limited, must pass the appropriate search strategies and retrieval methods to limit the number of objects loaded. session of the evit () method can explicitly clear the cache a specific object, but this method is not recommended. second-level cache memory and the physical media
35、 can be a hard disk, so the second-level cache can store large amounts of data, data expiration policy maxelementsinmemory property values can control the number of objects in memory. second-level cache management mainly includes two aspects: select to use the second-level cache of persistent classe
36、s, set the appropriate concurrency strategy: select the cache adapter, set the appropriate data expiration policies. one obvious solution is to use hibernates lazy loading mechanism provided. this initialization strategy is only invoked in an object-to-many or many to many relationship between its r
37、elationship only when read out of the object. this process is transparent to the developer, and only had a few requests for database operations, it will be more obvious performancehave open. this will be by using the dao pattern abstracts the persistence time of a major problem. persistence mechanis
38、ms in order to completely abstract out all of the database logic, including open or closed session, can not appear in the application layer. the most common is the realization of the simple interface of some dao implementation class to encapsulate the database logic completely. a fast but clumsy sol
39、ution is to give up dao mode, the database connection logic to add the application layer. this may be an effective small applications, but in large systems, this is a serious design flaw, preventing the system scalability. struts2 struts2 is actually not a stranger to the web frameworks, struts2 is
40、webwork design ideas as the core, absorb struts1 advantages, so that the struts2 is the product of the integration struts1 and webwork. mvc description: struts2 webwork is compatible with the mvc framework struts1 and since, that the mvc framework on the mvc framework will have to make a brief, limi
41、ted to a brief, if want to learn more about mvc can view the related knowledge document, or to find a struts1 books, i believe the above is not rare on the length of mvc. closer to home, in fact, java the present situation of these frameworks, its ultimate goal is to contact coupling, whether spring
42、, hibernate or the mvc framework, are designed to increase contact with coupling reuse. mvc contact with the coupling between view and model. mvc consists of three basic parts: model, view and controller, these three parts work together to minimize the coupling to increase the scalability of the pro
43、gram and maintainability. various parts of the implementation technology can be summarized as follows: 1) model: javabean, ejbs entitybean 2) view: jsp, struts in taglib 3) controller: struts the actionservlet, action to sum up the advantages of mvc mainly about aspects: 1) corresponds to multiple v
44、iews can be a model. by mvc design pattern, a model that corresponds to multiple views, you can copy the code and the code to reduce the maintenance amount, if model changes, but also easy to maintain 2) model the data returned and display logic separate. model data can be applied to any display tec
45、hnology, for example, use the jsp page, velocity templates, or directly from excel documents, etc. 3) the application is separated into three layers, reducing the coupling between the layers, providing application scalability 4) the concept of layers is also very effective, because it put the differ
46、ent models and different views together, to complete a different request. therefore, the control layer can be said to include the concept of user requests permission 5) mvc more software engineering management. perform their duties in different layers, each layer has the same characteristics of the
47、components is beneficial tool by engineering and production management of program code struts2 introduction: struts2 struts1 development appears to come from, but in fact struts1 struts2 and design ideas in the framework of the above is very different, struts2 webworks design is based on the core, w
48、hy not follow the struts1 struts2 design ideas after all, struts1 in the current enterprise applications market is still very big in the, struts1 some shortcomings: 1) support the performance of a single layer 2) coupled with the servlet api serious, this could be the execute method from the action
49、statement which you can see them 3) the code depends struts1 api, there are invasive, this can be written when the action class and look out formbean, action struts in action class must implement the reason for struts2 webworks design for the core point is the recent upward trend of webwork and play
50、 webwork not struts1 above those shortcomings, more mvc design ideas, and more conducive to reuse the code. based on the above description can be read out, struts2 architecture and architecture struts1 very different, struts1 is to use the actionservlet as its central processor, struts2 is using an
51、interceptor (filterdispatcher) as its central processor, so one benefit is to make action class and servlet api was isolated. struts2 simple process flow is as follows: 1) browser sends a request 2) the processor to find the corresponding file under struts.xml the action class to process the request
52、 3) webwork interceptor chain applications automatically request common functions, such as: workflow, validation functions 4) if struts.xml method configuration file parameters, then call the corresponding action method parameters in the method class method, or call the execute method to deal with c
53、ommon user request 5) action class method returns the results of the corresponding response to the browser struts2 and struts1 contrast: 1) action class impleme achieve the time to achieve any classes and interfaces, while providing a actionsupport class struts2, however, not required. 2) struts1 th
54、e action class is the singleton pattern, must be designed into the thread-safe, struts2 was generated for each request for an instance 3) struts1 the action class dependence and the servlet api, execute the method from its signature can be seen, execute method has two parameters servlet httpservletr
55、equest and httpservletresponse, struts2 is not dependent on the servlet api 4) struts1 depends on the servlet api the web elements, therefore, of action struts1 when testing is difficult, it needs with other testing tools, struts2 in action can be as testing a number of other classes as service mode
56、l layer test 5) struts1 of action and the view through the actionform or its sub-class of data transmission, although there lazyvalidationform this actionform appearance, but still can not like the other levels as a simple pojo data transfer, and struts2 would like expect change becomes a reality 6)
57、 struts1 binding of the jstl, the preparation of convenience for the page, struts2 integrates ongl, you can use jstl, therefore, struts2 is more powerful expression language under compared with struts2 webwork: struts2 actually webwork2.3, however, struts2 webwork, or with a little difference: 1) st
58、ruts2 ioc no longer support the built-in containers, use springs ioc container 2) struts2 ajax for webwork features some of the label to use dojo to be replaced servletservlet is a server-side java application, platform and protocol independent features that can generate dynamic web pages. customer
59、requests to play it (web browser or other http client) and server response (http server, database or application) of the middle layer. servlet web server is located inside the server-side java applications started from the command line with the traditional application of different java, servlet loaded by the web server, the web server mus
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 烟叶回潮设备操作工QC管理能力考核试卷含答案
- 刻瓷工岗前评审考核试卷含答案
- 医院财务易错试题及答案梳理
- 筒并摇工创新思维考核试卷含答案
- 漆艺师技能认知评优考核试卷含答案
- 数码印花挡车工岗中安全防护考核试卷含答案
- 采气测试工岗前技术管理考核试卷含答案
- 炼焦备煤工操作能力水平考核试卷含答案
- 牧草栽培工技术基础水平考核试卷含答案
- 异丙醇装置操作工技巧知识考核试卷含答案
- 2026年神经外科医师高频面试题包含详细解答
- 2025年山东省检察院员额检察官遴选考试真题及答案
- 2025年设备监理师《设备工程质量管理与检验》真题及答案解析
- 华为任职资格体系(6版)
- 《中小学生卷面书写规范》征求意见稿-已压缩
- 2025-2026学年人教版八年级地理上册全册核心知识清单
- 美术专业介绍课件
- 2025至2030中国小米行业运营态势与投资前景调查研究报告
- 表面处理外协协议书
- 2025年威海社工笔试题及答案
- 综合解析人教版八年级上册物理《长度和时间的测量》综合测试试卷(含答案详解)
评论
0/150
提交评论