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
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
320
Avoiding the mud
richardmiller
22
11k
better searching with elasticsearch - PHPConfPL
richardmiller
2
540
better searching with elasticsearch
richardmiller
2
330
Avoiding the mud - Symfony Live London
richardmiller
7
800
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
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
3
810
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
310
作って学ぶ、 JSX (TSX) ランタイムの基本
syumai
7
1.7k
正しくソフトウェアを作る、前提を疑うための認知の視点 / doubt-premise
minodriven
21
7.2k
IBM Bobを活用したレガシーアプリの最新化
oniak3ibm
PRO
1
230
The Bowling Game- From Imperative to Functional Programming - Part 1
philipschwarz
PRO
0
180
ADKを使って簡単にAIエージェントを作ってみよう
k1mu21
0
290
Observability in Practice:Grafana 與 Edge Device SRE 的那些事
blueswen
0
180
Language Server 使ってる? 〜VSCode と Zed の場合〜 / Are you using a Language Server? ~For VS Code and Zed~
handlename
0
820
ECSアプリログをFireLensでコスト削減しようとしたけど諦めた話 in Fargate×Node.js
akihisaikeda
2
4.2k
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
3
4.7k
Oxlintのカスタムルールの現況
syumai
6
1.2k
Featured
See All Featured
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.1k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
880
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
210
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
320
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
400
My Coaching Mixtape
mlcsv
0
160
How to make the Groovebox
asonas
2
2.3k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
201
75k
Discover your Explorer Soul
emna__ayadi
2
1.2k
Documentation Writing (for coders)
carmenintech
77
5.4k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
580
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