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
Untitled No. 12
Search
Stevan Little
January 16, 2010
Programming
1
180
Untitled No. 12
I gave this talk at the Orlando Perl Workshop in 2010
Stevan Little
January 16, 2010
Tweet
Share
More Decks by Stevan Little
See All by Stevan Little
Perl's not dead, .. it got better!
stevan_little
1
680
Perl's Syntactic Legacy
stevan_little
0
1.1k
Installation & Configuration of Modern Perl
stevan_little
2
590
Moe Status Update
stevan_little
1
1.3k
Perl - The Detroit of Scripting Languages
stevan_little
14
13k
Perl is not Dead, it is a Dead End
stevan_little
38
45k
Perl 5 MOP
stevan_little
9
1.9k
REST from the trenches
stevan_little
6
1.4k
DC-Baltimore Perl Workshop - Keynote
stevan_little
4
790
Other Decks in Programming
See All in Programming
DMMオンラインサロンアプリのSwift化
hayatan
0
190
責務を分離するための例外設計 - PHPカンファレンス 2024
kajitack
9
2.4k
Flatt Security XSS Challenge 解答・解説
flatt_security
0
740
chibiccをCILに移植した結果 (NGK2025S版)
kekyo
PRO
0
130
ChatGPT とつくる PHP で OS 実装
memory1994
PRO
3
190
Асинхронность неизбежна: как мы проектировали сервис уведомлений
lamodatech
0
1.4k
「とりあえず動く」コードはよい、「読みやすい」コードはもっとよい / Code that 'just works' is good, but code that is 'readable' is even better.
mkmk884
6
1.4k
AHC041解説
terryu16
0
400
shadcn/uiを使ってReactでの開発を加速させよう!
lef237
0
300
traP の部内 ISUCON とそれを支えるポータル / PISCON Portal
ikura_hamu
0
180
BEエンジニアがFEの業務をできるようになるまでにやったこと
yoshida_ryushin
0
200
Внедряем бюджетирование, или Как сделать хорошо?
lamodatech
0
940
Featured
See All Featured
Java REST API Framework Comparison - PWX 2021
mraible
28
8.3k
Rails Girls Zürich Keynote
gr2m
94
13k
StorybookのUI Testing Handbookを読んだ
zakiyama
28
5.4k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
49
2.2k
Optimizing for Happiness
mojombo
376
70k
Fireside Chat
paigeccino
34
3.1k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
113
50k
Speed Design
sergeychernyshev
25
740
Optimising Largest Contentful Paint
csswizardry
33
3k
Visualization
eitanlees
146
15k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Transcript
hello
Welcome to my talk, here are some of the modules
I will be talking about
Bread::Board is a Dependency Injection framework, available on CPAN
Plack is Web Infastructure-ware written by miyagawa
Plack::Middleware is the killer app of Plack
Path::Router is a module available on CPAN
... and of course Moose
But first let me toast Open Source, for all the
collaboration and sharing of ideas that make it so much fun to participate in.
There is vast knowledge and great ideas to be found
out there, both in the ivory towers of CompSci departments and in other Open Source communities, it is time to rediscover some ...
This is a great book with a lot of Lambda
Calculus in it and the Y-Combinator is awesome, this kind of elegance and simplicity is not useful, but should be inspiring
Smalltalk is a great system from which too steal from,
Steve Jobs did it in the 80s, Ruby did it in the 90s and Moose did it in the 00s
Haskell is mind-bendingly insane and strikingly beautiful at the same
time
LISP is a wonderful language used by many really smart
people, we can learn from them too
Moose borrows shamelessly from all these technologies and more and
brings them to Perl
Miyagawa has been mining the knowledge of other Open Source
communities to bring us Plack and the next generation of Perl web tools
Now I would like to show you my latest experiment,
bringing together the modules I mentioned earlier.
The goal is simplicity and avoiding needless framework boilerplate or
useless subclassing
Here is an example of a simple counting program, over-engineered
to illustrate how the pieces of an OX::Application fit together
This is the core of the Bread::Board config, notice the
circular dependency between View/Nib and Controller/Root, Bread::Board takes care of this.
This is the routing spec, it defines the available URLs
for the application and will automatically wire them to the controller dependencies
Here is the model, very simple plain old Moose class
Here is the controller, also a simple plain old Moose
class
This is an experiment in making TT work in a
way that is conceptually similar to Cocoa (the Mac OS X framework)
This is our .psgi file, it is so simple and
clean :)
This is our .psgi file evolved to take advantage of
some Plack::Middleware
Web apps should be easily testable too, here we fetch
Bread::Board services to test.
Here we use the Test::Path::Router to check the URLs our
web application will respond too
Here we use Plack::Test to test our web application
Holy crap, look at all the plugs in that outlet!