ทำตาม concept web เดิมของ django โดยใช้ nodejs express+sequelize(orm)
สรุป runserver
[nodejs] : runserver (commit 8-19)
เนื้อหาอธิบายใน BLOG
Commit 8 : Commit 8 Nodejs wordbucket blog
Commit 9 : Commit 9 Nodejs wordbucket blog
Commit 10 : Commit 10 Nodejs wordbucket blog
Commit 11 : Commit 11 Nodejs wordbucket blog
Commit 12 : Commit 12 Nodejs wordbucket blog
Commit 13 : Commit 13 Nodejs wordbucket blog
Commit 14 : Commit 14 Nodejs wordbucket blog
Commit 15 : Commit 15 Nodejs wordbucket blog
Commit 15(ต่อ) : Commit 15 Nodejs wordbucket blog (ต่อ)
Commit 16 : Commit 16 Nodejs wordbucket blog
Commit 17 : Commit 17 Nodejs wordbucket blog
Commit 18 : Commit 18 Nodejs wordbucket blog
Commit 19 : Commit 19 Nodejs wordbucket blog
LINK GITHUB EACH COMMIT
Commit 8 : install sequelize and sequelize-cli
Commit 9 : create sqlite3 database word and explanation table
Commit 10 : can add word to database
Commit 11 : can add word with explanation
Commit 12 : can add explanation in word view page
Commit 13 : first functional test and unit test try
Commit 14 : Add search function and produce the test until the current function
Commit 15 : add like, dislike, add new explanation to duplicate word on home page function
Commit 15(ต่อ) : add like, dislike, add new explanation to duplicate word on home page function (ต่อ)
Commit 16 : add browse function
Commit 17 : add export function
Commit 18 : add import function
Commit 19 : fix duplicate word and explanation in add_word, add_explanation, import_csv
[nodejs] : runserver (commit 8-19)
เนื้อหาอธิบายใน BLOG
Commit 8 : Commit 8 Nodejs wordbucket blog
Commit 9 : Commit 9 Nodejs wordbucket blog
Commit 10 : Commit 10 Nodejs wordbucket blog
Commit 11 : Commit 11 Nodejs wordbucket blog
Commit 12 : Commit 12 Nodejs wordbucket blog
Commit 13 : Commit 13 Nodejs wordbucket blog
Commit 14 : Commit 14 Nodejs wordbucket blog
Commit 15 : Commit 15 Nodejs wordbucket blog
Commit 15(ต่อ) : Commit 15 Nodejs wordbucket blog (ต่อ)
Commit 16 : Commit 16 Nodejs wordbucket blog
Commit 17 : Commit 17 Nodejs wordbucket blog
Commit 18 : Commit 18 Nodejs wordbucket blog
Commit 19 : Commit 19 Nodejs wordbucket blog
LINK GITHUB EACH COMMIT
Commit 8 : install sequelize and sequelize-cli
Commit 9 : create sqlite3 database word and explanation table
Commit 10 : can add word to database
Commit 11 : can add word with explanation
Commit 12 : can add explanation in word view page
Commit 13 : first functional test and unit test try
Commit 14 : Add search function and produce the test until the current function
Commit 15 : add like, dislike, add new explanation to duplicate word on home page function
Commit 15(ต่อ) : add like, dislike, add new explanation to duplicate word on home page function (ต่อ)
Commit 16 : add browse function
Commit 17 : add export function
Commit 18 : add import function
Commit 19 : fix duplicate word and explanation in add_word, add_explanation, import_csv
http://b2-5720128.blogspot.com/2018/04/group-webapp-develop-wordbucket-commit.html
wordbucket
Assignment 1 : My webapp. < WordBucket > by django framework เป็นส่วนหนึ่งของวิชา Software Development Practice II ภาษาที่ไม่มีการนำไปใช้ในชีวิตประจำวันเราเรียกว่า “ภาษาที่ตายแล้ว” ปัจจุบันแต่ละวันที่คำศัพท์เกิดใหม่มากมาย เช่น
- weeb A weeb (/wi b/) is a non-Japanese male who watches and is a fan of CGDCT anime, has a waifu, a waifu pillow and is obsessed with Japan. Credit
- Jagoogala = just google it! ซึ่ง webapp. ที่อยากสร้างคือ word bank ให้ user มาแชร์ และ เก็บคำศัพท์ใหม่ๆที่เกิดขึ้นในปัจจุบัน
Features
- Add word (with description)
- Search (find word)
- Browse (a-z)
- Vote (useful or not)
- login system
- csv import/export
Domain name we thought “https://WordBucket.com/”
Django part
Model
4 classes
- word
- explanation
- like
- dislike
View
- home_page : หน้า home page ของ webapp.
- add_word : เพิ่มคำศัพท์พร้อมคำอธิบาย (ถ้าคำศัพท์ซ้ำจะโชว์ url ของคำศัพท์นั้นๆ เพื่อให้ user เข้าไปเพิ่ม คำอธิบาย ของตัวเองใน คำศัพท์ที่มีอยู่แล้วได้)
- view_word : ดูในแต่คำมีคำอธิบายอะไรบ้าง
- add_explanation : ใส่คำอธิบายเพิ่มในคำๆนั้น
- vote_like : โหวตชอบ only user
- vote_dislike : โหวตไม่ชอบ only user
- search : ค้นหาคำศัพท์
- import and export csv : อัพโหลด/ดาวโหลดไฟล์ csv เข้าสู่/จาก database
URL config
link urls.py ของ project กับ urls.py ของ app. name เหมือนชื่อ function ทุกอัน
- home_page > '' (path)
- add_word > 'add' (path)
- view_word > r'^(\d+)/$' (repath)
- add_explanation > r'^(\d+)/add_explanation$' (re_path)
- vote_like > r'^(\d+)/vote_like$' (re_path)
- vote_dislike > r'^(\d+)/vote_dislike$' (re_path)
- search > r'^search/(.+)$' (re_path)
- import_csv > r'^(\d+)/import$' (re_path)
- export_csv > r'^(\d+)/export$' (re_path)
- signup > r'^signup/$ (re_path)
- login > r'^login/$' (re_path)
- logout > r'^logout/$' (re_path)
Tests
functional test
unit test
now have 7 classes
- HomePageTest
- WordViewTest
- NewWordTest
- NewExplanationTest
- VoteTest
- AllAroundModelsTest
- SearchAndBrowseTest
ไม่มีความคิดเห็น:
แสดงความคิดเห็น