Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: AJAX-based Perlmonks.com?

by thor (Priest)
on Dec 12, 2005 at 12:12 UTC ( #515995=note: print w/ replies, xml ) Need Help??


in reply to Re: AJAX-based Perlmonks.com?
in thread AJAX-based Perlmonks.com?

So, where exactly would you like to put AJAX support and why would it be better to what there already is? When you have that straight, we can agree or (most likely) disagree with your proposals.
I don't know about the OP, but three places where it would be apparent to me are the chatterbox, voting, and moderation. I've always thought it odd (and probably expensive) that all three actions required a full refresh of the page to do what amounts to a tiny change in the output.

thor

The only easy day was yesterday


Comment on Re^2: AJAX-based Perlmonks.com?
Re^3: AJAX-based Perlmonks.com?
by Corion (Pope) on Dec 12, 2005 at 12:16 UTC

    The chatterbox will never be Ajax-based for two reasons. First, Pair.com does not allow "chat servers" in its terms of use. The CB already is on the very border of that in my opionion. Second, the server load would multiply if every page that a browser has open on Perlmonks would reload all the time. I usually have two or three pages open, but when starting the day, I open at least all new root nodes in separate tabs - the load inflicted on Perlmonks by a constantly refreshing CB would be huge and the gain miniscule.

      The chatterbox will never be Ajax-based for two reasons. First, Pair.com does not allow "chat servers" in its terms of use. The CB already is on the very border of that in my opionion

      This is especially true of the Java based CB client.

      Second, the server load would multiply if every page that a browser has open on Perlmonks would reload all the time.

      Since JavaScript can span a user session & not only a window - there's no reason to open more than one connection per user session. However it would still be the rough equivalent of everyone running the Java client. And that certainly would increase the load. It could be throttled however to a slow refresh rate. I suppose it's all a matter of a breakeven point of performance vs. load. Clearly this isn't a big win scenario either way.

      Voting however, could certainly be implemented using AJAX. That could significantly reduce load especially on long threads, since the only data you'd be requesting back would be related to voting, rather than resending all of the content.



      Wait! This isn't a Parachute, this is a Backpack!
      Second, the server load would multiply if every page that a browser has open on Perlmonks would reload all the time.
      You're assuming that a refresh-every-n-seconds is the only way. What I was suggesting was more along the lines of only the chatterbox nodelet updating when the talk button was pressed. The chatterbox is used for more than just chat. Private messages and "you have a reply to ..." style messages are displayed here as well. It would be nice to be able to check the check boxes, hit the talk button, and not have the whole page refresh. In this style, I would venture to guess that the server load would be reduced, both from a CPU standpoint and a bandwidth standpoint. I could be wrong, though.

      thor

      The only easy day was yesterday

Re^3: AJAX-based Perlmonks.com?
by Happy-the-monk (Monsignor) on Dec 12, 2005 at 13:10 UTC

    expensive that all three actions required a full refresh of the page

    I once thought the same and wouldn't it be nice if you could click your votes, moderation and type your cb-message and hit any of the buttons to make all three actions happen? That could be made possible.

    Judging it as a programmer - I don't need that bad enough to volunteer to code it. Actually, I only very scarcely need more than one of the options at any time.

    Cheers, Sören

      I agree with this point. If you've ever been in the "Preview" or "Comment on" page, and you use the chatterbox, you arrive at a very weird page that tells you "No such parent node".

      Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
      How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart

        Actually this is one of those PITA issues of Everything that I think is probably quite hard to work around. The problem is that forms on PM are idendependent. So when you submit from the CB nodelet its a totally different form from the one that may be displayed in the "node view". I guess hypothetically we could make all pages be just one big form, but then you have all kinds of issues like walking on each others parameters and things like that.

        Simpler work arounds might be simply not showing the nodelets when viewing preview/comment on, or possibly putting special logic into the CB (and other form bearing nodelets) so that it wouldnt include a form on those pages.

        Anyway, i guess the main reason this hasn't been fixed is that it is in the annoyance category and not the showstopper category, and the work arounds arent too much better than the original problem.

        ---
        $world=~s/war/peace/g

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (9)
As of 2014-09-22 09:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (185 votes), past polls