A complete beginners introduction to web development

Sjors van Dongen
3 min readOct 10, 2017

--

A friend of mine recently wanted to start with web development because he had a lot of spare time and wanted to do something useful with his time. I always wanted to teach someone to develop but where to begin? It’s like, teaching someone to read or write, where should you begin? Probably with the alphabet but there isn’t anything like a programmers alphabet. Of course there are a lot of tutorials how to start with Laravel programming but these are all written for people who already have experience with setting up the basic stuff for it. I helped him installing the basic stuff to get Laravel up and running but I figured out I could write it down and share it with the world.

In this tutorial I’m going to use the following software components:

  • MAMP
  • PHP
  • MySQL
  • Composer

Because installing all this software can be a little overwhelming in the beginning I suggest that you install MAMP. MAMP is a tool for Windows and MacOS which install a basic AMP setup for you. This means installing Apache, MySQL and PHP. So what is the difference between these tools? PHP is a server based programming language, which can only run on a server. Your computer isn’t a server by default but with Apache you can run a server in the background. Of course there are 100 of ways of running PHP and servers on your local computer but for this tutorial I’m just going to explain how I once started.

Okay, so you can use PHP in combination with Apache. Apache also makes sure that when you go to http://localhost in your browser, it serves the content of a certain directory. I hope in the meantime you installed MAMP and got it up and running. When you first start the servers it will open (or you can browse to http://localhost:8888/MAMP yourself) and you will see the following content (or something similar depending on your version):

Click around and see what versions of software components are installed. When I click on the “phpinfo” link I see a purple page with PHP 7.1.8, so I hope you see something similar. Also a thing to notice is that there is a MySQL section described on the homepage. Briefly, with MySQL you can save data. This can be all kind of data but you will see when you get to a more experienced state of developer, almost every little bit of advanced website uses MySQL as database service. So now we have installed 3 software components. Apache, PHP and MySQL. These three are tightly coupled. You run a server with Apache, which can display content from a MySQL database, fetched with PHP.

For the last part of this short tutorial I will explain how you can easily install Composer on your computer. First, what is Composer? Composer is a dependency manager for web development (especially PHP). This means that you can easily download code from other persons who made it publicly. Say for example, that you would like to have the coordinates of Amsterdam through the Google Maps API. You don’t have to figure out everything yourself to achieve that. There are already a lot of persons who figured out for you. Always try to find an answer online first, before you are inventing the wheel again yourself! First check if you can run the following in a command prompt:

$ php --version
PHP 7.1.8 (cli) (built: Jun 23 2017 08:41:51) ( NTS )Copyright (c) 1997-2017 The PHP GroupZend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologieswith Xdebug v2.5.5, Copyright (c) 2002-2017, by Derick Rethans

If you got something similar as I do then we’re good to go. On the download page you can copy and paste the code in your command prompt. Once it’s installed you should be able to run the following:

$ composer --versionComposer version 1.5.1 2017-08-09 16:07:22

When you get a version number, you have successfully installed Composer! :)

For now this is everything I wanted to explain to you. I hope some of you find it helpful to start with web development. In the next tutorial I will explain some things about a popular PHP framework, called Laravel. Cheers!

--

--

Sjors van Dongen
Sjors van Dongen

Written by Sjors van Dongen

Looking for high-quality backlinks? Try backlink.nl

No responses yet