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
Technical Debt: Understanding it Rightly, Engaging it Rightly #LaravelLiveJP
shogogg
0
210
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
13
3.6k
AI時代の仕事技芸論 — ソフトウェア開発で「遊ぶように働く」職人的熟達のすすめ
kuranuki
1
650
LLM Plugin for Node-REDの利用方法と開発について
404background
0
170
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
560
Observability in Practice:Grafana 與 Edge Device SRE 的那些事
blueswen
0
150
Oxcを導入して開発体験が向上した話
yug1224
4
300
並列実装の現場、2ヶ月間実務でAIを使い倒したAIもPCも私も限界が近い
ming_ayami
0
120
Webフレームワークの ベンチマークについて
yusukebe
0
160
Javaの型とAI時代に型が大事な理由 / java types and type in AI era
kishida
2
120
3Dシーンの圧縮
fadis
1
690
Modding RubyKaigi for Myself
yui_knk
0
910
Featured
See All Featured
What's in a price? How to price your products and services
michaelherold
247
13k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1.1k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Balancing Empowerment & Direction
lara
6
1.2k
RailsConf 2023
tenderlove
30
1.5k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
1.1k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
390
Unsuck your backbone
ammeep
672
58k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.6k
YesSQL, Process and Tooling at Scale
rocio
174
15k
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