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
Inside Stream API
skrb
1
680
These Five Tricks Can Make Your Apps Greener, Cheaper, & Nicer
hollycummins
0
280
CSC307 Lecture 17
javiergs
PRO
0
320
タクシーアプリ『GO』の バックエンド開発のおける AI利活用と若者のすべて
pyama86
3
1.9k
AIとASP.NET Coreで雑Webアプリを作った話
mayuki
0
490
Spring Security 実践 ─ GraphQL APIで実務に役立つ 認証・認可 を学ぶ
wagyu
0
210
TypeScript+Orvalで実現する型安全かつ堅牢でスケーラブルなマルチチャネル通知基盤 / TSKaigi Night talks ~after conference~
d0riven
0
320
ローカルLLMを使ってB2Bサービスを作っていての学び
yaotti
0
160
AI 時代のソフトウェア設計の学び方
masuda220
PRO
29
12k
正しくソフトウェアを作る、前提を疑うための認知の視点 / doubt-premise
minodriven
20
6.4k
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
3
1.3k
Lemonade + Foundry Toolkit でお手軽アプリ開発
seosoft
1
320
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
432
67k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
770
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.9k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
160
Unsuck your backbone
ammeep
672
58k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
420
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.9k
Documentation Writing (for coders)
carmenintech
77
5.4k
Into the Great Unknown - MozCon
thekraken
41
2.6k
HDC tutorial
michielstock
2
700
For a Future-Friendly Web
brad_frost
183
10k
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