That sort of swappable implementation would fit right in with the swappable
JavaScript framework for sure!

I saw some discussion related to whether Prototype support should be
dropped as a default as per Howard's past wishes on the dev boards. It made
me think that perhaps the different js frameworks should instead be
separate Maven modules - a skeleton module (perhaps in quickstart form)
could be revealed so people can add their own. If no module is added then
there's simply no baked-in javascript support - any core components/mixins
just noop or act in a completely js-free way.

Similarly - the core and generic bits and pieces required to support
features surrounding push could be built in and pluggable implementations
of atmosphere, socksjs, cometd etc. could be developed separately. If none
are present then things just noop or fail to work (as intentional).

I know this all increases the scope of the current thread - it may be worth
taking into a separate chat - but it would be awesome to see SASS support -
the overriding of core styles has always been a bit mucky - the baked-in
bootstrap version is old. And if Tapestry is framework-agnostic when it
comes to JS then why should it not also be so for Bootstrap?

Returning to the topic at hand - having looked at Lance's approach again -
I especially find tapestry-atmosphere to be very easy to digest - the
examples are enough to get going with it and as you say yourself, Lance, it
does feel very 'Tapestryesque'. Will definitely dig into this as soon as
time allows!

Kind regards,
Peter

On 27 October 2016 at 10:32, Lance Java <lance.j...@googlemail.com> wrote:

> I'd love to see tapestry support websockets out of the box, perhaps with a
> swappable implementation (atmosphere, socksjs, cometd etc)
>
> I've tried to uphold the "tapestry philosophy" in both implementations
> using event-handlers, blocks and zones (they're actually a pushTarget
> rather than a zone). If Tapestry were to support websockets out of the box
> I'd argue it should implement a similar approach.
>
> On 27 Oct 2016 7:40 a.m., "Peter Hvass" <peter.hv...@jamesinnes.com>
> wrote:
>
> > I've been meaning to have a go with Lance's tapestry-atmosphere - seems
> > very straightforward especially for teams with little time to roll their
> > own!
> >
> > Kalle + Cezary - (if feasible - licenses, projects etc.) would it not be
> > worth all of us jumping on Lance's library (for plugging in Atmosphere)
> and
> > possibly submitting patches/fixes so we have one bulletproof and
> > fully-featured Tapestrified approach to this?
> >
> > Is there an argument that this sort of push-related functionality should
> be
> > built into Tapestry directly for a future version? Push and notifications
> > are two headline features for an ever mobile-friendly web..
> >
> > Thanks,
> > Peter
> > On 27 October 2016 at 01:35, Kalle Korhonen <kalle.o.korho...@gmail.com>
> > wrote:
> >
> > > It's relatively simple like Cezary says. The only potential issue is
> with
> > > authenticating JSR 356 websockets, which may require a bit of
> gymnastics
> > > depending on your needs. If you are using sessions, you can fetch
> > > underlying (servlet) session from the handshake request (see
> > > http://stackoverflow.com/questions/21888425/accessing-
> > servletcontext-and-
> > > httpsession-in-onmessage-of-a-jsr-356-serverendpo/27057359).
> > > If you are using sessionless authentication (w/ JWT), you can pass the
> > > bearer token around in the sub-protocol header,
> > > namely Sec-WebSocket-Protocol (see
> > > http://stackoverflow.com/questions/22383089/is-it-
> > possible-to-use-bearer-
> > > authentication-for-websocket-upgrade-requests/35108078
> > > ).
> > >
> > > Kalle
> > >
> > > On Wed, Oct 26, 2016 at 2:27 PM, Lance Java <lance.j...@googlemail.com
> >
> > > wrote:
> > >
> > > > There's a chat demo in both tapestry-atmosphere and tapestry-cometd
> > > >
> > > > Atmosphere
> > > > Demo: http://t5atmosphere-lazan.rhcloud.com/
> > > > Source:
> > > > https://github.com/uklance/tapestry-atmosphere/tree/
> > > > master/tapestry-atmosphere-demo
> > > >
> > > > Cometd
> > > > Demo: http://t5cometd-lazan.rhcloud.com/chat
> > > > Source:
> > > > https://github.com/uklance/tapestry-cometd/tree/master/
> > > > tapestry-cometd-demo
> > > >
> > > > On 26 Oct 2016 7:16 p.m., "Qbyte Consulting" <
> > qbyteconsult...@gmail.com>
> > > > wrote:
> > > >
> > > > > I want to develop a tapestry chat component that uses a WebSocket
> to
> > > > handle
> > > > > real time text messages. I need to integrate so that users can see
> > who
> > > is
> > > > > logged in to the Tapestry app.
> > > > >
> > > > > How would I make a class in a Tapestry app a WS endoint that can
> also
> > > > > access my apps Tapestry services as well as handle the WS client?
> > > > >
> > > > > John
> > > > >
> > > >
> > >
> >
>

Reply via email to