LanguagesPHPCompose a MVC Paradigm for PHP with Symfony

Compose a MVC Paradigm for PHP with Symfony

Developer.com content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.

As you probably know, Model-View-Controller (MVC) is a programming technique that Wikipedia defines as: “an architectural pattern used in software engineering. The pattern isolates ‘domain logic’ (the application logic for the user) from input and presentation (GUI), permitting independent development, testing and maintenance of each.” If you apply this definition to PHP, you may very well come up with the Symfony framework. Symfony is an open-source PHP web framework that provides architecture, components and tools for developers to build and maintain complex web applications faster. The Symfony framework uses the MVC architecture to make the web applications a lot easier and faster to modify.

Symfony generates the front controller MVC logic component. The front controller and the layout are common to all actions in a Symfony-based application. You can use Symfony’s Propel library to generate the classes of the model layer automatically. By providing a simple API for storing and retrieving data, the Propel library allows you to access your database using a set of objects. The database implementation is invisible to you. If you want to change the database, all you need do is modify a parameter. The view logic is a simple configuration file, which you can easily modify as you like.



Read the full story at PHPBuilder.com:


Compose a MVC Paradigm for PHP with Symfony

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends & analysis

Latest Posts

Related Stories