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
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
310
Avoiding the mud
richardmiller
22
11k
better searching with elasticsearch - PHPConfPL
richardmiller
2
530
better searching with elasticsearch
richardmiller
2
310
Avoiding the mud - Symfony Live London
richardmiller
7
790
What do I get from the full stack framework?
richardmiller
1
1.6k
Dependency Injection and the Symfony2 Service Container
richardmiller
9
13k
Other Decks in Programming
See All in Programming
Claude Code × Gemini × Ebitengine ゲーム制作素人WebエンジニアがGoでゲームを作った話
webzawa
0
150
AIを導入する前にやるべきこと
negima
2
110
SREに優しいTerraform構成 modulesとstateの組み方
hiyanger
2
150
運転動画を検索可能にする〜Cosmos-Embed1とDatabricks Vector Searchで〜/cosmos-embed1-databricks-vector-search
studio_graph
0
410
クラウドネイティブなエンジニアに向ける Raycastの魅力と実際の活用事例
nealle
2
220
Liberating Ruby's Parser from Lexer Hacks
ydah
2
1.9k
Kingdom of the Machine
yui_knk
2
770
Back to the roots of date
jinroq
0
320
ついに来た!本格的なマルチクラウド時代の Google Cloud
maroon1st
0
220
AI時代のエンジニアリングの原則 / Engineering Principles in the AI Era
haru860
0
580
セグメントとターゲットを意識するプロポーザルの書き方 〜採択の鍵は、誰に刺すかを見極めるマーケティング戦略にある〜
m3m0r7
PRO
0
570
検索設計から 推論設計への重心移動と Recall-First Retrieval
po3rin
3
950
Featured
See All Featured
ラッコキーワード サービス紹介資料
rakko
1
3.1M
Navigating Weather and Climate Data
rabernat
0
170
Visualization
eitanlees
150
17k
Building an army of robots
kneath
306
46k
The agentic SEO stack - context over prompts
schlessera
0
760
The Curious Case for Waylosing
cassininazir
0
310
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.2k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
65
55k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.5k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
69
39k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
220
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
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