Freelance Jobs Freelance Jobs

Saturday, April 10, 2010

MVC(Model-View-Controller)

MVC(Model-View-Controller) is an architecture which separate data presentation(View), domain logic(Model) and user interaction and processing(Controller) with each other. The concept behind this is to changing the data presentation does not affect the business logic and processing, changing the business logic does not affect the user presentation and processing.

Now days, the software engineer is using MVC architecture to develop the program. MVC architecture allow the programmer to reuse object code.

Model:

In MVC, model means the domain logic of the data. It encapsulates data and functionality domain logic. While creating model, its no concern that how data be look and feel to the user. Its contains the functions which process on the data. These functions be public which accessed in view and controller.

View:

In MVC, view means data presentation to the user. View obtains data result set from model and render it to user. The output of any application be generated in view. View can access the model but can not change the state of the model.

Controller:

In MVC, controller receives the input from user, call responsible model. The controller is not act like bridge between the model and view. Its only responsible to calling responsible model to user input and informs the view that state of model has been changed.

1 comment:

  1. All details good.. that cleared all issus on MVC. ... Thanks

    ReplyDelete