计算机毕业设计JAVA毕业设计

上传人:仙*** 文档编号:27533068 上传时间:2021-08-18 格式:DOC 页数:13 大小:68.50KB
收藏 版权申诉 举报 下载
计算机毕业设计JAVA毕业设计_第1页
第1页 / 共13页
计算机毕业设计JAVA毕业设计_第2页
第2页 / 共13页
计算机毕业设计JAVA毕业设计_第3页
第3页 / 共13页
资源描述:

《计算机毕业设计JAVA毕业设计》由会员分享,可在线阅读,更多相关《计算机毕业设计JAVA毕业设计(13页珍藏版)》请在装配图网上搜索。

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 load

60、ed by the Web server, the Web server must include the Java Virtual Machine to support Servlet. HTTP Servlet using a HTML form to send and receive data. To create an HTTP Servlet, need to extend the HttpServlet class, the class is a special way to handle HTML forms GenericServlet a subclass. HTML for

61、m is and tag definition. Form typically includes input fields (such as text input fields, check boxes, radio buttons and selection lists) and a button for submitting data. When submitting information, they also specify which server should implement the Servlet (or other program). HttpServlet class c

62、ontains the init (), destroy (), service () and other methods. Where init () and destroy () method is inherited. init () method: In the Servlet life period, only run once init () method. It is executed when the server load Servlet. You can configure the server to start the server or the clients firs

63、t visit to Servlet fashion into the Servlet. No matter how many clients to access Servlet, will not repeat the init (). The default init () method is usually to meet the requirements, but can also use custom init () method to overwrite it, typically the management server-side resources. For example,

64、 you may write a custom init () to be used only once a load GIF images, GIF images and improve the Servlet returns with the performance of multiple clients request. Another example is to initialize the database connection. The default init () method sets the Servlet initialization parameters, and us

65、e its ServletConfig object parameter to start the configuration, all covered by init () method of the Servlet should call super.init () to ensure that still perform these tasks. In the call to service () method before, make sure you have completed the init () method. service () method: service () method is the core of Servlet. Whenever a client requests a HttpServlet object, the object of the service () method must be called, and passed to this method a req

展开阅读全文
温馨提示:
1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
2: 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
3.本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!