Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

JavaScript (and consequently AJAX) is a tool that can either be used to enhance a website, or abused to crud it up. As Perl culture, I think it we have a history of being open to all the tools at our disposal. Those dismissing AJAX out of hand because it's a 'fad' or requires JavaScript IMO are short sighted.

As to whether pm could use a little AJAX, I have no opinion, but the areas you suggested for enhancement don't strike me as providing any solid benefit. Server load is made up of more than just data retrieval and page creation. There's also session management and data verification which must occur regardless of how many bytes are returned.

Voting for example, still needs to verify the user session, and validate the node being voted on and retrieve the new vote count. This could add up to nearly the equivalent server load of the existing method or rendering the entire site view. Then you'd have to make additional AJAX calls to update all the other bits that come with the entire site view (cb, messages, xp). So now you've split one request, with one overhead, into several requests, each adding their own overhead. Now factor in that you can vote for several nodes in a single request without AJAX, but you have to make a new request for each vote with AJAX and you've multiplied the server load many times over yet again.

The most obvious reason to use AJAX is to enhance the user experience with a seamless 'non-refreshing' website and I think this should be the fundamental point. Arguing for AJAX based on sever load is a red herring IMO.


In reply to Re: AJAX to reduce server load by ruzam
in thread AJAX to reduce server load by bellaire

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2024-04-19 21:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found