title: severside processing vs client side processing + ajax?
body: <p>looking for some general advice and/or thoughts... </p>
  
  <p>i'm creating what i think to be more of a web application then web page, because i intend it to be like a gmail app where you would leave the page open all day long while getting updates "pushed" to the page (for the interested i'm using the comet programming technique).  i've never created a web page before that was so rich in ajax and javascript (i am now a huge fan of jquery).  because of this, time and time again when i'm implementing a new feature that requires a dynamic change in the UI that the server needs to know about, i am faced with the same question:</p>
  
  <p>1) should i do all the processing on the client in javascript and post back as little as possible via ajax
  or
  2) should i post a request to the server via ajax, have the server do all the processing and then send back the new html.  then on the ajax response i do a simple assignment with the new HTML</p>
  
  <p>i have been inclined to always follow #1.  this web app i imagine may get pretty chatty with all the ajax requests.  my thought is minimize as much as possible the size of the requests and responses, and rely on the continuously improving javascript engines to do as much of the processing and UI updates as possible.  i've discovered with jquery i can do so much on the client side that i wouldn't have been able to do very easily before. my javascript code is actually much bigger and more complex than my serverside code. there are also simple calulcations i need to perform and i've pushed that on the client side, too. </p>
  
  <p>i guess the main question i have is, should we ALWAYS strive for client side processing over server side processing whenever possible?  i 've always felt the less the server has to handle the better for scalability/performance.  let the power of the client's processor do all the hard work (if possible).</p>
  
  <p>thoughts?  </p>