1) What is MVC (Model View Controller):
·
MVC is a suitable architecture while developing
web applications due to separation of concerns.
- Model (The business layer as Calculation, Validations,
Database connectivity)-Via Model Classes
- View (The display(UI) layer)
- Controller (The input controller as Read datas from
view, send input data to the model)
·
Model is the part of the application that
handles the logic for the application data Often model objects retrieve data
(and store data) from a database.
·
View is
the part of the application that handles the display of the data. Most
often the views are created from the model data.
·
Controller is the part of the application that
handles user interaction. controllers read data from a view, control user
input, and send input data to the model.
·
The MVC separation also simplifies group
development. Different developers can work on the view, the controller logic,
and the business logic(Model) in parallel.
·
2) What is Advantages of MVC (Model View
Controller):
SoC – Separation of Concerns:
Separation
of Concerns is one of the core advantages of ASP.NET MVC. The MVC framework
provides a clean separation of the UI, Business Logic, Model or Data. Developer
can work Independently.
separation
of concerns, which means the code and .aspx page are tightly associated with
each other. This creates errors when the developer attempts to change one
without impacting other.
However,
ASP.NET MVC has a separation of concerns, which means that one aspect or
component can be changed without disturbing other..
More
Control
The
ASP.NET MVC framework provides more control over HTML, JavaScript, and CSS than
the traditional Web Forms.
Multiple view support
Due
to the separation of the model from the view, the user interface can display multiple
views of the same data at the same time.
Lightweight
ASP.NET MVC framework doesn’t
use View State and thus reduces the bandwidth of the requests to an extent.
Testability
ASP.NET MVC framework
provides better testability of the Web Application and good support for test
driven development too.
Change
Accommodation
User interfaces tend to change more frequently
than business rules (different colors, fonts, screen layouts, and levels of
support for new devices such as cell phones or PDAs) because the model does not
depend on the views, adding new types of views to the system generally does not
affect the model. As a result, the scope of change is confined to the view.
Full features of ASP.NET
One of the key advantages of using ASP.NET MVC
is that it is built on top of the ASP.NET framework and hence most of the
features of the ASP.NET like membership providers, roles, etc can still be
used.
3) How many Return Type in action method (Model
View Controller):
· MVC There
are total of nine return types we can use to return results from the controller
to view.
HOME BACK |
No comments:
Post a Comment