Silex (web framework)

Last updated
Silex
Original author(s) Fabien Potencier and Igor Wiedler
Developer(s) Silex contributors, SensioLabs
Initial release16 September 2010 (2010-09-16)
Final release
2.3.0 [1] / 20 April 2018 (2018-04-20)
Repository
Written in PHP
Operating system Cross-platform
Type Web framework
License MIT License
Website silex.symfony.com OOjs UI icon edit-ltr-progressive.svg

Silex is a micro web framework written in PHP and based on Symfony, Twig (template engine) and Doctrine (database abstraction). It is no longer 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=newSilex\Application();$app->get('/',function()use($app){return'Hello World!';});$app->run();

See also

Related Research Articles

<span class="mw-page-title-main">Drupal</span> Web content management system

Drupal is a free and open-source web content management system (CMS) written in PHP and distributed under the GNU General Public License. Drupal provides an open-source back-end framework for at least 14% of the top 10,000 websites worldwide and 1.2% of the top 10 million websites—ranging from personal blogs to corporate, political, and government sites. Systems also use Drupal for knowledge management and for business collaboration.

eZ Publish is an open-source enterprise PHP content management system that was developed by the Norwegian company Ibexa. eZ Publish is freely available under the GNU GPL version 2 license, as well as under proprietary licenses that include commercial support. In 2015, eZ Systems introduced eZ Platform to replace eZ Publish with a more modern and future-proof solution.

<span class="mw-page-title-main">Django (web framework)</span> Python web framework

Django is a free and open-source, Python-based web framework that follows the model–template–views (MTV) architectural pattern. It is maintained by the Django Software Foundation (DSF), an independent organization established in the US as a 501(c)(3) non-profit.

A web framework (WF) or web application framework (WAF) is a software framework that is designed to support the development of web applications including web services, web resources, and web APIs. Web frameworks provide a standard way to build and deploy web applications on the World Wide Web. Web frameworks aim to automate the overhead associated with common activities performed in web development. For example, many web frameworks provide libraries for database access, templating frameworks, and session management, and they often promote code reuse. Although they often target development of dynamic web sites, they are also applicable to static websites.

<span class="mw-page-title-main">Symfony</span> PHP web application framework for MVC applications

Symfony is a free and open-source PHP web application framework and a set of reusable PHP component libraries. It was published as free software on October 18, 2005, and released under the MIT License.

Scaffolding, as used in computing, refers to one of two techniques:

Propel is a free, open-source (MIT) object–relational mapping toolkit written in PHP. It is also an integral part of the PHP framework Symfony and was the default ORM up to, and including version 1.2.

Flow is a free and open source web application framework written in PHP. The first final version was released on October 20, 2011. It was primarily designed as a basis for the content management system Neos, but can also be used independently. It is generally suitable for PHP development of mid- or large-scaled web applications.

lime is a unit testing and functional testing framework built specifically for the Symfony web application framework based on the Test::More Perl library. The framework is designed to have readable output from tests, including color formatting, by following the Test Anything Protocol which also allows for easy integration with other tools. lime tests are run in a sandbox environment to minimize test executions from influencing each other. Though the lime testing framework is built for testing within Symfony, lime is contained within a single PHP file and has no dependency on Symfony or any other library.

Web2py is an open-source web application framework written in the Python programming language. Web2py allows web developers to program dynamic web content using Python. Web2py is designed to help reduce tedious web development tasks, such as developing web forms from scratch, although a web developer may build a form from scratch if required.

Apache Click is a page and component oriented web application framework for the Java language and is built on top of the Java Servlet API.

Zend Server is a complete and certified PHP distribution stack originally developed by Zend Technologies intended for high performance and scalable use cases.

<span class="mw-page-title-main">Flask (web framework)</span> Python web framework

Flask is a micro web framework written in Python. It is classified as a microframework because it does not require particular tools or libraries. It has no database abstraction layer, form validation, or any other components where pre-existing third-party libraries provide common functions. However, Flask supports extensions that can add application features as if they were implemented in Flask itself. Extensions exist for object-relational mappers, form validation, upload handling, various open authentication technologies and several common framework related tools.

Pimcore is an open-source enterprise PHP software platform for product information management (PIM), master data management (MDM), customer data management (CDP), digital asset management (DAM), content management (CMS), and digital commerce.

Twig is a template engine for the PHP programming language. Its syntax originates from Jinja and Django templates. It's an open source product licensed under a BSD License and maintained by Fabien Potencier. The initial version was created by Armin Ronacher. Symfony PHP framework comes with a bundled support for Twig as its default template engine since version 2.

<span class="mw-page-title-main">Fat-Free Framework</span>

Fat-Free Framework is an open-source web framework distributed under the GNU General Public License and hosted by GitHub and SourceForge. The software seeks to combine a full featureset with a lightweight code base while being easy to learn, use and extend.

<span class="mw-page-title-main">Laravel</span> Open source web application framework, written in PHP

Laravel is a free and open-source PHP web framework, created by Taylor Otwell and intended for the development of web applications following the model–view–controller (MVC) architectural pattern and based on Symfony. Some of the features of Laravel are a modular packaging system with a dedicated dependency manager, different ways for accessing relational databases, utilities that aid in application deployment and maintenance, and its orientation toward syntactic sugar.

A microframework is a term used to refer to minimalistic web application frameworks. It is contrasted with full-stack frameworks.

<span class="mw-page-title-main">Pop PHP Framework</span> Free and open source PHP web framework

The Pop PHP Framework a free and open source PHP Web framework that was created by Nick Sagona. It is distributed under the BSD License and hosted on GitHub. The framework is intended to be utilized for rapid application development, with an emphasis on web applications.

FastAPI is a modern web framework for building RESTful APIs in Python. It was first released in 2018 and has since quickly gained popularity among developers due to its ease of use, speed and robustness.

References

  1. "Changelog". silex.symfony.com. Retrieved 30 May 2019.
  2. 1 2 "The end of Silex". symfony.com.
  3. "Writing Silex Service Providers".
  4. "Scaling Silex".
  5. "Silex from micro to full stack".
  6. "Download - Silex - The PHP micro-framework based on the Symfony Components". silex.symfony.com. Archived from the original on 2018-06-24.
  7. "Silex Included Providers".
  8. "Who is behind Silex?".
  9. "Fabien Potencier: first tweet about Silex".
  10. "Best available PHP restful microframeworks".
  11. "Performance benchmark of popular PHP Frameworks".
  12. "PHP Framework benchmark".
  13. "Silex, a simple Web Framework". GitHub . 19 November 2021.