Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

9: 00 tonight | actual battle between Flask Foundation and Web development

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Needless to say, let's introduce the contents of this open course directly.

Main contents:

1. The basis of Web development

Second, "Hello World" in Flask

Third, the template of Flask

IV. Message prompt and exception handling of Flask

1. The basis of Web development

This chapter mainly explains the basics of Web development, first introduces the basic front-end knowledge, and the front-end framework that will be used in subsequent projects, and then introduces Git and Github to expand your learning ideas. Secondly, learn the MVC design pattern, and finally learn the HTTP protocol, focusing on GET and POST methods.

This section mainly contains the following four knowledge points:

Front-end knowledge

Git and Github

MVC design pattern

HTTP protocol

1.1. Front-end development foundation

Html

CSS

JavaScript

If you do not understand these basic knowledge, you can seize the time to learn. At least be able to handwrite, some box models and other basic concepts to master, especially JS is more important, in our future development will often use.

1.2. Commonly used front-end libraries and frameworks

Bootstrap

JQuery

Vue.js

Bootstrap is a more versatile framework, through which we can quickly develop some responsive web pages.

The second JQuery, this is a very commonly used JS library, you can use it to operate html dom, I hope you know about it, and learn to use it skillfully.

Vue.js is a popular JavaScript MVVM library with easy to use and flexible features.

1.3, code management tools

To introduce an excellent code management tool Git,Git is a distributed management tool, which was originally designed by Linus to manage the linux kernel. The reason for this can be seen "the birth of Git". Of course, compared with our commonly used version of the tool SVN, Git has many advantages, first of all, its speed is very fast, especially in the performance of large projects, while its branch-based development model is also very suitable for some fast iterative products, so Git is very popular in Internet companies.

So what is Github? Github is actually a Git-based social website with a large number of excellent open source projects, including Flask that we want to learn.

The main purpose of recommending Github here is to let you look for some excellent learning resources on Github in your future study.

1.4.The MVC design pattern

Let's take a look at the design pattern of MVC, so why talk about MVC? Mainly because it is widely used, especially in the field of Web development, then a large number of Web development is based on MVC, then in python, the Flask Web framework we learn is also based on the MVC pattern.

MVC usually consists of the following three parts:

View (View)

Controller (controller)

Model (Model)

Using MVC can greatly improve the maintainability of the code and make the architecture clearer. In the follow-up content, we will explain the application of MVC in Flask in detail through Flask, so that we can personally experience the benefits of MVC design.

HTTP Protocol (Hypertext transfer Protocol)

Let's recall the usual process of surfing the Internet. First, enter the address in the browser address bar, enter, and send the request. Then the server responds to the request and returns the result to the browser. The browser parses the result and renders it on the page. At this time, we can clearly see the requested web page.

Well, HTTP plays a role in the whole process, and the Http protocol mainly has the following two characteristics:

Based on request and response pattern

Stateless

Based on the request and response pattern, as we recall just now, it is well understood that a large number of our Web development frameworks are actually dealing with HTTP requests and then returning the results of HTTP responses. What is meant by "stateless"? This means that the server will not remember who sent the request.

1.6. HTTP request

GET

POST

DELETE

PUT

Generally speaking, it is sufficient to mainly use GET and POST in general development, then all four methods will be used in Restful-style api development. In the later Flask development, we will introduce the application scenarios of GET and POST with the application code.

The first part is the theoretical part, and most of the following parts are practical. I will show you the technical points of each Flask in the open class.

Second, "Hello World" in Flask

This section contains the following three knowledge points:

The basic structure of Flask Application

Routing of Flask

Reverse routing of Flask

Third, the template of Flask

In this section, I will write a lot of code to explain Flask templates, please note: Flask routing and templates are the basic knowledge of Flask development, need to be proficient!

This section contains the following four points of knowledge:

Simple use of templates

Control statement

Loop statement

Template inheritance

These four knowledge points are often used in actual development.

IV. Message prompt and exception handling of Flask

This section mainly contains the following three knowledge points:

Message prompt

Throw an exception

Exception handling

Sharing time: 9: 00 p.m. on November 9, 17 (this Thursday)

Sharing method: webcast

Mode of participation:

1. Add the assistant Wechat, make notes on "Open course", join the sharing group, and get the LVB link and related materials:

The number of 51Reboot open course sharing group is more than 300. please add a small assistant: 1251743084, remark "open course", it will be pulled into the group.

Technical Exchange QQ Group: 238757010

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report