![]() |
使用小工具新增資訊提供 |
2011年12月19日 星期一
2011年12月5日 星期一
Lab 32 Hand code a form
1.So please search the answer and post your opinion in your blog.
CGI的中文名字為『共通閘道介面』,它是一種標準介面程式,能讓你的網頁跟WWW server溝通,達到跟使用者互動的效果。 而且透過CGI程式,可以讓你動態的產生網頁,秀出server上的最新資料。當你link到一個CGI物件時,你取回的文件並非是一份靜態資料, 而是一個藉由程式動態產生的HTML資料流。傳回來的資料也許分分秒秒都在更改,或者針對使用者的特殊查詢而有不同的反應,例如股票市場行情等等。 簡單來說,CGI程式就是能夠動態產生WWW網頁,並讓一般使用者經由WWW取用現存在傳統資訊系統內的資料。
資料是天天更新,你絕對不可能寫一個很大的HTML文件包含所有的這些更新資料。 萬一放在WWW上的資料是分分秒秒都在變動的,那麼利用程式自動根據資料產生HTML文件顯然是你唯一的選擇。 第二,CGI程式可以根據使用者輸入的要求自動產生HTML格式的資料。因為輸入資料是由WWW server負責接收,並非CGI程式本身, 故得找出一個有效率的方法,來做使用者輸入參數和產生HTML文件程式間的溝通工作。 CGI本身制訂的標準有提到可以藉由環境變數來達成這個目的,而且CGI程式也有能力取得現存在各類資料庫裡的資料。 這就是為什麼我們稱之為Common Gateway Interface,因為CGI程式通常就像橋樑或閘道一般,溝通著非WWW系統和WWW server (這和下面所說的Web server、HTTP server是一樣的,都是指一個架有HTTPd的伺服器)。
2.
CGI的中文名字為『共通閘道介面』,它是一種標準介面程式,能讓你的網頁跟WWW server溝通,達到跟使用者互動的效果。 而且透過CGI程式,可以讓你動態的產生網頁,秀出server上的最新資料。當你link到一個CGI物件時,你取回的文件並非是一份靜態資料, 而是一個藉由程式動態產生的HTML資料流。傳回來的資料也許分分秒秒都在更改,或者針對使用者的特殊查詢而有不同的反應,例如股票市場行情等等。 簡單來說,CGI程式就是能夠動態產生WWW網頁,並讓一般使用者經由WWW取用現存在傳統資訊系統內的資料。
資料是天天更新,你絕對不可能寫一個很大的HTML文件包含所有的這些更新資料。 萬一放在WWW上的資料是分分秒秒都在變動的,那麼利用程式自動根據資料產生HTML文件顯然是你唯一的選擇。 第二,CGI程式可以根據使用者輸入的要求自動產生HTML格式的資料。因為輸入資料是由WWW server負責接收,並非CGI程式本身, 故得找出一個有效率的方法,來做使用者輸入參數和產生HTML文件程式間的溝通工作。 CGI本身制訂的標準有提到可以藉由環境變數來達成這個目的,而且CGI程式也有能力取得現存在各類資料庫裡的資料。 這就是為什麼我們稱之為Common Gateway Interface,因為CGI程式通常就像橋樑或閘道一般,溝通著非WWW系統和WWW server (這和下面所說的Web server、HTTP server是一樣的,都是指一個架有HTTPd的伺服器)。
2.
Lab 31 Lab Form and Action
Dynamic pages, content generated by server-side programs.
CGI, Common Gateway Interface, for sending requests to server-side programs.
static page
Ex:
http://www.google.com/
dynamic page
Ex:
http://www.cna.com.tw/
URL that sends a request by CGI
Ex:
http://maps.google.com/maps?q=24.9586,+121.2411
"logic will get you from A to B - imagination will take you anywhere"
How to use Form to invoke a remote service through CGI.
1. Copy the search box of this search page,
inlcuding radio buttons, text input, and submit button.
2. Open your KompoZer HTML editor.
3. Open a new empty HTML file.
4. Paste the search box into this new file.
5. Use KompoZer to add a Form to this search box. Do not hand code the HTML. Just fill the blank in the Form dialog.
6. In the form dialog, set Action="http://google.com/search" and name of Form as "f" and method as "get"
(See Hint if it does not work.)
7. Save your file on your computer. Run your HTML by Firefox. What do you get?
8. Set method as "post"
9. Run your HTML by Firefox. What do you get?
CGI, Common Gateway Interface, for sending requests to server-side programs.
static page
Ex:
http://www.google.com/
dynamic page
Ex:
http://www.cna.com.tw/
URL that sends a request by CGI
Ex:
http://maps.google.com/maps?q=24.9586,+121.2411
"logic will get you from A to B - imagination will take you anywhere"
How to use Form to invoke a remote service through CGI.
1. Copy the search box of this search page,
inlcuding radio buttons, text input, and submit button.
2. Open your KompoZer HTML editor.
3. Open a new empty HTML file.
4. Paste the search box into this new file.
5. Use KompoZer to add a Form to this search box. Do not hand code the HTML. Just fill the blank in the Form dialog.
6. In the form dialog, set Action="http://google.com/search" and name of Form as "f" and method as "get"
(See Hint if it does not work.)
7. Save your file on your computer. Run your HTML by Firefox. What do you get?
8. Set method as "post"
9. Run your HTML by Firefox. What do you get?
2011年11月29日 星期二
Lab 28 Mash-up 2 (Maps)
美感:yungching比較有設計感,讓人覺得比較舒服。
直覺性:housingmap一看就知道哪裡有房子可以買簡單明瞭。
流暢:housingmap因為為google map要換別的地區的時候要拖移需要點時間,而yungching要從大範圍細選下去也需點時間,但大致而言都不會太久。
預期反應:yungching較細緻可以依照所需找到適合您的房子,包括地點、價位...等等。
housingmap就比較簡單,但能依您想住在哪個地方馬上找到房子。
直覺性:housingmap一看就知道哪裡有房子可以買簡單明瞭。
流暢:housingmap因為為google map要換別的地區的時候要拖移需要點時間,而yungching要從大範圍細選下去也需點時間,但大致而言都不會太久。
預期反應:yungching較細緻可以依照所需找到適合您的房子,包括地點、價位...等等。
housingmap就比較簡單,但能依您想住在哪個地方馬上找到房子。
2011年11月21日 星期一
2011年11月8日 星期二
2011年10月31日 星期一
2011年10月24日 星期一
訂閱:
文章 (Atom)