JavaEE Basic Practical Tutorial (1) --- Brief Description

Part 1 Practical

Tutorial Chapter 1 Introduction to JavaEE
According to different application fields, the Java language is divided into three platforms: Java ME, Java SE, Java EE
1.1 Java Application Overview
    The core technologies of Java Web applications are JSP, Servlet and JavaBean.
1.2 Software installation
    jdk official website download address Sun company was acquired by oracle, you can go to oracle official website to download
    Tomcat official website download address http://tomcat.apache.org
    Eclipse official website download and install
1.3 Ideas to solve the problem
    Early Web applications were all static HTML pages , which may present some personal information to the viewer. With the development of development technology, many technologies have come out, and the Model 1 mode is one of them. Model 1 is in the era when JSP is popular, and the entire Web application is almost entirely composed of JSP pages. Mixing control logic and display logic results in very low code reuse and is not conducive to maintenance and development. Developers see that this development mode is not a long-term solution, so they put forward the idea of ​​MVC, namely Model (model), View (view), Controller (controller). The model layer is responsible for data access, the view layer is responsible for page display, and the control layer is responsible for processing and jumping, which greatly reduces their coupling and improves the scalability and maintainability of the application. Even so, programmers still have a lot of work to do, and the code is not written in a certain way. Different programmers can write different codes, and this kind of project is very inconvenient for expansion and maintenance. At this time, the birth of the framework is about to come out. There are many frameworks in JavaEE, such as Struts framework, Hibernate framework, Spring framework.

1.3.1 A good framework must have the following characteristics
    : quick start, good technical support, strong integration of other technologies, strong expansion capability, reasonable design structure, and stable operation.
1.3.2Struts framework
  As mentioned earlier, the proposal of the MVC pattern has changed the idea of ​​program design, but the standardization of the code is still very poor, while the Structs framework has the advantages of modularization, flexibility and reusability of components, and also simplifies the MVC-based WEB application development, from the application point of view, Struts has three major blocks: Struts core class, Struts configuration file and Struts tag library.
  It can be seen that Struts itself implements the MVC pattern. As far as the development of Struts is concerned, from the previous Struts1 to the current Struts2, the purpose is to give programmers a good framework to develop application software.
1.3.3 Hibernate framework
    For the current Java EE information system, the process of object-oriented analysis and object-oriented design is usually adopted. System from requirements analysis to system design are carried out in an object-oriented way. But in the detailed design stage, because the data persistence needs to be saved to the relational database, it is very frustrating to have to modify the design scheme from the bottom up, and go back to the old way of programming according to the process.
    But people's wisdom is infinite, and they will always find a solution when they encounter a problem, rather than compromise or take a detour. The advent of Hibernate solves this problem, Hibernate is an object/relational mapping tool oriented to the Java environment, which can map the objects represented by the object model to the SQL-based relational data model. In this way, there is no need to worry about how to persist data in an object-oriented way.
1.3.4 Spring Framework
    Spring is a framework extracted from actual development, so it completes a large number of common steps of development, thus greatly improving the development efficiency of enterprise applications.
    Spring provides a lightweight solution for enterprise application development. Among them, dependency injection, AOP-based declarative transaction management, integration of multiple persistence layers and excellent Web MVC framework are the most concerned . Spring can run through the various layers of the program, but it is not to replace those existing frameworks, but to integrate with them closely with a high degree of development, which is one of the reasons why Spring is widely used.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326643456&siteId=291194637