2. What is MVC ?
• It stands for Model View Controller
• It is an Architectural Pattern
• (What is an Architectural Pattern ? )
• Architectural Pattern covers the whole
architecture of our application. It is a kind of
design pattern which has much broader scope
3. • For example normal design patterns are used
for solving specific technical problems in our
application whereas an achitectural pattern is
used to solve the architectural problems in
our application
• So it basically effect the entire architecture of
our application.
4. • MVC divides the application into three parts.
• MODEL
• VIEW
• CONTROLLER
• Each of these parts have some specific
responsibilities.
• Lets see how MVC pattern is applied in a web
application
5. MVC
• In object-oriented programming development,
model-view-controller (MVC) is the name of a
methodology or design pattern for
successfully and efficiently relating the user
interface to underlying data models. The MVC
pattern is widely used in program
development with programming languages
such as Java, Smalltalk, C, and C++.
6. • The model-view-controller pattern proposes
three main components or objects to be used
in software development:
• A Model , which represents the underlying,
logical structure of data in a software
application and the high-level class associated
with it. This object model does not contain
any information about the user interface.
7. • A View , which is a collection of classes
representing the elements in the user
interface (all of the things the user can see
and respond to on the screen, such as
buttons, display boxes, and so forth)
• A Controller , which represents the classes
connecting the model and the view, and is
used to communicate between classes in the
model and view.
21. Business Logic in MVC
• Business logic is the custom rules or
algorithms that handle the exchange of
information between a database and user
interface. Business logic is essentially the part
of a computer program that contains the
information (in the form of business rules)
that defines or constrains how a business
operates. initially was used as an architectural
pattern for graphical user interfaces(GUI).
22. Advantage of MVC
• A main advantage of MVC is separation of
concern. Separation of concern means we
divide the application Model, Control and
View. We can easily maintain our application
because of separation of concern. In the same
time we can split many developers work at a
time.
23. Advantage of MVC
• Model View Controller is a
predictable software design pattern that can
be used across many frameworks with many
programming languages,
commonly Python, Ruby, PHP, JavaScript, and
more. It is popularly used to design web
applications and mobile apps.
24. Interactive System using MVC
• Interactive system are the system that are
handled with the collaboration of human and
computers.
• Different game like firing games racing games.
• Mobile phones
• World wide web(online system)
• Cash dispatching macine like ATM