計算機畢業(yè)設計JAVA畢業(yè)設計_第1頁
計算機畢業(yè)設計JAVA畢業(yè)設計_第2頁
計算機畢業(yè)設計JAVA畢業(yè)設計_第3頁
計算機畢業(yè)設計JAVA畢業(yè)設計_第4頁
計算機畢業(yè)設計JAVA畢業(yè)設計_第5頁
已閱讀5頁,還剩8頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權,請進行舉報或認領

文檔簡介

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 form applications. java se includes support for java web services development classes,

4、 and for 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 applic

5、ations. java se java 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 embedde

6、d applications running 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

7、 only write once and 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,

8、multiple inheritance, 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

9、inheritance between 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, jav

10、a language is a pure object-oriented programming language. java language is distributed. java language support for internet application development, java's rmi (remote method activation) mechanism is also an important means of developing distributed applications. java language is robust. java

11、9;s strong type system, exception 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 portabi

12、lity comes from the architecture 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 prov

13、ide synchronization mechanisms 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

14、applications to reduce development time and reduce costs. java's 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

15、is an independent object persistence 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, hibe

16、rnate, and eb is not a category of 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 relationshi

17、p, there was no compatibility issues. 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 sessionfa

18、ctory-level cache, it belongs to 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 ses

19、sion's save (), update (), saveorupdate (), 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 acco

20、rding to the state of the cache changes 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

21、 second-level cache strategy general process 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

22、 second level cache. 3) when the hibernate 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

23、 the id into the cache. 4) remove, update 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

24、 be all read out together with other objects. 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

25、 phase out. of course, you can take the trouble 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 le

26、vel cache data stored in the form of interrelated 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 conc

27、urrent access policies because each transaction 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 concur

28、rent access policies, to ensure that a particular 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, su

29、ch as memory cache based on the maximum number 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 t

30、he number of objects in memory to data expiration 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 adap

31、ter (cacheprovider). used to plug into a particular 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 for

32、m of an object copied to the cache for batch 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 configura

33、tion. if the instance of the class are frequently 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 ph

34、ysical media for the memory cache, because the 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. seco

35、nd-level cache memory and the physical media 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

36、 the second-level cache of persistent classes, set the appropriate concurrency strategy: select the cache adapter, set the appropriate data expiration policies. one obvious solution is to use hibernate's lazy loading mechanism provided. this initialization strategy is only invoked in an object-t

37、o-many or many to many relationship between its relationship 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 performance have open. this will be by using the dao pattern abstracts the pe

38、rsistence time of a major problem. persistence mechanisms 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 encapsula

39、te the database logic completely. a fast but clumsy solution 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 act

40、ually not a stranger to the web frameworks, struts2 is 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 framewo

41、rk on the mvc framework will have to make a brief, limited 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, i

42、ts ultimate goal is to contact coupling, whether spring, 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 minim

43、ize the coupling to increase the scalability of the program and maintainability. various parts of the implementation technology can be summarized as follows: 1) model: javabean, ejb's entitybean 2) view: jsp, struts in taglib 3) controller: struts the actionservlet, action to sum up the advantag

44、es of mvc mainly about aspects: 1) corresponds to multiple views 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

45、logic separate. model data can be applied to any display technology, 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

46、 of layers is also very effective, because it put the different 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 diffe

47、rent layers, each layer has the same characteristics of the 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

48、 above is very different, struts2 webwork's design is based on the core, why 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 w

49、ith the servlet api serious, this could be the execute method from the action 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 web

50、work's design for the core point is the recent upward trend of webwork and play 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,

51、 struts1 is to use the actionservlet as its central processor, struts2 is using an 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 f

52、ind the corresponding file under struts.xml the action class to process the request 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 meth

53、od parameters in the method class method, or call the execute method to deal with common 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 interf

54、aces, while providing a actionsupport class struts2, however, not required. 2) struts1 the 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 meth

55、od from its signature can be seen, execute method has two parameters servlet httpservletrequest 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 tes

56、ting tools, struts2 in action can be as testing a number of other classes as service model 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

57、as a simple pojo data transfer, and struts2 would like expect change becomes a reality 6) 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:

58、struts2 actually webwork2.3, however, struts2 webwork, or with a little difference: 1) struts2 ioc no longer support the built-in containers, use spring's ioc container 2) struts2 ajax for webwork features some of the label to use dojo to be replaced servletservlet is a server-side java applicat

59、ion, platform and protocol independent features that can generate dynamic web pages. customer 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 must include the java virtual machine to support s

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評論

0/150

提交評論