Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^3: Mojolicious refresh

by LanX (Saint)
on Mar 18, 2020 at 23:21 UTC ( [id://11114447]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Mojolicious refresh
in thread Mojolicious refresh

> A more advanced technique consists in a client side framework like Angular

I always thought that the benefit of Web sockets was that the action can be initiated from the server.

I don't see the big difference to the AJAX/DOM point I listed.

Or what's the advancement here?

Speed?

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^4: Mojolicious refresh
by jo37 (Deacon) on Mar 19, 2020 at 06:29 UTC

    Avoid polling. Changed content is pushed to the client. This is AJAX based anyway.

    Greetings,
    -jo

    $gryYup$d0ylprbpriprrYpkJl2xyl~rzg??P~5lp2hyl0p$

      I think it would be fantastic to see some demo code for that here.

        I was afraid somebody would ask :-)

        Some years ago I wrote such an application using AngularJS and Mojolicious::Lite. It's still running but I need to strip it down to a small demo. Maybe corona gives me the time to do that.

        Have some patience.

        Greetings,
        -jo

        $gryYup$d0ylprbpriprrYpkJl2xyl~rzg??P~5lp2hyl0p$
      > Avoid polling. Changed content is pushed to the client.

      Sure, but again:

      what for would one want this? Speed?

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery

        In my case to avoid unnecessary traffic, especially for generated images.

        I can't tell how "smooth" your approach works. The push initiated update happens almost invisible.

        Greetings,
        -jo

        $gryYup$d0ylprbpriprrYpkJl2xyl~rzg??P~5lp2hyl0p$

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11114447]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-18 05:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found