Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Django For Beginners

ASB
July 13, 2019

Django For Beginners

In this presentation, i had tried to cover the theoretical part of django before jumping into the practical part because this will be useful to everyone want to learn django from scratch and know how django framework is working and what concept should be applied here and the other staff.

ASB

July 13, 2019
Tweet

Other Decks in Programming

Transcript

  1. TOPICS THAT WILL BE ADDRESSED 1. What is Django? 2.

    What we need to get start with Django? 3. Why we use Django? 4. What is the concept used in Django? 5. How Django works?
  2. Django is an open source framework written in python and

    used to create a web application in python. A framework is a set of tools and components which will make your life easier and faster to write and focus only on the code that you need, so django is one of theses frameworks which will provide you by a set of rich components under use to make your job too much easier & faster. 1. WHAT IS DJANGO?
  3. 2. WHAT WE NEED TO GET START WITH DJANGO? >

    You must have the basics of python programming language. > You must have the knowledge about the main web components (Front-end Languages) such as: HTML, CSS, and JavaScript. > You must have already a python interpreter and a text editor or IDE installed on your computer.
  4. There are several text editors under use to write a

    python codes such as: VS Code, ATOM, Sublime, and so on. In case of IDE I’d recommended you to try a PyCharm, it is really cool and you can do many things with it. According to this course, you can download the community edition will be enough for you to cover this course. 2. WHAT WE NEED TO GET START WITH DJANGO?
  5. 3. WHY WE USE DJANGO? 1.3 Easy to Use: Since

    django written in python and we use a python codes to create our web application, so everything will be easier and faster cause python syntax is super easy to learn and to use it inside your text editor or IDE. 2.3 Open Source: Django runs on any platform without any problems as well as Windows, Linux, and Mac.
  6. 3. WHY WE USE DJANGO? 3.3 Fully Loaded: Django includes

    a dozens of extra components which will make way of the production be faster. These components are: User Authentication, Content Administration, Site Maps, Sessions Management, and much more things. 4.3 Secure: Django created in a way that developers will not commit any mistakes related to their security. Some of these
  7. 3. WHY WE USE DJANGO? issues are addressed and solved

    with django to make the django architecture secure enough for you to focus only on your code. Examples about these issues: SQL Injection, Cross Site Request, Cross Site Scripting, Hijacking, Authentic Users, and so on. 5.3: Scalable: Django can be adequate to any traffic demand when it related to a heavy traffic.
  8. 3. WHAT IS THE CONCEPT USED IN DJANGO? Django follows

    the MVC (Model View Controller) concept which is consider the best approach or concept to create a web applications. Now, we need to discuss each one separately from the other as follow: In the Model, you need to define your database table and it’s fields inside a class which will deal with all of that. Name of your class
  9. 3. WHAT IS THE CONCEPT USED IN DJANGO? will be

    the name of your table and the class attributes will be as your table fields, so you only focusing about creating your class without focusing too much about the database structure and adding to that django can provide you an API to access your database easily.
  10. 3. WHAT IS THE CONCEPT USED IN DJANGO? In the

    View, it represents the logical view or the displaying layer of your app through the browser which will display your UI. In the Controller, it represents the logic used to control of what is the actual data which will be pulled from the model (your database) to the view or it will handle the request directly and return the result to the View for viewing your data on the browser.
  11. 5. HOW DJANGO WORKS? In django, there is MTV (Model

    Template View) and this is the same approach like we discussed before but instead of View part in MVC there is Template part in MTV here and instead of Controller part in MVC there is a View part here in MTV as below: MTV MVC Model Model Template View View Controller
  12. 5. HOW DJANGO WORKS? - Model in MTV it is

    just has the same purpose and this will focus about creating the database table and it’s fields. - Template is used to display the data to the user and it is connected to the view. - View is used as a bridge between the template and the model. It controls the request given by the user to check if the request if
  13. the request is related to Model then ORM will take

    care about these things and send the response with requesting (target) page back to View and then the View will send it to Template. If the request is not related to Mode then it will directly send the result back to the Template. 5. HOW DJANGO WORKS?