Introduction to Web Programming

By Introduction to Web Programming

Web programming is the art of creating dynamic web applications. This means that users can interact with the application to post their stories, write comments, etc. from a web browser like Google Chrome, etc. Web programming is also referred to as web development. Example of web apps includes social networking sites like Facebook and Twitter or Video sharing sites like Youtube and Vimeo or e-commerce sites like Jumia and Amazon.

Before we proceed much, a website is a collection of web resources eg, web pages and multimedia content like images and videos. A web page is a document that is available on the World Wide Web (www). A web page is usually written in a markup language such as HTML. An example of a web page is this document that you are currently reading.

In this tutorial, I will introduce you to web programming languages and other tools you will need to start web programming if you are a beginner. And the good thing is that web programming is not that hard. And in fact, web programming is the best form of programming for beginners. You can get plenty of training materials online.

Learning web programming is one of the brightest decisions you will ever make. This is because many things are done online, like shopping, booking travel tickets, watching movies, etc. Some people want to learn web programming so that they can create the next big E-commerce website or next Facebook. Others want to learn and find a job in the web development industry. It is a good thing to learn web programming, no matter what reason. Actually, with the great CMS available now eg, Wordpress, Joomla, Drupal, Magento, and Prestashop, you can build a super website quickly.

Two broad divisions of web programming

There are two main divisions of web programming. We have front-end (client-side) programming and back-end (server-side) programming. Front-end programming is done in HTML, CSS, and JavaScript. It involves designing what the user sees on the web page, ie, both design and content. HTML stands for HyperText Markup Language and is used to write web pages. CSS stands for Cascading Style Sheet and is used for styling the appearance of the web page. JavaScript is a scripting language that adds functionality to the web pages. It makes the interactivity smooth. JavaScript should not be confused with Java. They are two different languages, and both are widely used in their domains. You might have a look at the best way to learn JAVA.

Back-end programming happens on the server-side. This means controlling whatever happens behind the scenes of a web app. For example, when you log into Facebook. You supply your username or email and password. These are taken to the back-end for verification. So such a process is what we call back-end programming. Also, reading posts from the database happens at the back-end. Every time you log into Facebook, you see the latest news feed. No person manually updated this information for you. A script on the Facebook back-end read posts from a database and updated your front-end. Therefore, we can see that the back-end uses a database to re-generate what we see.

Examples of Back-end Scripts

There is a long list of back-end languages and have frameworks too. We will mention just a few.

  1. PHP
  2. Python
  3. Ruby on Rails
  4. Java
  5. ASP .NET
  6. Perl
  7. Node.js

We will not go into details of each language, and our focus will be PHP (Hypertext Preprocessor)

Your fist question now could be, what is PHP?

What is PHP?

We have already seen that PHP is a server-side scripting language. PHP stands for Hypertext Pre-processor. Initially, it stood for Personal Home Pages. PHP is an interpreted language. It can only be interpreted on a server that has PHP installed. You can install Xampp on your local machine and run PHP scripts on it. The client machine accessing PHP scripts only needs a web browser such as Google Chrome.

A PHP file ends with extension “.php” and contains PHP tags “”.

PHP Syntax

// PHP code goes here

The default file extension for PHP files is ".php" and a PHP file can also contain HTML tags and Javascript code.

My first PHP page

echo "Hello World!";

Why Use PHP?

  1. PHP is open-source and free.
  2. Short learning curve compared to other languages such as JSP, ASP, etc.
  3. Large community document
  4. Most web hosting servers Like Godaddy support PHP by default, unlike other languages such as ASP that need IIS. This makes PHP a cost-effective choice. 
  5. PHP has inbuilt support for working hand in hand with MySQL; this doesn't mean you can't use PHP with other database management systems. You can still use PHP with
  • Postgres
  • Oracle
  • MS SQL Server
  • ODBC etc. 

Ways to Learn Web Programming

You can learn web programming by enrolling in a university and attending classes. However, this is costly.

You also learn web programming on the web itself. There is plenty of quality training materials here. A specific recommendation is Treehouse because they focus on web programming, and most of its teachers are web developers. 

You can also learn web programming by researching on your own, trying out website templates, and even inspecting the source code of other websites. Many of HTML and CSS coders learning by tweaking web templates that are readily free for download. You can find some excellent articles and forums where other web developers are and find out the best things to learn.

While many can legitimately claim to “know” PHP, those who are true experts in the language are capable of producing software that is much more scalable, functional, robust, and maintainable. A PHP expert should have clear understanding of key PHP concepts and paradigms. I highly recommend TopTal guide because it offers a sampling of effective questions to help evaluate the breadth and depth of your mastery of PHP.

Recommended books for web programming in PHP

The Joy of PHP Programming: A Beginner’s Guide to Programming Interactive Web Applications with PHP and MySQL

A Beginner’s Guide kicks off with basic HTML, newbies can get started easily. The book then escalates step by step into explaining how PHP works. It transforms a PHP newcomer into a professional dynamic website programmer.

The reader starts with the easy stuff like how to create and run basic PHP scripts then move towards the concept of modifying web pages. At the later stage, the reader gets to put everything learned to test via a series of cohesive and fun exercises.

Important topics covered by The Joy of PHP Programming include installing and configuring PHP, basic PHP syntax, control structures, and using PHP and MySQL together. The PHP book also covers form creation, working with images, PHP tips, and security considerations.

You can buy the book here.


Well, we’ve finally reached the end of introduction to web programming. We shall now focus on PHP and particularly Codeigniter Framework. Applause for you being so patient and curious! Please share the article with your friends.

Was this article helpful?
Donate with PayPal:

Eric Murithi Muchenah

Life is beautiful, time is precious. Make the most out of it.