What are the diferences of client side programming and server side programming?
When do I use client side and when do I use server side?
Those a web developer need to know both to be effective in writing website?
Client side programming includes any coding or computation or effects or annimation or any sort of interaction your website performs with the user via browser. But server side programming is that which performs all the task in the server only. So the user is unaware of that.
User will only know what happened in the browser but not what happened in the server. Those are background tasks.
For a web application you need both.
Best way to learn is trying to create a simple app. Consider a very simple address book app. You need to store the entries (so you need MySQL for instance).
Actually you need to be able to perform 4 basic actions with the data which is called CRUD - Create, Read, Update, and Delete. For this you need to use a language like PHP, ASP, Python, which run on your server.
To actually use the app you need a user interface which is created by HTML + JS (or jQuery) + CSS and possibly you'd also use some images.
the short answer:
client side = code runs on client machine, namely the browser
server side = code runs on server, output sent to client
A do it all web developer should know at least a little of both, but there are specialist in both areas.
I would also add that client side code is visible to anyone viewing the web page where server side code is not visible to someone viewing the webpage.
Understanding of both server-side and client-side is important. Client side is in-secure, transparent and can be manipulated by user (or hacker) in any way. Server-side is protected and can't be messed around with. Any web application with user log-ins should have back-end code.
You might be able shift your code based on your requirements. For example, you can place your code primarily on the client side with Sencha / ExtJS or similar framework, then have only a simple API service on your server. You might even avoid coding for the backend completely by using some API engine.
On other hand, you can stay completely on the server-side if you pick a PHP UI Framework. Such a framework would worry about your user interface letting you use PHP only. Unlike languages such as Java and .NET There are very few UI Frameworks for PHP. I wish they would have more publicity.
Coding for both front-end and back-end makes development much slower, but it's a commonly accepted way right now.
©2020 All rights reserved.