Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Advanced Service Container Utilization
Search
Richard Miller
June 11, 2012
Programming
1.3k
4
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Advanced Service Container Utilization
Richard Miller
June 11, 2012
More Decks by Richard Miller
See All by Richard Miller
Introduction to Symfony2 - DrupalCamp London 2014
richardmiller
0
330
Avoiding the mud
richardmiller
22
12k
better searching with elasticsearch - PHPConfPL
richardmiller
2
550
better searching with elasticsearch
richardmiller
2
330
Avoiding the mud - Symfony Live London
richardmiller
7
810
What do I get from the full stack framework?
richardmiller
1
1.7k
Dependency Injection and the Symfony2 Service Container
richardmiller
9
13k
Other Decks in Programming
See All in Programming
マイコン向けの軽量Ruby「PicoRuby」で各種デバイスを制御するネイティブアプリの実現手法
bash0c7
0
400
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
7.2k
Claude Codeを組織的に動かして月400PRを実現した話
happy_ryo
0
280
スマートフォンでモールス信号を送受信する 〜スマートフォンのLEDとカメラで作る光通信の設計と実装〜
atsuki_seo
0
120
Vue Fes Japan 2026 タイムテーブル徹底解説
448jp
0
170
Are APIs Still Relevant in the AI Era?
soyuka
0
230
[GoCon2026] When Goroutines Are Not Enough: Runtime Locality in High-Throughput Go
takehaya
6
2.2k
技術的負債の返済は、AI時代の複利で効く投資 — 経営としての意思決定とその遂行
curekoshimizu
0
1.3k
WebRTC映像をAirPlayに対応させる挑戦.pdf
monolithic_adam
0
270
thread_parallel_with_free-threaded_Python_and_NumPy.pdf
riku_sakamoto
0
330
モジュールの視点からSwiftを読み解く #iosdc
s_shimotori
0
170
Java 27新機能 / Java 27 new features
kishida
2
140
Featured
See All Featured
Statistics for Hackers
jakevdp
799
230k
Paper Plane (Part 1)
katiecoart
PRO
2
11k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.8k
Abbi's Birthday
coloredviolet
4
10k
Unsuck your backbone
ammeep
672
58k
The Cost Of JavaScript in 2023
addyosmani
55
10k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.6k
Why Our Code Smells
bkeepers
PRO
340
58k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
690
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
540
Building AI with AI
inesmontani
PRO
1
1.2k
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