Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the commonly used MVC framework?

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article will explain in detail what the commonly used MVC framework is, and the editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.

The mvc framework has Struts1,struts2,spring mvc,grails,JSF, as well as a Tapestry.

The common MVC framework has the mode of JSP + servlet + javabean.

Many companies now implement MVC frameworks on their own, rather than using open source frameworks. Struts1,struts2,spring mvc,grails,JSF is the more commonly used MVC framework, and there is also a Tapestry.

A framework of the MVC pattern that forcibly separates the input, processing, and output of the application. Using MVC applications is divided into three core components: model, view, and controller. They each handle their own tasks. The most typical MVC is the mode of JSP + servlet + javabean.

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

Extended data

MVC framework performance

SpringMVC will be slightly faster than Struts2. SpringMVC is method-based, while Sturts2 is class-based. Each request will instantiate an action, and each action will be injected with attributes, while SpringMVC is method-based and finer-grained, but be careful as you control data in servlet.

SpringMVC is a method-level interception that injects request data into the method according to the comments on the parameters. In SpringMVC, a method corresponds to a request context. The Struts2 framework is class-level interception, creating an Action every time a request comes, and then calling the setter getter method to inject the data in the request; Struts2 actually deals with request through the setter getter method.

On the commonly used MVC framework is shared here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report