Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Silex vs SLIM PHP Framework

Tags:

slim

silex

We have narrow down our search between Silex and Slim PHP frameworks for routing our REST APIs on our Apache/PHP/MySQL Server.

Both seem to have good reviews. Silex has probably a bigger community because it came from Symfony. But the documentation seems to be better in Slim.

What do you guys suggests? Any real world experience from production environments?

Sathish

like image 296
sathish subramanian Avatar asked Oct 29 '15 09:10

sathish subramanian


People also ask

Is Slim a good framework?

Slim framework plays well with good software practices including SOLID principles, design patterns, security principles and dependency injection. Slim's easier to learn than fullstack frameworks such Laravel or Symfony.

What is PHP slim?

Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs. php use Psr\Http\Message\ResponseInterface as Response; use Psr\Http\Message\ServerRequestInterface as Request; use Slim\Factory\AppFactory; require __DIR__ . '/../


1 Answers

I had the same choice to make, and I choose Silex, here is why :

  • Silex seems to have a bigger community than Slim, maybe it's just my point of view
  • It's based on Symfony components, so with a bit of reflection, you can use tips and workarounds which work for Symfony and apply them to Silex.
  • As it's based on Symfony it has a better integration with other bundle (for example Twig, which is for me necessary)
  • This Symfony base also garanty that it will be more "Long Term Support" that Slim, which is independent.

To conclude, the main argument is that is based on Symfony which has many advantage. The Symfony Debug tools are the best thing on earth !!

Now I have two sites made with Twig and I'm really happy !

You can also see that, it's a technical comparison of these both frameworks : https://michalzuber.wordpress.com/2015/04/02/silex-vs-slim-php-microframework-comparison/

like image 88
Raphaël Vigée Avatar answered Sep 22 '22 19:09

Raphaël Vigée