Ajax Talk - Asynchronous javascript and xml discussion board
 FAQ   Search    Usergroups      Register   Profile   Check your messages   Log in 
Signup now to enjoy a range of free membership advantages !!
Ajax Talk - Moderators Wanted
Which side should do the majority of the work?

 
Post new topic   Reply to topic    Ajaxtalk.com Forum Index -> AJAX general discussion
View previous topic :: View next topic  
Author Message
php_penguin
New one
New one


Joined: 25 Jun 2007
Posts: 4
Location: Wales, UK

PostPosted: Tue Jun 26, 2007 10:18 pm    Post subject: Which side should do the majority of the work? Reply with quote

When making an application, should the backend (PHP/ASP/Java) do the work, or is it best to leave it to the Javascript?

For example, you could have the PHP do all the stuff to it and return raw HTML, or you could just chuck the data at the Js and do it all with that.

Which is generally quicker, both in terms of developement time, and user loading times? Also, does transfer / parsing lag play a part?
Back to top
View user's profile Send private message MSN Messenger
evan_carothers
Light Frequent Poster
Light Frequent Poster


Joined: 11 Oct 2007
Posts: 9
Location: River Falls, WI

PostPosted: Thu Oct 11, 2007 9:11 pm    Post subject: Reply with quote

In web apps, the workload should be spread out. But you have to take a lot of different things into consideration. For things like form validation, nifty ajax/javascript validation is cool and works great, but all data should still be validated server-side for security reasons. You have to take useability into account also. Some (hopefully not many these days) people could possibly have javascript turned off. One advantage to doing the majority of processing server side is that you can manipulate the data for record/logging purposes also. It depends on the complexity of the data your are processing also. If you're doing a lot of string processing, the speed performance gains of using things like regular expressions server-side can help a ton too. But using data processing server-side that you know will work every time is preferable to trying to use a client-side method that could act differently between 5 different browser types.

This isn't a very organized reply, but I hope it helps Smile
Back to top
View user's profile Send private message Send e-mail
Jesdisciple
Frequent Poster
Frequent Poster


Joined: 20 Oct 2007
Posts: 36
Location: Tejas

PostPosted: Sun Oct 21, 2007 8:16 pm    Post subject: Reply with quote

evan_carothers wrote:
If you're doing a lot of string processing, the speed performance gains of using things like regular expressions server-side can help a ton too.
Just a bit of clarification for anyone who needs it: This sentence makes it sound like JavaScript doesn't have regular expressions, which is false; however, JavaScript isn't completely reliable, as noted.
_________________
In ALL things, strive for ><>,
Chris
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Ajaxtalk.com Forum Index -> AJAX general discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
 Advertisements
 XML & Copyright Notice 
    


Powered by phpBB © 2001, 2005 phpBB Group

What is according to Wikipedia: Ajax Web2.0 XML E4X


Link to our site:

  


del.icio.us digg spurl wists simpy newsvine blinklist furl blogmarks yahoo! myweb smarking ma.gnolia segnalo reddit fark technorati cosmos


Normal Bookmark


Partner Button Links:
Codecrunch.com: Webmaster Tutorials    One Ajax


Partner Text Links:
quomon | web20log | ajaxmatters | tableless | 456bereastreet | music charts | gift ideas | competitions | free xbox 360 | link trade ?


Credits:
it consultancy & project management lead generation zoekmachine optimalisatie steal these buttons seo expert