作者grapherd (GrD)
看板Python
標題[問題] 關於 web 開發的觀念問題
時間Sat Apr 13 14:27:57 2013
大家好
上次在 taipei.py 聽到 bottle.py 後
想要用 python 練習 web application 開發
但之前沒有接觸太多這一塊的東西,
希望可以了解這個領域的基本觀念,不知道要從那邊下手 (書籍,網站,tutorial ...etc)
像是 web framework 與 template 的關係,
還有上次有提到的 gevent, 為什麼 web framework 自己就可以 run 了,
還需要再外掛到 gevent 上面?
thanks!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 1.170.2.47
1F:→ qwertmn:看樣子你之前沒開發過web application 0.0 04/13 14:47
2F:→ qwertmn:基本上我大多都直接去官方看.. 看不懂再google .. 04/13 14:49
3F:→ qwertmn:看你想學哪一套就看哪個官方0.0 04/13 14:50
4F:→ qwertmn:gevent,就我個人了解..他把網路部分用非同步實做.. 04/13 14:52
5F:→ qwertmn:所以能更有效的利用server 的效能~ 04/13 14:53
6F:→ qwertmn:不過你還是先挑款framwork 來跟者官方跑一次吧0.0 04/13 14:58
7F:→ grapherd:跑完兩個flask的tutorial,目前比較ok了.. 04/13 22:41
8F:→ grapherd:請問一下像是jinja2的template是要手刻出來嗎? 04/13 22:42
9F:→ qwertmn:template當然是要依照規則自己刻阿~誰知道你想要怎樣的板? 04/13 23:23
10F:→ ck574b027:大概是問能不能像html拖拉元件就作出模樣來吧? 04/13 23:52
11F:→ grapherd:我以為是要在 jinja2 裏面構造 template...... 04/15 19:29
12F:→ grapherd:如果最後要佈署web app的話,port的地方要如何處理呢? 04/15 19:30
14F:→ uranusjr:無法, 因為一般 browser 就是會去問 80, 這是公認的約定 04/15 20:51
15F:→ qwertmn:請愛用proxy.. 04/15 21:51
16F:→ qwertmn:template別想太複雜, 他只是把資料和html結合而已.. 04/15 22:00
17F:→ qwertmn:把他想成 string format 就好了= = 04/15 22:01
18F:→ grapherd:也是, 不過是可編程的string format ww 04/15 22:55
19F:→ grapherd:像這種 flask.pocoo.org, www.pocoo.org放在同一個網域下 04/15 22:57
20F:→ grapherd:只差在www跟flask的話,是要設定哪個部份呢?proxy還是dns 04/15 22:58
21F:→ qwertmn:這算不同網域巴~ 如果你說的是放在同一台機器底下的話.. 04/16 04:08
22F:→ qwertmn:本來wsgi 就要用proxy來接了..不同domain接不同的wsgi就好 04/16 04:10
23F:→ qwertmn:或者是你已經申請好pocoo.org的二級網域~想要加www & flas 04/16 04:12
24F:→ qwertmn:k 這樣當然就是改dns設定了(你自己架的話)~ 04/16 04:13