MVC understanding (not pull the whole vernacular word)

I made all the blog just to give the programmer wanted to do, but the basis of no or poor, people started going to the workplace

All points of view is not necessarily accurate, I do not know or do not understand the notes will come out

Let me talk about MVC

MVC understood as: M = Model = database tables inside each column of data type definitions you write code such as the database has a name column is the varchar () you write the code data type inside the definition of a special folder to store the definition every file you want to use to separate table will define a name, which is written in the format

  (Defined according to the type of data that you use the database), for example: public string Name {get; set;} 

      public = statements (public declarations do not have to write on why the pipe) (also private statement private)

      Type defined data string = 

      Name = name of data defined   

     {Get; set} = full written as shorthand get {return name;} set {name = value}

   End of the file will end in a fixed format on the unified folder such as so and so such and such a model Entity

      Business logic layer: the business logic is also written in the M inside, what is the business logic of it, you can understand him as to what specific code will be placed at the end of a fixed format fixed folder, and some frame It will be divided into two layers, a layer of concrete how dry, how dry layer to define the specific names and call, with the call did not understand the words of mapping layer;

   C = controller layer controller is only responsible for calling the method but is not responsible for how to achieve specific functions you can understand him for the leadership, command-control only how to dry on the line

   V = view also called UI is meant html jsp this, UI framework, but there are a lot of front-end interface are responsible only for the front screen display, css, js inside achieve but css, js there are many frameworks.

    

    You write code in order to go inside for example you want to search your view is the front-end interface to send a request to pass js controller controller and then to the service / app Yewuluojiceng

After writing about the business logic of the model of how to do call data model messages found in connection sql statement return back layer by layer.

 

                                                                           

Guess you like

Origin www.cnblogs.com/lichangqing1997/p/11345034.html