Chapter 5. Symfony at a Glance

Full-stack frameworks like Symfony help ease the process of building modular applications by providing all of the necessary components, from user interface to data store. This enables a much rapid cycle of delivering individual bits and pieces of application as it grows. We will experience this later on by segmenting our application in several smaller modules, or bundles in Symfony terminology.

Moving forward we will install Symfony, create a blank project, and start looking into individual framework features essential for building modular application:

  • Controller
  • Routing
  • Templates
  • Forms
  • The bundle system
  • Databases and Doctrine
  • Testing
  • Validation

Installing Symfony

Installing Symfony is pretty straightforward. We can use the following command to install Symfony on Linux or Mac OS X:

sudo curl -LsS https://symfony.com/installer -o /usr/local/bin/symfony
sudo chmod a+x /usr/local/bin/symfony

We can use the following command to install Symfony on Windows:

c:> php -r "file_put_contents('symfony', file_get_contents('https://symfony.com/installer'));"

Once the command is executed, we can simply move the newly created symfony file to our project directory and execute it further as symfony, or php symfony in Windows.

This should trigger an output shown as follows:

Installing Symfony

Preceding response indicates we have successfully setup Symfony and are now ready to start creating new projects.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.111.9