Join Jon Peck for an in-depth discussion in this video Introducing Model-View-Controller (MVC) architecture, part of Learning Symfony2 for PHP (2014).
- I'm going to explain MVC at only a very high level,…as this course's focus is on Symfony.…For a much more comprehensive description, I recommend…MVC Frameworks for Building PHP Web Applications…with Drew Falkman…here in the Lynda.com online training library.…MVC stands for Model-View-Controller.…It's a software design pattern…that separates the representation of information…from user interaction.…This explicit separation of components…allows for greater code reusability…and logical separation of program responsibilities.…
In short, MVC keeps code organized,…which in turn helps projects and teams.…MVC separates applications into three distinct layers.…The model contains business logic for the application.…Models process data, including the saving,…retrieval, validation, and so forth.…The view renders modeled data.…Containing no business logic,…views are distinct from the model,…yet depend on the model for getting the data needed.…Views typically render as HTML,…but can be used to produce XML feeds, multimedia, and more.…
- Installing Symfony
- Creating a bundle from the console
- Customizing and generating database tables
- Generating controllers
- Creating, editing, and debugging entities
- Displaying and debugging a form
- Rendering content with templates
Skill Level Intermediate
Q: When trying to access the application, I receive an error stating "This script is only accessible from localhost." How can I get around this restriction?
A: The development front controller and configuration scripts are protected by default to only allow access from the localhost. Refer to the video titled “Exploring the Symfony layout” to see how to disable this security.