[Dancer-users] My dancer app

Alex Knowles alexk at moonfruit.com
Thu Mar 10 17:20:18 CET 2011


On Thu, 2011-03-10 at 15:43 +0000, Tobias wrote:
> On Wed, Mar 9, 2011 at 9:48 AM, Alex Knowles <alexk at moonfruit.com>
> wrote:
>         
>         I'll write a post on blogs.perl.org at some point soon, and
>         send the
>         link out, but in the meantime :)
>         
> 
> 
> Your detailed information was much appreciated, Alex. Thanks for
> sharing it!

oh it's no problem at all.  

One thing I've been thinking about was that due to the speed at which we
had to get this site out (backend dev only started in earnest 3 weeks
ago).  There are all sorts of awesome dancer features that we don't use,
and really should.

Over the next few weeks we'll be going through and seeing where we can
Dance a bit harder :)

One really nice thing about it, which I touched on in the post, was the
idea of "asynchronous development".  Getting a really simple dancer app
up which did something like this:

get '/:template/:data' => sub {
   my $data=Loadfile params->{data};
   template params->{template}, $data
};

get '/api/:data.:format' => sub {
   return Loadfile params->{data};
};

meant the frontend guys could write a json file with mock data and drop
templates and build the whole site with that, including fake api calls.

And in fact they went off and started extending the mock api calls
themselves with stuff like

post '/login.:format' => sub {
   if(params->{user} eq "blah"){
     return $some_fake_details;
   } 
   return {}
};

all in all awesome.

a



> --Tobias 




More information about the Dancer-users mailing list