World Library  
Flag as Inappropriate
Email this Article

Silex (web framework)

Article Id: WHEBN0047822854
Reproduction Date:

Title: Silex (web framework)  
Author: World Heritage Encyclopedia
Language: English
Subject: Microframework, Agavi, PLF (web framerwork), Cygnite, Comparison of web application frameworks
Collection: Free Software Programmed in Php, Php Frameworks, Software Using the Mit License, Web Application Frameworks
Publisher: World Heritage Encyclopedia

Silex (web framework)

Original author(s) Fabien Potencier
Developer(s) Silex contributors, SensioLabs
Initial release 16 September 2010 (2010-09-16)
Stable release 1.3.3[1] / 8 September 2015 (2015-09-08)
Development status Active
Written in PHP
Operating system Cross-platform
Type Web application framework
License MIT License
Website .org.sensiolabssilex

Silex is a micro web application framework written in PHP and based on Symfony, Twig (template engine) and Doctrine (database abstraction). It is MIT Licensed.

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.[2] Silex can be used for the creation of small web applications (e.g. REST APIs) as this is the main case for micro frameworks,[3] however Silex can be extended into a full stack MVC framework.[4]

Silex comes in two available versions; 'fat' and 'slim'.[5] 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 1
  • History 2
  • Example 3
  • See also 4
  • References 5
  • External links 6


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.[6]


Silex was originally by Fabien Potencier, the creator of the Symfony framework, and Igor Wiedler.[7] It was first released 16 September 2010 (2010-09-16) as a 'web framework proof-of-concept'.[8]

Silex is now one of the best known micro frameworks for PHP[9] and is regularly placed among the fastest in benchmarks for micro framework comparisons.[10][11]


The following code shows a simple web application that prints "Hello World!":

$app = new Silex\Application();

$app->get('/', function($name) use($app) { 
    return 'Hello World!' 


See also


  1. ^ "Silex 1.3.3 released". Symfony Blog. Retrieved 15 September 2015. 
  2. ^ "Writing Silex Service Providers". 
  3. ^ "Scaling Silex". 
  4. ^ "Silex from micro to full stack". 
  5. ^
  6. ^ "Silex Included Providers". 
  7. ^ "Who is behind Silex?". 
  8. ^ "Fabien Potencier: first tweet about Silex". 
  9. ^ "Best available PHP restful microframeworks". 
  10. ^ "Performance benchmark of popular PHP Frameworks". 
  11. ^ "PHP Framework benchmark". 

External links

  • Official website
  • Silex Reference
  • Introduction to Silex
  • Silex Source Code
  • Silex Cheatsheet
  • Silex Community
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.