Home > front end >  The MVC
The MVC

Time:12-15

Could you tell me the MVC directly with HTML page through ajax calls in the back-end server JSP have why to distinguish? MVC easy maintainability and reflected in where?

CodePudding user response:

JSP in HTML mixed with a large, complex business logic, maintainability is very low, so lead to page vue is the same as the MVC and now actually, is less view - the model of real-time rendering, this layer of return it in the view layer model of the back, so that when you want to use the data in the page by @ the way of model can get

CodePudding user response:

If the JSP page as the output, just in a backend server for data processing, read and send, then use the ajax callback function accepts data refresh locally, that it also can separate the business logic, why not can use, have to use the MVC many a layer of the controller? In other words, view directly with JSP for data communication so as to realize data update is not good?

CodePudding user response:

You can't say wrong understanding! Just a level, in Java enterprise MVC, JSP is to act as a template, even without the JSP template engine, the other is generated on the server, will generate good HTML structure sent to the browser.

Now called before and after the separation, the front is all js technology stack (namely single-page applications, react, vue, presents), local page through ajax or asynchronous communication techniques to obtain needed data, page structure and style of the fully completed in the client.

What you see is the result of the 90 s began to develop technical process now, if you just stand in the now see the value of the JSP does not exist, but not all of the company or the project are following the popular technology, which now seems old projects are now the mainstream technology of, is still running, why not push the old projects the company to make? The answer is with what is technology? What reasonable it doesn't matter what good

CodePudding user response:

Come back said: MVC, is a design pattern, this pattern of best practices is not now web pages but GUI program (c/s projects), you can see some of the MVC, or its derivative model is everybody to MVC to understand or to a practice in the b/s, a kind of technology or solution to popular does not mean that no one is against it, or that is not, in fact has been criticised the MVC in practice in the b/s,

As to what your project using MVC or other patterns, as to what is the role of the JSP in the, I don't think our academic or engaged in scientific research, project this over with my boss said that you did a good job, even if you didn't do a good job in the project on the technology, with the height which is no use (user only to use, but not you study how your project is completed).

The last point:

Many people say it is noun industry, you look at ajax, the W3C official called XHR, this technology has the earliest Microsoft out, then don't call ajax, also don't call XHR. As Google some of the big items on online, let everybody see front can also play, so are former write js, CSS, js to compile now, you see, the CSS to compile

CodePudding user response:

, that is, if now to do a large site, is to use the MVC better or using ajax call server JSP better? What are the reasons?
  • Related