Home > Net >  Asp.net MVC separation before and after the end is how to write?
Asp.net MVC separation before and after the end is how to write?

Time:09-18

Asp.net MVC write website, want to write the back-end code already, also want to write the views in the views, if separated before and after the end, views of view also need to write?

CodePudding user response:

Need to write, of course, the front-end code needs to views view show, before and after the end of the lines between depends on project size and nature of general from the beginning of the controller, the controller module, model module, number of backend database end, views, javascript, CSS is a front end,

CodePudding user response:

Here the so-called "back-end code" are usually confused the concept of separation of front and back side is refers to the application layer development with back-end business service API layer separation, so that you can write API specification together by the front-end designers and architects, developed by the back-end engineer to implement the API interface function, and asp.net MVC so-called "back-end code" often refers to the page HTML code generation, it is putting the cart before the horse for the separation of front and rear end concept, so the "back-end" here is an alternative, in fact you say most "back-end code" refers to the front-end code,

CodePudding user response:

In the development of our large group enterprise application system, database and assume that there are 300 tables, there are at least 280 tables is the system automatically according to the front-end application Model definition and automatically create a data table, plus we have a mature framework in workflow, and so on system, automatically creating standardized across all projects database table and service code, to say the complex and changeable high-performance collectivization of enterprise application system development, need to spend only 3% of the energy in a database table, and many developers because they have no experience, starting from scratch, could be 90% of the energy is expended in this respect, all day with a database table, there are essential differences between, so what I call "back-end code" is aimed at maturity in terms of the development of the system, you know,

CodePudding user response:

Asp.net MVC is not really separation before and after the end, just the code classification,
Before and after the separation mode
The front end of the front end: Html + Javascript (I use Vue framework - simple studious)
The backend: Asp.net write WebApi interface, database connection handle,
The front-end and back-end information using Json data transfer value

The back-end project structure


Baidu search, "Asp.net create Webapi items",

CodePudding user response:

Asp.net MVC separation before and after is not end, HTML + ajax + webapi is, of course not only the above this way

CodePudding user response:

Finishing it and don't give money, not piao is a concept
V is useless in MVC, request directly into C, then the method returns Json, not into view, front-end redirect users according to Json content control, etc., are all to do with the front frame,
  • Related