[Dancer-users] Conditional HTTP proposal

Flavio Poletti polettix at gmail.com
Sat Feb 12 06:00:19 CET 2011


On Fri, Feb 11, 2011 at 10:57 PM, Oleg A. Mamontov <oleg at mamontov.net>wrote:

>
> We can delegate serve static files to Plack or anything other.
> No problem, but it would be good to document this recommendation in manual
> and remove this code from Dancer core.
> But if Dancer offers its own built-in functionality, it seems to me
> that we need to do it with maximum quality. Isn't it?
> Poorly made functionality worse than missing functionality because it
> creates ambiguity.
>

This strategy seems a bit too aggressive. I don't think the functionality is
poorly made, it just
is a basic one and lacks some more advanced feature. If you want the
advanced features,
you can hop to more sophisticated solutions. This is how I see it.

I can agree in documenting it, but keep in mind that Dancer is a young
project!



> BTW, see source code for Catalyst::Plugin::Static::Simple in _serve_static
> method.
> There is no conditional get but there is:
>    $c->res->headers->last_modified( $stat->mtime );
> What do you think, why is it done?
> Without this header many browsers will re-request all your static files
> when
> you navigate on your site with mouse clicks (no force page refresh).
> Just one simple header (Last-Modified) and you skip a lot of requests!
>

So maybe you agree with Alexis here: I don't know anything about Catalyst
and its architecture, but
the functionality you're talking about is in a "::Plugin::" module, which
seems to point in
the same direction.



> I did not expect that such simple and obvious things can generate as much
> debates :(
>

I see the debate as a winning point, because it is productive and not
destructive. So far, I see
the potential for a Plack middleware, a change to the API to add some hook
and a related plugin,
and some more documentation to make it all clearer. Just try to consider
this thing a bit less
obvious ;-)

Cheers,

    Flavio.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.backup-manager.org/pipermail/dancer-users/attachments/20110212/497118ae/attachment.htm>


More information about the Dancer-users mailing list