Slides for the talk web-simple at ipw-2012
-
Web::Simple
-
Not really
about the
module
-
More about
how it makes
me think
-
More about
how it makes
me design
-
Web::Simple
-
sub dispatch_request {
my $self = shift;
sub (GET + /) {
$self->render('frontpage');
}
}
-
sub (/users/...) {
sub (*) {
return unless my $user = $self->users->get($_[1]);
sub (/edit) {
sub (POST) {
<process form>
},
sub () {
<render edit screen>
}
}
sub (/) { <render view screen> }
},
-
Dispatchers
returning
dispatchers
-
sub (/users/...) {
$self->dispatch_users
}
-
Dispatchers
can come from
anywhere
-
More
importantly
-
Dispatchers
aren't
important
-
Objects
Collections
-
App::EzPz
-
ezmlm list
moderation
-
Built from
the backend
forwards
-
CODE
-
Authentication
-
We make too
big a deal
out of it
-
Just a guard
condition
-
CODE
-
-
Web::Simple
-
IPW
2009
-
Antiquated
Perl
-
CORE::glob
overload::constant
prototype()
-
Turns out the
prototype thing
works well
-
-
App::SCS
-
Simple
Content
Server
-
Everything
is a plugin
-
No core
dispatchers
-
CODE
-
Separate
rendering
-
$app->run_test_request($url)
-
Can re-use
for static
generation
-
CODE
-
Functional
wrappers
-
Middleware
at the app
level
-
Middleware
at the
rendering
level?
-
Multi stage
pluggable
rendering
-
CODE
-
Not sure
what my
point is
-
Function
composition
is good
-
Don't think
too much
about the
web part
-
Think about
your application
-
Think about
your objects
-
Design the
backend right
-
... and the
rest will
just flow
-
Hopefully
that made
some sense
-
Questions?
-
Thank You
IRC:mst
mst@shadowcat.co.uk
@shadowcat_mst