National Central University
Uedu Main Site
Explore Uedu
Student Console
Register as Member/Login
Research Informed Consent Center
Survey Center
Educational Big Data Challenge
Claim or create a course
Try an AI Scenario Task
Support & Messages
Uptime Data

UeduGPTs

--

Jupyters

3

Local AI

--

Uedu Code

--

中央大學 AQI 80 24°C PM2.5 21
AI Reply Desktop Notifications

Show a desktop notification when the AI TA finishes replying

Chat Message Notifications

Notify me when classmates post messages in the forum

Sound notification

Play an alert sound whenever there is a new notification

後端開發

20 堂互動課:瀏覽器和伺服器怎麼對話、Flask 的路由與請求回應、Jinja2 模板與表單、用 SQLite 存資料、設計 REST API、Cookie、Session 與登入、權限與常見攻擊的防護,最後寫測試、部署上線、完成一個小型網站。範例是真的 Flask,在你的瀏覽器裡執行:可以逐步看一個請求怎麼走進你的函數,也可以改程式、在模擬瀏覽器裡操作網站、查看資料庫。建議先學過 Python 軌前 15 課;會一點 HTML 與 SQL 更好,但不是必要條件。
20 堂課 approx. 9.8 hour(s)

學習路徑

  1. 01
    網頁是怎麼運作的
    瀏覽器、伺服器與 HTTP:一次請求和回應裡有什麼
    Interaction實作 20 minute(s)
  2. 02
    第一個 Flask 程式
    虛擬環境、安裝、路由與 view 函數,在自己的電腦上跑起來
    Interaction實作導覽 25 minute(s)
  3. 03
    路由與動態網址
    網址裡的變數、型別轉換、HTTP 方法與 url_for
    Interaction實作 25 minute(s)
  4. 04
    讀取請求的內容
    request 物件:查詢字串、表單、JSON、標頭
    Interaction實作 25 minute(s)
  5. 05
    回應與請求勾點
    狀態碼、標頭、轉址、abort、before_request 與 g
    Interaction實作 25 minute(s)
  6. 06
    Jinja2 模板基礎
    把 HTML 從程式裡分開:變數、過濾器、判斷、迴圈與自動跳脫
    Interaction實作 25 minute(s)
  7. 07
    版型與靜態檔案
    模板繼承、include、巨集、CSS 與圖片、自訂錯誤頁
    Interaction實作 25 minute(s)
  8. 08
    表單與驗證
    接收表單、檢查輸入、重新顯示錯誤、送出後轉址
    Interaction實作 30 minute(s)
  9. 09
    接上資料庫
    sqlite3、每個請求一條連線、參數化查詢
    Interaction實作 30 minute(s)
  10. 10
    做出新增、查詢、修改、刪除
    一個留言板:CRUD 對應的路由、交易與找不到資料時的處理
    Interaction實作 30 minute(s)
  11. 11
    設計 REST API
    資源、方法、狀態碼與 JSON 回應
    Interaction實作導覽 30 minute(s)
  12. 12
    API 的驗證、分頁與錯誤格式
    檢查輸入、統一的錯誤格式、分頁與篩選
    Interaction實作 30 minute(s)
  13. 13
    前端呼叫 API
    用 fetch 取資料、更新畫面,同源政策與 CORS
    Interaction實作 30 minute(s)
  14. 14
    Cookie 與 Session
    HTTP 不記得你:Cookie 怎麼運作、Flask 的 Session 為什麼有簽章
    Interaction實作 30 minute(s)
  15. 15
    註冊與登入
    密碼雜湊、登入與登出、login_required 裝飾器
    Interaction實作 30 minute(s)
  16. 16
    權限與資料的擁有者
    401 與 403、角色、不能只靠隱藏按鈕
    Interaction實作 30 minute(s)
  17. 17
    常見攻擊與防護
    SQL 注入、XSS、CSRF,以及金鑰與除錯模式
    Interaction實作 35 minute(s)
  18. 18
    專案結構與自動測試
    應用程式工廠、藍圖、設定檔與 pytest
    Interaction實作 35 minute(s)
  19. 19
    部署上線
    requirements、環境變數、Gunicorn、Nginx 與 HTTPS
    Interaction實作導覽 30 minute(s)
  20. 20
    專題:小型課程討論區
    把路由、模板、資料庫、API、登入與權限組成一個網站
    Interaction實作 45 minute(s)