News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Igor Wiedler:
Scaling a Silex code base
November 09, 2012 @ 10:55:04

Igor Wiedler has a new post to his site today talking about scaling Silex-based applications (a microframework based on Symfony components) and using it for more than just the basic applications.

One common misconception about silex and microframeworks in general is that they are only suited for small, simple apps, APIs and prototyping. Of course, those use cases are the main selling point, but they are by no means the limit of what is possible.

He shares some code that's the common "first steps" for someone using the framework, but points out a better way - moving your controller handling out into separate files instead. With a built-in feature of Silex, you can specify the "path" to another class file that will handle the request and return the response back to the main app. He also suggests extracting even more of the functionality out into "service" classes to handle the processing, cleaning up the controllers even more. He finishes off the post with a brief comparison between Silex and a full Symfony2 application, noting that Silex is a bit more "free form" when it comes to structure where Symfony2 apps are pretty well defined and have their conventions.

0 comments voice your opinion now!
scaling silex microframework symfony2 controller service


blog comments powered by Disqus

Similar Posts

Hasin Hayder's Blog: expanding short url to original url using PHP and CURL

DevShed: Building a Web Page Controller for Simulating the Model-View-Controller Schema in PHP

Chris Hartjes' Blog: Tutorial: Integrating PHP/SWF Charts with CakePHP

Gonzalo Ayuso: Working with AngularJS and Silex as Resource provider

Jani Hartikainen's Blog: You donít need a service layer: Fat controllers are okay


Community Events





Don't see your event here?
Let us know!


introduction composer framework conference language laravel voicesoftheelephpant version library tool artisanfiles security opinion list series interview release symfony community podcast

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework