News Feed
Sections




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

Gonzalo Ayuso:
Dependency Injection Containers with PHP. When Pimple is not enough.
September 03, 2012 @ 09:51:40

Gonzalo Ayuso has a new post talking about dependency injection today and proposes his own DIC solution (dependency injection container) "when Pimple is not enough".

Two months ago I wrote an article about Dependency Injection with PHP and Pimple. After the post I was speaking about it with a group of colleagues and someone threw a question: "What happens if your container grows up? Does Pimple scale well?" The answer is not so easy. Pimple is really simple and good for small projects, but it becomes a little mess when we need to scale.

His solution comes from the Symfony2 framework itself - using its DIC separately from the framework. He includes a configuration example and some simple classes that depend in each other. He also shows how to use imports in the config as well.

0 comments voice your opinion now!
pimple dic dependencyinjection tutorial symfony2


blog comments powered by Disqus

Similar Posts

PHPBuilder.com: Transferring Huge XML Documents in PHP with an Ajax-driven Web Interface

PHPWomen.org: One way to handle concurrency in a multi-user web app

Brian Swan's Blog: Performance Tuning PHP Apps on Windows/IIS with Output Caching

Jake Smith's Blog: Callback Filter Iterator in PHP 5.3/5.4

Abhinav Singh's Blog: How to use locks in PHP cron jobs to avoid cron overlaps


Community Events

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


laravel5 introduction development framework conference opinion wordpress middleware laravel library release extension language voicesoftheelephpant podcast community interview unittest series api

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