Model-View-Controller pattern (Fig. 1) promotes
separation of domain logic (controller), user interface
(view) and data processing (model), as opposed to mixing
HTML, SQL queries and domain logic in the source code
(Fig. 2). In modern web application frameworks this
pattern is usually implemented through folder structure.
View files are responsible for showing data to the users of
application. No programming logic or database queries
can be run here, though data access may occur in these
files. They are structured as HTML files and usually use a
template language to present dynamic data, passed from
the controller. Model files are responsible for fetching,
modifying, inserting, and removing data from the
database. Controller files calls and fetches data from the