This blog is a big job for enterprise development programs written description of the development model, was supposed to write back-end rendering, but in order to improve development efficiency, reusability and front-end modules, thus using the component-based front-end development of Vue, and the rendering layer onto a front end, a rear end only dynamic data services
Benpian being asked to explain after the render layers put to the front end, back-end MVC how do to provide only dynamic data services
Back-end MVC Mode Description
First, the rear end of the file structure shown in FIG MVC pattern:
DA layer mainly a variety of the JavaBean, make sure that the JavaBean pure, can be configured to meet the overloaded constructors different data structures, in addition to get and set methods, other methods can not contain
DAO is mainly Bean data corresponding to the operation, since the data objects encapsulated, but in the process level package, all methods declared as static
static method
The main controller processes input and output control traffic flow control
Here with a small demo to illustrate the specific wording of the code annotation is very clear:
this demo has been uploaded to GitHub / QNdemo , the next can be downloaded view, annotate very detailed, direct running servlet have the following results:
database QN, data sheets for the User, the data table is as follows: