Web programming: intro
Tags: webprogramming, muict
Published: 2018-08-28 05:27:07

---
title: Web programming: intro
published: true
description: The introduction to web programming of MUICT class
tags: web programming, MUICT
---

Before we get into the technical web programming stuff, let's look at the history of the internet, how it works, and its components. We will also go through the "how it works" and the components of world wide web (www) as well.

###The Internet 
So what is it? To simply put, the Internet is the largest network in the world which connects many networks all over the world, and communicate by the policy called _TCP/IP_. Now for the history of the internet, I'll leave this video below! (Thank Melih Bilgil for this awesome video!)
{% youtube 9hIQjrMHTv4 %}
Oh, and I'll leave the "1980 Documentary About Personal Computers" video here in case you are curious about the evolution of our computer. \*thumbs up\*
{% youtube v_fTS3BO-cE %}
Ok, after we had a look at its history and origin, let's look at the internet **components** next. It is mainly composed of three things; the client(s), the server(s), and the network. Pretty straightforward, isn't it? Here's the picture of how it works (click the image to go to the source xD)
<a href="https://slideplayer.com/slide/4759393/">![alt](https://thepracticaldev.s3.amazonaws.com/i/ckt37d4bd46q8e49vafl.jpg "how internet works")</a>
Let's look at some essential vocabularies:
> **TCP** or Transmission Control Protocol, its job is to break down the data into small size chunks called "_packets_", and combines these packets when they arrive.
>
> **IP** or Internet Protocol routes the packets to the destination.
>
> **IP Addressing** is the numerical label that is assigned to devices participating in a network (which means your computer has one, too!). The popular one is IPv4, it specifies that internet addresses are in form ###.###.###.###; where each ### can run from 0 to 255 (2^8 ).
>
> **Services and Ports**, so TCP/IP defines a number of "channels" that a service (server) used for data transferring to/from the clients.; these channels are called "_ports_".
> All internet services work on top of TCP/IP protocols, and have their own specific port numbers and protocols; e.g. HTTP's port is '80'.
>
> **Domain Name** is (roughly) a text label version of IP Address, it is hierarchical structures. _DNS_ or _Domain Name Server_ is a server that provides service to translate between IP addresses and the 'user-friendly' domain names; e.g. www.google.com, the domain name, has 66.249.89.104 as an IP address.
Here's the domain name hierarchy:
<a href="http://www.cialfor.com/2016/02/03/domain-name-system-dns-caching/">![alt](https://thepracticaldev.s3.amazonaws.com/i/js8pc42yvr434lsa7dqj.gif "domain name hierarchy")</a>

### World Wide Web
World wide web, or www for short, is a service designed to allow easier access to the information on the internet through the use of graphical user interfaces. 
##### some facts:
- It is introduced in 1992 by Tim Berners-Lee
- Users view web pages that contain texts, images, and other multimedia, and navigates between pages using _hyperlinks_.
- It uses a standard communication protocol between servers and clients called _HTTP protocol_.
Here's a video of how it works below :)
{% youtube hDcYHbiOpJ4 %}

Let's take a look at another set of essential vocabularies:
> **Web servers** are computers storing web page files, they can be a single computer, or a group of computers running web server software (Linux/Unix uses Apache, and Windows uses Internet Information Service (IIS).
>
> **Web pages** are documents storing information, they're usually written in HTML format.
>
> **Web Clients** are computers reading the web pages.
>
> **Web browser** is a program displaying the pages at the clients it contains instructions on how contents (HTML Markup tags, CSS, etc.) be displayed; e.g. Chrome, Firefox. It fetches a web page from a server by an HTTP request containing URL of the page. 
>
> **URL** or Uniform Resource Locator(s) is a string used to identify a resource of service on the internet (not just web pages).

AND we're done with the introduction of the internet and the www. Before ending this article, I would like to write down what we (or at least I) are going to learn in this web programming course.

- **HTML**, or HyperText Markup Language, provides formatting and layout of text and graphics, as well as hypertext links between web pages.
- **CSS**, or Cascading Style Sheet, provides a more powerful control of style and formatting. 
- **Client-side scripts**'s processing takes place on the end users computer. The source code is transferred from the web server to the user's computer over the internet and run directly in the browser. What we're going to learn is the stuff used in the browser; e.g. Javascript, Flash.
- **Server-side scripts** lets you interact with databases and other data sources, the language used we're going to learn is PHP (and possibly some others).