Server Side Vs Client Side

admin

Administrator
Staff member
Question: I'm thinking of changing my scripts on my website over from client side to server side. Should I do it?<br /><br />My understanding of the state of the universe (please offer an alternate understanding of the state of the universe):<br />PRO: Server side scripts work for everyone (if they work at all)<br />PRO: Server side scripts hide implementation details were client scripts do not.<br />PRO: Server side scripts look cooler. (IMOA anyway)<br />CON: Can create large server loads (assuming people actually visit) and make the site slower for everyone.<br />CON: Can cause damage to my site if I'm not careful about what I'm doing / protect them from would-be-hackers.<br />CON: My script might become a renegade script, since I don't really know what I'm doing and I'm not sure how to quash it when it does.<br />PRO/CON: My knowledge of Perl and PHP is severely lacking, I'd have to learn.<br /><br />I've seen a lot of professional webpages done solely in PHP, so I would think it wouldn't be so bad to convert over my javascripts. And I'd really rather things work for everyone. If the display is a little wonky, I can live with it, but right now there are some parts of my site that won't work if you've disabled javascript.<!--content-->
Aella, server-side and client-side scripts serve two different purposes.<br /><br />Server-side scripts, such as PHP and PERL are used to access databases and perform actions on the server, while JavaScript is usually used to manipulate the web page layout and appearence after it has been loaded from the server.<br /><br />Of course there are some common tasks that can be performed by both, like displaying a date on a page. Deciding which (server- or client-side scripts) which to use in these cases is just a matter of deciding where you want to place the load on, the server or the browser.<br /><br />So it basically depends on what you use JavaScript for. If you don't need complicated stuff, like accessing a database, opening TCP sockets to communicate with other servers, saving files on the server, etc, then you're probably fine with JavaScript. On the other hand, if you do need some of this stuff, or even if you want to learn PHP/PERL/whatever, then go for it. Knowledge is never too much <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" /><!--content-->
I like serverside for one the main reason you listed: you know that as long as they're coded correctly, they will work for everyone. Java can be turned off in browsers and therefore you really shouldn't depend on it.<br /><br />We do everything serverside with pHp. Its an easy language to learn and every bit as powerful as any other serverside solution (ASP, ColdFusion, etc.)<!--content-->
 
Back
Top