Web development
Tags: webdev, python, tutorial, beginners
Published: 2022-03-20 12:46:11

**What is web development?**
_Web development_ is the task of developing websites that can be hosted by the internet. 
Web development varies from a simple page to complex websites.

**Why Python for web development**

1. Python is flexible and easy to use.

2. Python is very stable hence it helps to dynamically build web applications.

3. Python provides quick processing.

4. Python is an all in one tool.

**Different types of web development**

![Types of web development](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/07o95ok3hbn1mufe4ril.jpg)

**1.Front-end web development**
The front-end is the part that is loaded inside a web browser on a client machine.
The front-end is the part that the user sees and interacts with.
Front-end web development is responsible for how a website looks or feels.

**2.Back-end web development**
The back-end is the part that runs on a web server.
The back-end is responsible for data processing, validating business rules, etc
Back-end web development is responsible for building and maintaining the code that runs a website.

**3.Full-stack web development**
Full-stack web development is development of both the front-end(client side) and back-end(server side) of a web application. 
Full-stack developers are experts that cover both front-end and back-end responsibilities. 

**Basics for building web applications**
**i) Address/URL**
_URL_ refers to Uniform Resource Locator.
It is a way to relocate a resource on the internet. 
A resource can be a web page, image, video or a pdf
**ii) HTTP**
HTTP refers to Hypertext Transfer Protocol.
Data exchange between back-end and front-end is determined by protocol called HTTP.
HTTP defines how clients and servers can communicate. 
**iii) HTML**
HTML refers to Hypertext Markup Language.
HTML is a simple language for presenting web pages and their content.
Web pages are built using HTML.
When using HTML, the server responds to the client by generating the requested page and returns it to the client. 
The other option is to return the data needed by the client and have the client generate the page. This is considered the industry best practice. 
**iv) API**
API stands for Application programming Interface.
API is a software intermediary that allows two applications to interact with each other. 
Modern APIs adhere to HTTP standards that are developer-friendly, easily accessible and understood broadly.

**Libraries Python provides for web development**

- CherryPy

- Django

- web2py

- Pyramid

- TurboGears

- Flask

**Recommended library**

![Django](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5ju9inplrhb7zjr92j7w.jpg)

For a beginner, I would recommend using Django.
Django is a high-level Python framework used for building web applications.
Django is used for back-end web development.
_<u>Why Django?</u>_
Django is best for web development for beginners because: 
i) Django is written purely in Python.
ii) Django is fast - you can create websites within few hours.
iii) Django is fully loaded with all tools to create websites. 
iv) Django is very secure.

<u>Django features</u>

- Admin site-an automatically generated user interface fo Django models.

- ORM- Object-relational mapper-> allows developers to interact with the Django database.

- Authentication->verifies the user and determines what the verified user can do. 

- Caching->lets the server process a request and store it in our cache.

<u>Examples of applications that rely on Django</u>
YouTube
Quora
Google
Instagram
Bitly
Dropbox
Spotify

**Resources**
-[Web development in Python](https://realpython.com/tutorials/web-dev/#:~:text=One%20area%20where%20Python%20shines,the%20Washington%20Post%20and%20Yelp.)
-[YouTube video](https://www.youtube.com/watch?v=3JluqTojuME)

> _If there's one thing you learn by working on a lot of different websites, it's that almost any design idea- no matter how appalingly bad- can be made usable in the right circumstances, with enough effort ~ Steve Krug_