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
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
300
Wide Event Analytics (LISA19)
igorw
4
920
a day in the life of a request
igorw
0
130
production: an owner's manual
igorw
0
160
The Power of 2
igorw
0
290
LISP 1.5 Programmer's Manual: A Dramatic Reading
igorw
0
410
The Moral Character of Software
igorw
1
270
interdisciplinary computing (domcode)
igorw
0
280
miniKanren (clojure berlin)
igorw
1
290
Other Decks in Programming
See All in Programming
ぬるぬる動かせ! Riveでアニメーション実装🐾
kno3a87
1
110
AIでLINEスタンプを作ってみた
eycjur
1
220
もうちょっといいRubyプロファイラを作りたい (2025)
osyoyu
0
240
パッケージ設計の黒魔術/Kyoto.go#63
lufia
3
420
Langfuseと歩む生成AI活用推進
licux
3
330
複雑なドメインに挑む.pdf
yukisakai1225
5
970
250830 IaCの選定~AWS SAMのLambdaをECSに乗り換えたときの備忘録~
east_takumi
0
370
Zendeskのチケットを Amazon Bedrockで 解析した
ryokosuge
3
270
MCPで実現するAIエージェント駆動のNext.jsアプリデバッグ手法
nyatinte
7
1k
The state patternの実践 個人開発で培ったpractice集
miyanokomiya
0
160
さようなら Date。 ようこそTemporal! 3年間先行利用して得られた知見の共有
8beeeaaat
2
1.3k
AIレビュアーをスケールさせるには / Scaling AI Reviewers
technuma
2
240
Featured
See All Featured
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Writing Fast Ruby
sferik
628
62k
Designing for humans not robots
tammielis
253
25k
Bash Introduction
62gerente
615
210k
Docker and Python
trallard
45
3.5k
We Have a Design System, Now What?
morganepeng
53
7.8k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3.1k
Become a Pro
speakerdeck
PRO
29
5.5k
Imperfection Machines: The Place of Print at Facebook
scottboms
268
13k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
The Pragmatic Product Professional
lauravandoore
36
6.8k
The Language of Interfaces
destraynor
161
25k
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