Software:Silex (web framework)
Original author(s) | Fabien Potencier and Igor Wiedler |
---|---|
Developer(s) | Silex contributors, SensioLabs |
Initial release | 16 September 2010 |
Final release | 2.3.0[1]
/ 20 April 2018 |
Written in | PHP |
Operating system | Cross-platform |
Type | Web framework |
License | MIT License |
Website | {{{1}}} |
Silex is a micro web framework written in PHP and based on Symfony, Twig (template engine) and Doctrine (database abstraction). It is no more supported since June 2018.[2]
The general purpose of Silex is to be as lightweight as you need it to be, as it is made for it to be as easy as possible to add features and extend the Silex base.[3] Silex can be used for the creation of small web applications (e.g. REST APIs) as this is the main case for micro frameworks,[4] however Silex can be extended into a full stack MVC framework.[5]
Silex comes in two available versions; 'fat' and 'slim'.[6] The difference between these being that the fat version is fully featured and includes database abstraction, a template engine and various Symfony components. Whereas the slim version just comes with a basic routing engine.
Features
The base feature set is a URL routing system, built-in Web Security, Sessions and Cookies abstraction. The extended version of Silex features integration of Twig, Doctrine, a Translation service for translating your application into different languages, a logging mechanism using the Monolog library to log requests and errors, services for form validation and generation, and more.[7]
History
Silex was originally created by Fabien Potencier, the creator of the Symfony framework, and Igor Wiedler.[8] It was first released 16 September 2010 as a 'web framework proof-of-concept'.[9]
Silex was at its time one of the best known micro frameworks for PHP[10] and was regularly placed among the fastest in benchmarks for micro framework comparisons.[11][12]
Silex became end-of-life in June 2018 with people being encouraged to use Symfony instead.[13][2]
Example
The following code shows a simple web application that prints "Hello World!":
$app = new Silex\Application(); $app->get('/', function() use($app) { return 'Hello World!'; }); $app->run();
See also
References
- ↑ "Changelog". silex.symfony.com. https://silex.symfony.com/doc/master/changelog.html.
- ↑ 2.0 2.1 "The end of Silex". https://symfony.com/blog/the-end-of-silex.
- ↑ "Writing Silex Service Providers". http://srcmvn.com/blog/2013/02/22/writing-silex-service-providers/.
- ↑ "Scaling Silex". https://igor.io/2012/11/09/scaling-silex.html.
- ↑ "Silex from micro to full stack". http://symfony.com/video/26/silex-from-micro-to-full-stack/English.
- ↑ "Download - Silex - The PHP micro-framework based on the Symfony Components". https://silex.symfony.com/download.
- ↑ "Silex Included Providers". https://silex.symfony.com/doc/providers.html#included-providers.
- ↑ "Who is behind Silex?". https://silex.symfony.com/.
- ↑ "Fabien Potencier: first tweet about Silex". https://twitter.com/fabpot/status/24650581999.
- ↑ "Best available PHP restful microframeworks". http://www.gajotres.net/best-available-php-restful-micro-frameworks/4/#ch7.
- ↑ "Performance benchmark of popular PHP Frameworks". http://systemsarchitect.net/performance-benchmark-of-popular-php-frameworks/.
- ↑ "PHP Framework benchmark". http://blog.a-way-out.net/blog/2015/03/27/php-framework-benchmark/.
- ↑ "Silex, a simple Web Framework". 19 November 2021. https://github.com/silexphp/Silex.
External links