Re: server side vs client side

From: Ken Irwin <kirwin_at_nyob>
Date: Thu, 1 Dec 2011 13:30:15 -0500
To: CODE4LIB_at_LISTSERV.ND.EDU
My general approach is "server-side first". Unless it's wildly easier to accomplish something client-side, then I think it makes sense to go for the consistency of server-side processing. 

So taking a text file, doing some processing, and spitting out what should behave for the user as if it's a static HTML document, server-side PHP/Perl/DrugOfChoice sounds like the way to go. 

Save client-side processing for the things it does much better than the server-side alternative; mostly, I think that means use JavaScript for browser-interactivity stuff that's easier to do in the browser. 

Ken

-----Original Message-----
From: Code for Libraries [mailto:CODE4LIB_at_LISTSERV.ND.EDU] On Behalf Of Nate Hill
Sent: Thursday, December 01, 2011 12:49 PM
To: CODE4LIB_at_LISTSERV.ND.EDU
Subject: [CODE4LIB] server side vs client side

As I was struggling with the syntax trying to figure out how to use javascript to load a .txt file, process it and then spit out some html on a web page, I suddenly found myself asking why I was trying to do it with javascript rather than PHP.

Is there a right/wrong or better/worse approach for doing something like that? Why would I want to choose one approach rather then the other?

As always, apologies if I'm asking a terribly basic question.

--
Nate Hill
nathanielhill_at_gmail.com
http://www.natehill.net
Received on Thu Dec 01 2011 - 13:32:20 EST