|
Back End Concepts
Back End Concepts
Back End Concepts
Back End Concepts Context The purpose of many web systems is to retrieve data from a data repository and display it for the user. After the user manipulates the data in frontend, the system stores and updates the data in repository DB. The key flow of information is between the data stored on some server repository DB and the frontend user interface in browser. The presentation layer, i.e. look&feel of user interface tends to change much more frequently than the data storage system. ---------------------------------- Model View Controller Pattern ---------------------------------- The MVC is a classic design pattern often used by applications that need the ability to maintain multiple views of the same data. The MVC pattern hinges on a clean separation of objects into one of three categories: - models for maintaining data, in some data repository on server; - views for displaying all or a portion of the data in the clients Frontend, i.e. in the browser; - and controllers for handling events that affect the model or view(s). The Model-View-Controller (MVC) pattern separates the modeling of the domain, the presentation, and the actions based on user input into three separate classes [Burbeck92]: Model. The model manages the behavior and data of the application domain, responds to requests for information about its state (usually from the view), and responds to instructions to change state (usually from the controller). View. The view manages the display of information in the browser. Controller. The controller interprets the mouse and keyboard inputs from the user, informing the model and/or the view to change as appropriate. Because of this separation, multiple views and controllers can interface with the same model. Even new types of views and controllers that never existed before can interface with a model without forcing a change in the model design. --------------------------- RoR MVC vs Django MTV --------------------------- Django call their separation of layers MTV (model-template-view) instead of the traditional MVC. In MTV context, the template is referred to data structure, to field names and types. Using Django's template instead of Rail's view seems more obvious to some developers. The MVC pattern does not fit optimally in the rapid web development practice.
|
|