Distributed Computing (VI)--J2EE MVC programming

Source: Internet
Author: User

1 Description of the full name of the Java EE, industrial objectives.

Java 2 Platform Enterprise EDITION,J2EE is an architecture that leverages the Java 2 platform to simplify the development, deployment, and management of enterprise solutions-related complex issues. The ultimate goal is to be an architecture that enables enterprise developers to dramatically reduce time-to-market.

2 Describe the four-layer model of the Java EE, which layer does MVC belong to? Which tier does JPA belong to?

• Client tier components running on client machines

L WEB-tier components running on a Java EE server

L Business Logic Layer components running on the Java EE server

L Enterprise Information System layer software running on the EIS server

MVC belongs to the WEB layer

JPA belongs to the business logic layer

3 Explain what components are MVC, and what are the responsibilities of each component?

Model (models)

The model contains the core functionality of the application. The model encapsulates the state of the application. Sometimes the only function it contains is the state. It knows nothing about the view or controller.

View (views)

The view provides a representation of the model. It is the appearance of the application . The view can access the Read method of the model, but cannot access the Write method. In addition, it knows nothing about the controller. When you change the model, the view should be notified.

Controller (Controllers)

The controller responds to the user's input. It creates and sets up the model.

4 A simple description of the Web application MVC model execution process.

The model layer implements the business logic in the system, which can often be implemented with JavaBean or EJBS.

The view layer is used for interaction with the user and is usually implemented with JSP. The controller layer is a bridge between model and view that can dispatch a user's request and select the appropriate view for display, and it also interprets the user's input and maps them to the actions that the model layer can perform.

6 experiment serving Web Content with Spring MVC, the reference document describes which Java annotation implements the parameters of the Post method Mapping

@PostMapping and @RequestMapping (method =requestmethod.post)

7 can the controller return void? If you can, programming to pay attention to what problems. Refer to the code of Spring MVC HelloWorld for jetty.

Yes, you need to specify the use in the controller HTML file or write the htmp file directly in the controller .

8 in the Servlet 3.0 specification, application startup must be an implementation of that interface.

Genericservlet, HttpServlet

10 study the package structure of the IBM JPA program and the Spring Thyme Seed Starter Manager program, explaining which parts (packages) you need to focus on when you are programming java.

for IBA JPA needs to pay attention to how to inherit the interface, how to create a query, for spring Thyme Seed Starter Manager, you need to be aware of how @controller and other metadata are used, the syntax of the Thymeleaf engine already in HTML

Distributed Computing (VI)--J2EE MVC programming

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.