Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Advanced Service Container Utilization
Search
Richard Miller
June 11, 2012
Programming
4
1.1k
Advanced Service Container Utilization
Richard Miller
June 11, 2012
Tweet
Share
More Decks by Richard Miller
See All by Richard Miller
Introduction to Symfony2 - DrupalCamp London 2014
richardmiller
0
210
Avoiding the mud
richardmiller
22
11k
better searching with elasticsearch - PHPConfPL
richardmiller
2
490
better searching with elasticsearch
richardmiller
2
260
Avoiding the mud - Symfony Live London
richardmiller
7
730
What do I get from the full stack framework?
richardmiller
1
1.4k
Dependency Injection and the Symfony2 Service Container
richardmiller
9
13k
Other Decks in Programming
See All in Programming
CSC307 Lecture 09
javiergs
PRO
1
500
Terraformテスト入門
msato
0
520
コード生成を伴うLLMエージェント - 2024.07.18 Tokyo AI
smiyawaki0820
11
4.1k
DDDを志して3年経ったら「DDDの皮を被ったクリーンアーキテクチャ」になった話【デブサミ2024夏】
texmeijin
1
620
「2024年版 Kotlin サーバーサイドプログラミング実践開発」の補講 〜O/Rマッパー編〜
n_takehata
2
260
AWSでゲームサーバーを運用! Amazon GameLiftのお話
iriikeita
0
200
Modern Angular: Renovation for Your Applications
manfredsteyer
PRO
0
140
Namespace on read
tagomoris
2
370
From Spring Boot 2 to Spring Boot 3 with Java 22 and Jakarta EE
ivargrimstad
0
1.9k
Jetpack for KMP
fornewid
1
290
最近追加した型の紹介とその振り返り
aki19035vc
0
170
【Go言語】ジェネリクス
tomo1227
0
170
Featured
See All Featured
Building Applications with DynamoDB
mza
89
5.8k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
18
1.2k
Fashionably flexible responsive web design (full day workshop)
malarkey
399
65k
The Power of CSS Pseudo Elements
geoffreycrofte
64
5.2k
A Philosophy of Restraint
colly
200
16k
How STYLIGHT went responsive
nonsquared
93
5k
Embracing the Ebb and Flow
colly
81
4.3k
Typedesign – Prime Four
hannesfritz
37
2.2k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
A designer walks into a library…
pauljervisheath
201
24k
Build your cross-platform service in a week with App Engine
jlugia
227
17k
Docker and Python
trallard
37
2.9k
Transcript
Advanced Service Container Utilization by Richard Miller (@mr_r_miller)
None
None
Getting the most from the Symfony2 service container
Knowing the injection options open to you
You may get to inject into the constructor
You might get to Inject into setter methods
You may have to inject into properties
You can integrate objects created by factories
You may need to integrate a static factory method
You can configure the container to use the factory method
You may be dealing with a separate factory object
You can also accommodate this with container configuration
Saving time by reducing the amount of configuration you have
to write
The wrong way with interface injection
What is interface injection?
How is interface injection configured?
Why you can't use it
The right way with parent services
You can have parent classes to reduce code repetition
You can also have a parent service to reduce repetitive
configuration
You can change configuration independently from code
Understanding the service container compilation process
You need to call compile if using the component outside
the framework
You get to load complex config from extensions
Using compiler passes to respond to other configuration
What if you want to use services from other bundles?
You need to dynamically register the tagged services
You can register compiler passes from bundles in the framework
Dumping the compiled container for performance
You get the performance benefits by caching the dumped container
You get convenience as well by avoiding the cache in
debug mode
Getting the most from the Symfony2 service container
Questions? @mr_r_miller richardmiller.co.uk