{"id":1957,"date":"2017-03-23T19:45:40","date_gmt":"2017-03-23T14:15:40","guid":{"rendered":"https:\/\/www.wikitechy.com\/technology\/?p=1957"},"modified":"2017-03-28T16:48:22","modified_gmt":"2017-03-28T11:18:22","slug":"php-javascript-difference-client-side-server-side-programming","status":"publish","type":"post","link":"https:\/\/www.wikitechy.com\/technology\/php-javascript-difference-client-side-server-side-programming\/","title":{"rendered":"PHP &#8211; JAVASCRIPT &#8211; What is the difference between client-side and server-side programming"},"content":{"rendered":"<h4 id=\"what-is-a-client-side-programming-language\"><span style=\"color: #800000;\"><strong>What is a Client side programming language?<\/strong><\/span><\/h4>\n<ul>\n<li>Client side programming has mostly to do with the user interface, with which the user interacts.<\/li>\n<li>In web development it&#8217;s the browser, in the user&#8217;s machine, that runs the code, and it&#8217;s mainly done in javascript, flash, etc.<\/li>\n<li>This code must run in a variety of browsers.<\/li>\n<\/ul>\n<h4 id=\"what-is-a-server-side-programming-language\"><strong><span style=\"color: #ff6600;\">What is a server side programming language?<\/span><\/strong><\/h4>\n<ul>\n<li>Server-side scripting is a technique used in web development which involves employing scripts on a web server which produce a response customized for each user&#8217;s (client&#8217;s) request to the website.<\/li>\n<li>The alternative is for the web server itself to deliver a static web page.<\/li>\n<\/ul>\n[ad type=&#8221;banner&#8221;]\n<h4 id=\"background\"><span style=\"color: #000000;\"><strong>Background:<\/strong><\/span><\/h4>\n<p>Web development is all about communication. In this case, communication between two (2) parties, over the HTTP protocol:<\/p>\n<ul>\n<li>The Server &#8211; This party is responsible for serving pages.<\/li>\n<li>The Client &#8211; This party requests pages from the Server, and displays them to the user. In most cases, the client is a web browser.<\/li>\n<li>The User &#8211; The user uses the Client in order to surf the web, fill in forms, watch videos online, etc.<\/li>\n<\/ul>\n<p>Each side&#8217;s programming, refers to code which runs at the specific machine, the server&#8217;s or the client&#8217;s.<\/p>\n<h4 id=\"programming\"><span style=\"color: #000000;\"><b>Programming:<\/b><\/span><\/h4>\n<h4 id=\"server-side-programming\"><span style=\"color: #800080;\">Server-side Programming<\/span><\/h4>\n<ul>\n<li>Server-side programming, is the general name for the kinds of programs which are run on the Server.<\/li>\n<li>Server side programming is all about generating dynamic content. Most of the web pages are not static, therefore they need search a database in order to show the user personalized information.<\/li>\n<li>Server-side programming can be done in a lot of languages: PHP, ASP, Java and Jsp, Phyton, etc.<\/li>\n<li>This code has to do with: Querying the database, encoding the data into html, inserting and updating information in the database.<\/li>\n<\/ul>\n<h4 id=\"uses\"><span style=\"color: #000000;\"><b>Uses<\/b><\/span><\/h4>\n<ul>\n<li><span style=\"color: #000000;\">Process user input.<\/span><\/li>\n<li><span style=\"color: #000000;\">Display pages.<\/span><\/li>\n<li><span style=\"color: #000000;\">Structure web applications.<\/span><\/li>\n<li><span style=\"color: #000000;\">Interact with permanent storage (SQL, files).<\/span><\/li>\n<\/ul>\n<h4 id=\"example-languages\"><span style=\"color: #000000;\"><b>Example Languages<\/b><\/span><\/h4>\n<ul>\n<li><span style=\"color: #000000;\">PHP<\/span><\/li>\n<li><span style=\"color: #000000;\">Python<\/span><\/li>\n<li><span style=\"color: #000000;\">ASP.Net in C#, C++, or Visual Basic.<\/span><\/li>\n<li><span style=\"color: #000000;\">Nearly any language (C++, C#, Java). These were not designed specifically for the task, but are now often used for application-level web services.<\/span><\/li>\n<\/ul>\n[ad type=&#8221;banner&#8221;]\n<h4 id=\"client-side-programming\"><strong><span style=\"color: #800000;\">Client-side programming<\/span><\/strong><\/h4>\n<ul>\n<li>Much like the server-side, Client-side programming is the name for all of the programs which are run on the Client.<\/li>\n<li>Client side\u00a0programming has to do with the user interface, with\u00a0which\u00a0the user interacts.<\/li>\n<li>It\u2019s main tasks are: interacting with the server &#8211;\u00a0sending requests and retrieving data from it,\u00a0validating input,\u00a0animation,\u00a0manipulating UI elements,\u00a0applying styles, etc.<\/li>\n<li>An example of client-side programming is Javascript. Javascript can be used to run checks on form values and send alerts to the user\u2019s browser.<\/li>\n<\/ul>\n<h4 id=\"uses-2\"><span style=\"color: #000000;\"><b>Uses:<\/b><\/span><\/h4>\n<ul>\n<li><span style=\"color: #000000;\">Make interactive webpages.<\/span><\/li>\n<li><span style=\"color: #000000;\">Make stuff happen dynamically on the web page.<\/span><\/li>\n<li><span style=\"color: #000000;\">Interact with temporary storage, and local storage (Cookies, localStorage).<\/span><\/li>\n<li><span style=\"color: #000000;\">Send requests to the server, and retrieve data from it.<\/span><\/li>\n<li><span style=\"color: #000000;\">Provide a remote service for client-side applications, such as software registration, content delivery, or remote multi-player gaming.<\/span><\/li>\n<\/ul>\n<h4 id=\"example-languages-2\"><span style=\"color: #000000;\"><b>Example languages:<\/b><\/span><\/h4>\n<ul>\n<li><span style=\"color: #000000;\">JavaScript (primarily)<\/span><\/li>\n<li><span style=\"color: #000000;\">HTML*<\/span><\/li>\n<li><span style=\"color: #000000;\">CSS*<\/span><\/li>\n<li><span style=\"color: #000000;\">Any language running on a client device that interacts with a remote service is a client-side language.<\/span><\/li>\n<\/ul>\n<p>*HTML and CSS aren&#8217;t really &#8220;programming languages&#8221; per-se. They are markup syntax by which the Client renders the page for the User.<\/p>\n[ad type=&#8221;banner&#8221;]\n<h4 id=\"security\"><span style=\"color: #000000;\"><b>Security<\/b><\/span><\/h4>\n<ul>\n<li>In terms of Security, server-side scripts are more secure than client-side scripts.<\/li>\n<li>For example, when a user accesses his bank account online, the server side-script communicates with the client using encryption.<\/li>\n<li>A client-side script consists of plain text and runs on the client\u2019s browser allowing hackers to take a peek at the the code and steal private information from the user\u2019s computer.<\/li>\n<\/ul>\n<h4 id=\"compatibility\"><span style=\"color: #000000;\"><b>Compatibility<\/b><\/span><\/h4>\n<ul>\n<li><span style=\"color: #000000;\">In terms of Compatibility, the main issue with client-side scripts are the problems with OS\u2019s and web browsers compatibility.<\/span><\/li>\n<li><span style=\"color: #000000;\">Programming a website involves users having multiple computer software, so bugs in the code or compatibility issues with browsers may occur.<\/span><\/li>\n<li><span style=\"color: #000000;\">Server-side scripts being run on the server reduces the number of bugs and compatibility issues since the code is run on a single server using a single language and hosting software.<\/span><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>What is a Client side programming language? Client side programming has mostly to do with the user interface, with which the user interacts. In web development it&#8217;s the browser, in the user&#8217;s machine, that runs the code, and it&#8217;s mainly done in javascript, flash, etc. This code must run in a variety of browsers. What [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[275,25],"tags":[4191,4192,4198,4194,4197,4193,4196,4195,4189,4190],"class_list":["post-1957","post","type-post","status-publish","format-standard","hentry","category-javascript","category-php","tag-ajax-server-side-and-client-side-confusion-clarification-needed","tag-building-web-pages-on-the-server-side-or-client-side","tag-can-a-programming-language-be-both-client-and-server-side","tag-how-to-make-javascript-to-be-compatible-with-both-client-and-server-side","tag-passing-the-asp-classic-html-as-a-string-from-client-side-to-server-side","tag-processing-data-server-side-vs-client-side","tag-server-side-and-client-side-when-can-we-place-php-inside-javascript","tag-server-side-or-client-side-for-fetching-tweets","tag-what-are-the-main-concerns-when-generating-client-side-javascript-from-the-server","tag-what-is-the-difference-between-call-and-apply"],"_links":{"self":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts\/1957","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/comments?post=1957"}],"version-history":[{"count":0,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts\/1957\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/media?parent=1957"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/categories?post=1957"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/tags?post=1957"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}