Silex is a PHP micro-framework based on Symfony components and inspired by the Sinatra Ruby framework. In this article, we are going to get started with the framework and see the how it fits our needs.
Installation
The best and recommended way to install Silex is through composer:
// composer.json
{
"require": {
"silex/silex": "1.3.*@dev",
"twig/twig": "1.17.*@dev"
},
"require-dev": {
"symfony/var-dumper": "dev-master"
}
}
Run composer update --dev to load the dependencies and generate the autoloader. We also required twig because we want to use it as our template engine, and the new var-dumper from Symfony as a development dependency - read more about it here.
Creating a Folder Structure
One of the things I like about Silex is that it gives you a bare bones framework that you can organize in any way you want.
Continue reading %Introduction to Silex – A Symfony Micro-framework%
by Younes Rafie via SitePoint
No comments:
Post a Comment