Sunday, August 15, 2010

What is Mvc Design Pattern

Hi, All
                   This is My Second Blogs, if you Know about The three tire architecture then MVC is very easy
             to understand becoz it follow three tire architechture rule. first of all
             What is MVC Design Pattern ?

              MVC (Model View Controller) pattern is very useful for Web
                based e-commerce application.

                Asp.Net web application

                aspx, ascx, master pages are View

                aspx.cs, ascx.cs, master.cs are Controller

                App_Code folder contains classes and some references –
                Model Component

                The Model holds the data displayed by the View and managed by the
               Controller. The View is responsible for delivering output to the End User,
               and the Controller reacts to End User actions and updates the Model

             But I want to Tell You About Model, You Very Careful about this Layer.

This layer has all our business logic. This is the most important layer. This layer will have our core        functionality. This layer should be designed in such a way that out core and complex logic should be designed as functions and these function should be marked as overridable so that the inheriting classes can re-use the logic or override the logic. We should not make all the functions in the layer as overridable this may raise some security Issue. 

                MVC Advantages: Business logic can be easily modified
                without affecting or any need to make changes in UI.
                This is the Meaning of MVC Design pattern. but if you relate with Three tire architechture.
                 then first we define the Business Layer, Data Access Layer and last but not the list Presentation layer.
                  same thing here also aspx page represent Presentation Layer. Business layer it is a class library, In that case you need write
                  The logic how you can connect with the data access layer and presentation layer, data access layer you are connect with database and business Logic layer.

MVC Nothing But a successful development and reuse of code



No comments:

Post a Comment