Saturday, March 18, 2017

Start Python programming

Python is a server-side programming language. What does server-side mean? There are 2 kinds of languages in web programming. One is server-side programming language, the other is client-side programming language. Server-side language works in a server (to affect website itself), meanwhile, client-side language works in user's browsers (to react to user's behavior on a website).

For example, Javascript is a client-side programming language that enables to interact with people's behavior on a website. For example, if you want to make photos twice as big when photos are clicked on a website, you would need to use Javascript.

The image below shows how client-side language (like Javascript) works. As this image shows, yes client-side work in browser depending on user's behavior. If a you click a button on a website, Javascript (or CSS, HTML) will detect the behavior (and start a new activity).

click to expand

Meanwhile, Python is a server side language, so Python works inside a server so that Python can change the website dynamically. For example, Google's search-result always changes depending on what word you searched for. This is because a server-side program(1) dynamically changes the result page depending on what word the server received.
click to expand

To start programming with Python, you don't need to prepare anything unlike Java or C, C++, C#. Just write codes with Python on some editor and upload it to a server (in which Pyrhon is installed). Then the server automatically execute the Python file (as a website or webapp) every time users access to the page. If you use a rental server that has been Python installed, you don't need to even install Python by yourself because it should have been installed beforehand by the server administrator. (By the way, some rental servers don't have Python or have only older version's Python installed, so please be careful when choosing a rental server for your website.)

In short. You want to change your website dynamically depending on the data of a server? Use server-side languages. You want to change the website depending on user's behavior? Use client-side languages. You want both? Use both of them together.

(1) Programs works in a server, which are usually made by server-side language (like Python), are called server-side programs.