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
Silex (phpquebec)
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Igor Wiedler
July 12, 2013
Programming
6
450
Silex (phpquebec)
Igor Wiedler
July 12, 2013
Tweet
Share
More Decks by Igor Wiedler
See All by Igor Wiedler
Redis Bedtime Stories
igorw
1
320
Wide Event Analytics (LISA19)
igorw
4
930
a day in the life of a request
igorw
0
150
production: an owner's manual
igorw
0
170
The Power of 2
igorw
0
310
LISP 1.5 Programmer's Manual: A Dramatic Reading
igorw
0
450
The Moral Character of Software
igorw
1
290
interdisciplinary computing (domcode)
igorw
0
300
miniKanren (clojure berlin)
igorw
1
310
Other Decks in Programming
See All in Programming
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
200
CSC307 Lecture 09
javiergs
PRO
1
830
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
190
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
170
Apache Iceberg V3 and migration to V3
tomtanaka
0
150
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
450
CSC307 Lecture 07
javiergs
PRO
0
550
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
1.3k
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
2.4k
Implementation Patterns
denyspoltorak
0
280
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
140
AI時代の認知負荷との向き合い方
optfit
0
150
Featured
See All Featured
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
430
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.1k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
180
Music & Morning Musume
bryan
47
7.1k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Building Adaptive Systems
keathley
44
2.9k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.2k
Fireside Chat
paigeccino
41
3.8k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
160
Designing for humans not robots
tammielis
254
26k
Transcript
None
@igorwesome
Chunking
Context more abstract more concrete
Frameworks Zero
Frameworks Zero Don’t re- invent the wheel! You’re bloated and
buggy!
Frameworks Zero Conventions Libraries Wiring
Conventions Libraries Wiring Coding standard Directory layout Community
Conventions Libraries Wiring Routing ORM Templating etc.
Conventions Libraries Wiring Base config Library glue Bootstrap
Conventions Libraries Wiring Frameworks Zero
Conventions Libraries Wiring Frameworks Zero Because downloading stuff is hard!
None
Conventions Libraries Wiring
Conventions Libraries Wiring
Conventions Libraries Wiring Libraries Frameworks
Silex
Glorified Router
$app = new Silex\Application(); $app->get('/', function () { return "Hello
world!"; }); $app->run();
$app->get('/blog/{id}', 'Blog::showPost'); $app->post('/blog/{id}', 'Blog::createPost'); $app->put('/blog/{id}', function ($id) { ... })
->assert('id', '\d+');
$app->before(function () { ... }); $app->after(function () { ... });
$app->finish(function () { ... });
use Symfony\Component\HttpFoundation\Response; $app->error(function (\Exception $e, $code) { return new Response('Whoops!',
$code); });
$app->redirect('/hello'); $app->json($data); $app->sendFile($file);
Dependency Injection Container
class Application extends Pimple
$app['routes'] $app['url_matcher'] $app['kernel']
$app['routes']->add(...);
$app['debug'] = true;
$app['url_matcher'] = $app->share( function ($app) { return new MyUrlMatcher(); }
);
$app['foo'] = $app->share( function ($app) { return new Foo($app['bar']); }
);
$app['foo']
User Interface for Symfony2
http-kernel http-foundation event-dispatcher routing silex
REQ REP
None
silex app
silex app
diff -u symfony silex
--- symfony +++ silex @@ -1,3 +1 @@ -conventions -static
compilation -lots of services +choices
Glorified Router
Glorified Router Dependency Injection Container
Glorified Router Dependency Injection Container User Interface for Symfony2
Conventions Libraries Wiring Libraries Frameworks
Ω
Questions? @igorwesome silex.sensiolabs.org yolophp.com stackphp.com