[Dancer-users] Conditional HTTP proposal

Flavio Poletti polettix at gmail.com
Sat Feb 12 10:00:21 CET 2011


On Sat, Feb 12, 2011 at 8:36 AM, Oleg A. Mamontov <oleg at mamontov.net> wrote:

>
> On Feb 12, 2011, at 8:00 AM, Flavio Poletti wrote:
>
> > 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.
>
> Key moment: Catalyst::Plugin::Static::Simple is core module of Catalyst
> distribution.


As I was said, I'm really talking about something I don't know at all, but
naming this module "::Plugin::" seems to imply that you load it only if you
need it, and you don't get this functionality as a "core" functionality
without loading it. If this applies, are we really talking about having this
plugin in the core Dancer or as a separate distribution? If this does not
apply, are we talking about cloning Catalyst?

Seeing it from another perspective, the "static file serving" functionality
in Dancer might be basic but covers the needs of many and does it in a
non-buggy and consistent way, although suboptimal. IMHO, Dancer is more and
should be more concentrated on the dynamic part, so this approach seems
perfectly reasonable.

I have probably drifted on the unconstructive side of the discussion,
anyway: although I might agree with you with the patch, I think that the
core Dancer development group and its "Architect" deserve the right to say
no, especially if they have a reason that is inspired to the principles that
steer their development.

Cheers,

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


More information about the Dancer-users mailing list