Book Image

Learning Phalcon PHP

Book Image

Learning Phalcon PHP

Overview of this book

Table of Contents (17 chapters)
Learning Phalcon PHP
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

What is MVC?


I am pretty sure that if you are reading this book, you are already familiar with the MVC pattern, but for beginners, we will try to explain this in a few words.

MVC is defined as an architectural pattern, and it stands for Model-View-Controller; it is used mostly in web development, but it is widely applied in software that needs a Graphical User Interface (GUI). To make this introduction quick, let's explain these components:

  • Model: This is usually used as an abstraction layer, and validation for the tables of a database, but it can be used to handle any kind of logic within the application.

  • View: A view, usually, represents a template (can be an HTML file) that the controller will render.

  • Controller: In a web application, the controller handles all the HTTP requests and sends an appropriate response. This response can mean rendering a template, outputting JSON data, and so on.

Note

For the exact definition, I suggest you check out the Wikipedia page of the MVC pattern at http...