Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

client_id fixups and example cleanups #7

merged 10 commits into from Apr 16, 2012


None yet
3 participants

alexmv commented Apr 7, 2012

These commits first clean up the client_id abstraction into a concept which is handled only by hippie.pipe.js / Web::Hippie::Pipe, and make the javascript interface a little more usable by making use of named parameters (back-compat is maintined).

alexmv added some commits Apr 7, 2012

Switch to hash initializers for Hippie and Hippie.Pipe
Particularly with a large number of options, some of which are optional,
providing a hash-based constructor make the code much more
Remove client_id from Web::Hippie, leaving it in Web::Hippie::Pipe
On the first request from a client, Web::Hippie stored a different value
in $client_id, and $env->{'hippie.handle'}->id, than was ultimately sent
back to the client by Web::Hippie::Pipe.  As Web::Hippie::Handle::MXHR
and ::WebSocket do not in any way use the 'id' they contain, simply
remove it.  This leaves all client_id handling contained within
Move client_id from hippie.js to hippie.pipe.js
Similarly to the previous commit, centralize all handling of client_id,
and the 'hippie.pipe.set_client_id' message, in hippie.pipe.js.  This
removes some repeated code, and preserves better separation of concerns.
Make title and footer consistent between index and chat pages
Also, as Twiggy.pm might not have been loaded (Plack::Handler::Twiggy is
loaded instead), this prevents undef warnings.
Remove JS which enforces websocket support
hippie supports websockets, mxhr, and long poll; as such, lack of
websockets is explicitly _not_ a showstopper.

@clkao clkao merged commit 750d8d6 into clkao:master Apr 16, 2012

c9s commented Jul 23, 2012

oops, I forgot the Backlog Trait.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment