DevNet Associate DEVASC 200-901 Official Certification Guide by Adrian Iliesiu (z-lib.org)

(andrew) #1

interested in learning about, these are the ones you will
most likely see on the 200-901 DevNet Associate
DEVASC exam.


Model-View-Controller (MVC) Pattern


The Model-View-Controller (MVC) pattern was one of
the first design patterns to leverage the separation of
concerns (SoC) principle. The SoC principle is used to
decouple an application’s interdependencies and
functions from its other parts. The goal is to make the
various layers of the application—such as data access,
business logic, and presentation (to the end user)—
modular. This modularity makes the application easier to
construct and maintain while also allowing the flexibility
to make changes or additions to business logic. It also
provides a natural organization structure for a program
that anyone can follow for collaborative development. If
you have used a web-based application, more than likely
the app was constructed using an MVC pattern.


Note
Numerous web frameworks use MVC concepts across
many programming languages. Angular, Express, and
Backbone are all written in JavaScript. Django and
Flask are two very popular examples written in Python.

The classical MVC pattern has three main parts:


Model: The model is responsible for retrieving and manipulating data.
It is often tied to some type of database but could be data from a simple
file. It conducts all data operations, such as select, insert, update, and
delete operations. The model receives instructions from the controller.
View: The view is what the end users see on the devices they are using
to interact with the program. It could be a web page or text from the
command line. The power of the view is that it can be tailored to any
device and any representation without changing any of the business
logic of the model. The view communicates with the controller by
Free download pdf