pouncer Posted May 3, 2007 Share Posted May 3, 2007 I was not sure where to post this. Anyway, I'm undergoing some revision for my Summer exams and have a few issues. What I'm looking for is 3 situations: 1) Where would you use only client side programming and why? 2) Where would you use only server side programming and why? 3) Where would you use both and why? any ideas guys? Quote Link to comment https://forums.phpfreaks.com/topic/49858-clientserver-sscripting/ Share on other sites More sharing options...
cmgmyr Posted May 3, 2007 Share Posted May 3, 2007 1. brochure (static) type site - it doesn't matter if people see the source code...it doesn't have anything "valuable" in it 2. dynamic/secure sites - server side scripts don't allow you to see the source of the actual code...only the output, plus server side is a lot more flexible 3. a simple site with a few dynamic elements. like an informational site with a news section. - All of their main sections stay the same but the client just wants to change one page. is this what you were looking for? Quote Link to comment https://forums.phpfreaks.com/topic/49858-clientserver-sscripting/#findComment-244590 Share on other sites More sharing options...
pouncer Posted May 3, 2007 Author Share Posted May 3, 2007 Thanks for the reply mate. So if I want 'static' pages - stuff that never changes, this should be done on client side scripting.. but downside, client side scripting is browser dependant and source code insecure? and for point 2, im still a bit confused. A situation where server side scripting is used, but not client side scripting. Possibly something like a web forum or something? made in only PHP? Quote Link to comment https://forums.phpfreaks.com/topic/49858-clientserver-sscripting/#findComment-244600 Share on other sites More sharing options...
cmgmyr Posted May 3, 2007 Share Posted May 3, 2007 let me see if I can iron this out... if you view source on an html page you will see <html><body> and so on... in a server side script the ACTUAL code would be say include "header.php"; and header.php would be <html><body> and so on... SO when someone views a source of a php page they see <html><body> and so on... and NOT include "header.php"; hope that makes sense. Quote Link to comment https://forums.phpfreaks.com/topic/49858-clientserver-sscripting/#findComment-244626 Share on other sites More sharing options...
pouncer Posted May 3, 2007 Author Share Posted May 3, 2007 Yep, thanks bud. Quote Link to comment https://forums.phpfreaks.com/topic/49858-clientserver-sscripting/#findComment-244700 Share on other sites More sharing options...
roopurt18 Posted May 4, 2007 Share Posted May 4, 2007 I'm answering this strictly in terms of web development. 1) Where would you use only client side programming and why? Instances where you want to improve the client interface, such as DHTML or AJAX programming. The simple example is a form submission; normally the entire form needs to be submitted to the server, processed, and then the server will either accept or reject the form based on it's validity. Using a client-side scripting language you can validate the form before it's ever sent, thus telling the user to fix errors before they ever reach the server. 2) Where would you use only server side programming and why? Instances where you have to have tight control over the data. Continuing the form example from above, while you can use a client-side language to validate the form before it's been submitted, you can not rely on that as your only form validation. You still need to validate the form on the server in case the client has Javascript disabled. 3) Where would you use both and why? Instances where you want your web page to become a web application, i.e. highly interactive and stream lined in terms of usability. Quote Link to comment https://forums.phpfreaks.com/topic/49858-clientserver-sscripting/#findComment-245494 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.