Skip to content

Latest commit

 

History

History
89 lines (45 loc) · 6.59 KB

File metadata and controls

89 lines (45 loc) · 6.59 KB

Web Dev (LS 2020) Week 5: Introduction to Back-End Development with Django

Hey everyone,

We hope that you have enjoyed the course till now and are looking forward to venturing further into Web Development. Your assignments in the last week have really impressed us; we anticipate the same level of enthusiasm and dedication to the course as we move forward.

This week we'll be starting with the back end part of Web Development, through the use of the software framework Django. The framework is majorly based on Python, so a brief overview would be required to start with it.

If you already know the basics of Python, dive right in to the Django tutorials. Even if you don't know Python or just aren't comfortable with it, we have some great resourses for you to build a working base of Python. Learning Python is an absolutely essential skill as its applications go far beyond just web development. Be it Game Development or Machine Learning, you need to learn Python. So we recommend giving a sufficient amount of time in understanding the fundamentals of Python and you are good to go!

Link for brief tutorials on:

What is Back-End Development and how does it fit in to the big picture?

Front end development involves what a user sees on the screen when they open a specific URL owned by you. Even in a completely static environment (with only HTML/CSS), when someone opens a website, some server on the planet needs to respond to you with those HTML and CSS files.

That server is just a computer, just like the one you use yourself to browse the internet. But it has been tuned for performance, and doesn't have unnecessary components like a mouse or keyboard attached. And it sits with tons of other computers probably in a data warehouse.

Programming those computers in some special way is called Back End Development.

Back-end developers work hand-in-hand with front-end developers by providing the outward facing web application elements server-side logic. In other words, back-end developers create the logic to make the web app function properly, and they accomplish this through the use of server-side scripting languages like Ruby or PHP.

Aside from making web applications functional, back-end developers are also responsible for optimizing the application for speed and efficiency. Moreover, back-end developers often create a data storage solution with a database, which is a crucial component for all web applications since it stores information (like users, comments, posts, etc.). Common databases include MySQL, MongoDB, and PostgreSQL.

Skills for Back end Developer

Developing Back-End with Django

Now that we know the role of Back-end, let's get on with designing your own Back-end with Django.

What is Django?

Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design. Built by experienced developers, it takes care of much of the hassle of Web development, so you can focus on writing your app without needing to reinvent the wheel. It’s free and open source.

Installing Django

We assume you have Python up and running to begin with. If not, take a look at the supplementary article on Python.

Here is an extract of the installation guide from the official website.

Installing an official release with pip

This is the recommended way to install Django.

  1. Install pip. The easiest is to use the standalone pip installer. If your distribution already has pip installed, you might need to update it if it’s outdated. If it’s outdated, you’ll know because installation won’t work.

  2. Take a look at venv. This tool provides isolated Python environments, which are more practical than installing packages systemwide. It also allows installing packages without administrator privileges. The contributing tutorial walks through how to create a virtual environment.

  3. After you’ve created and activated a virtual environment, enter the command: $ python -m pip install Django

Also checkout this video if you are facing trouble with virtual environments, through virtualenv

Here is a video for Django introduction and installation through pip.

Getting Started with Django

Once Django is up and running, its time to get your hands dirty with some code.

Checkout these articles for learning the basics of Django:

This link will give you a birds eye view of the overall Logic behind coding Django. For detailed content and hands-on application development, continue with the text and video tutorials below.

The image below depicts how the basic flow of data in Django occurs. Use this as a mental map while designing the back-end, following the tutorials below.

Back-End Flow

We'll be using the learning by implementation approach, so that you can build something as you continue to learn. So, take a look at these tutorials, wherein you'll be building a basic poll application. Visit all the 7 parts of the tutorial to get your poll site ready to deploy.

Alternatively, we recommend a YouTube Playlist that guides through making a basic blog application with Django.

Note: We require that you only go through either text or video tutorials for the creating the application. Both cover more-or-less the same amount of content. There is no need to go through both.

As always, we encourage healthy discussion on our Telegram Group

If you haven't already, join the Announcements Channel for the latest updates on this course.

Next week we shall continue with advanced tutorials on Django, in this course on Web Development from Learners' Space by WnCC and Career Cell.

Created with ❤️ by WnCC