Home >Common Problem >What are the mvc frameworks?

What are the mvc frameworks?

coldplay.xixi
coldplay.xixiOriginal
2020-08-24 11:18:036130browse

The mvc framework includes Struts1, struts2, spring mvc, grails, JSF, and Tapestry.

What are the mvc frameworks?

#The commonly used MVC framework has the JSP servlet javabean pattern.

Many companies now implement the MVC framework themselves instead of using open source frameworks. Struts1, struts2, spring mvc, grails, and JSF are all commonly used MVC frameworks, and there is also Tapestry.

A certain framework of the MVC pattern, which forces the application's input, processing and output to be separated. Applications using MVC are divided into three core components: model, view, and controller. They each handle their own tasks. The most typical MVC is the JSP servlet javabean pattern.

The main purpose of using the MVC framework core controller is to process all requests, and then uniformly process those special requests (controllers) (character encoding, file upload, parameter acceptance, exception handling, etc.) ,The core controller of SpringMVC is Servlet, and Struts2 is Filter.

What are the mvc frameworks?

Extended information

MVC framework performance

SpringMVC will be slightly faster than Struts2. SpringMVC is based on method design, while Sturts2 is based on classes. Each time a request is made, an action will be instantiated, and attributes will be injected into each action. SpringMVC is based on methods, with finer granularity, but it must be carefully controlled like controlling data in a servlet. .

SpringMVC is a method-level interception. After intercepting the method, the request data is injected into it according to the annotations on the parameters. In SpringMVC, a method corresponds to a request context. The Struts2 framework is a class-level interception. Every time a request comes, an Action is created, and then the setter getter method is called to inject the data in the request; Struts2 actually deals with the request through the setter getter method.

For more programming-related content, please pay attention to the Programming Video column on the php Chinese website!

The above is the detailed content of What are the mvc frameworks?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:What is an adapter?Next article:What is an adapter?