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
450
6
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Silex (phpquebec)
Igor Wiedler
July 12, 2013
More Decks by Igor Wiedler
See All by Igor Wiedler
Redis Bedtime Stories
igorw
1
380
Wide Event Analytics (LISA19)
igorw
4
950
a day in the life of a request
igorw
0
180
production: an owner's manual
igorw
0
200
The Power of 2
igorw
0
350
LISP 1.5 Programmer's Manual: A Dramatic Reading
igorw
0
490
The Moral Character of Software
igorw
1
320
interdisciplinary computing (domcode)
igorw
0
330
miniKanren (clojure berlin)
igorw
1
340
Other Decks in Programming
See All in Programming
源内ハンズオン概要編
hideg
0
240
AWS Transform Customによる Spring Boot 2.xから4.xへのVerUp
satoshi256kbyte
2
130
AIと壁打ちしながら進めるコスト管理
fufuhu
2
1.9k
リアルな遅延を測る仕様
kota_yata
1
140
GKE アップグレード前に知っておきたい Blue/Green と PDB の関係
stkk
0
130
AIの中の人になってみる
htkym
0
150
이 함수, 실패하면 어떻게 되나요? null부터 Rich Errors까지, Kotlin 에러 처리 15년
haeti2
0
110
My Marp Sample
sinoue0108
0
140
Seeing Through Serverless: Observability for AWS Lambda with ADOT and CloudWatch Application Signals
seike460
PRO
1
110
Oxlintはいいぞ(続)
yug1224
1
530
片田舎のおっさん、 Swift Buildのダイアモンド問題解決の不具合修正PRを出すが、解決方法がキャッシュをしないようにすることであり、ビルド時間が伸びると言われてマージされないので高速化もする/swiftbuild
yimajo
0
340
「つくるAI」だけではバグは見つからない ~テストに必要な「見つけるAI」を分離させる戦略~
mfunaki
0
230
Featured
See All Featured
Done Done
chrislema
186
16k
Exploring anti-patterns in Rails
aemeredith
3
490
Evolving SEO for Evolving Search Engines
ryanjones
0
280
Technical Leadership for Architectural Decision Making
baasie
3
550
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Bash Introduction
62gerente
615
220k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.3k
Are puppies a ranking factor?
jonoalderson
2
3.9k
Claude Code のすすめ
schroneko
67
230k
Building Adaptive Systems
keathley
44
3.2k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.6k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
390
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