2007年12月31日 星期一

Lab Movie Player by AJAX

1. Go to Laszlo and enter (Laszlo in 10 minutes).
2. Study and play around the "scripting" and "video" examples.
3. Use this script to control movie playing.
4. If you push the "pause" button, the movie pauses.
5. If you push the "resume" button, the movie resumes.


2007年12月17日 星期一

Homework 12-10-2007

1. List three ways of creating interactive webpages.

CGI、Java script、Nvu

Lab DOM and JavaScript

程式碼



九九乘法表

Lab Create Img using DOM

1.打開網頁直接顯示圖片



程式碼



3.按下按鈕後顯示圖片



程式碼

2007年12月3日 星期一

lab 19: XSLT Part II

1. Register and Download Xray, an XML, XSLT editor and processor.

2. Given the
Listing 1. An XML document representing the results of a soccer tournament
Listing 2. A basic style sheet for the soccer results

一個存xml,一個存xslt



會有這樣的結果






use the XSLT as in the Listing 2 to transform the XML file as in the Listing 1.

3. View the formatted HTML file.
4. Given the
Listing 1. An XML document representing the results of a soccer tournament
Listing 3. A style sheet that computes team standings

compute the team standings in a table.


將上面兩個一個存xml,第二個存xslt




結果





5. View the formatted HTML file.

lab 20: XSLT Part III

1. Given the RSS of Yam News, write an XSLT file
and use Xray to generate an HTML that contains the titles of items in the RSS.

2. View the formatted HTML file.





lab 18: Lab XML & XSLT

1. Register and Download Xray, an XML, XSLT editor and processor.

2. Given the the XML file and XSLT file ,
use Xray to do the transformation of the XML into HTML.
You have to replace [ with <.

3. View the formatted HTML file.


Homework 11-26-2007

1. Problem 1 & Problem 3 of Textbook on Page 55.

試解釋WEB技術演進是要解決什麼樣的問題?

相較以往在Server上產生HTML並回傳至瀏覽器,任何畫面皆利用瀏覽器本身或附加的功能來產生。形同於借用了Client Side CPU的運算資源,減少Server成本。使用者感受到的互動性與回應速度皆有大幅的提升。
由於Server並不是每次都回傳複雜龐大的HTML,而是利用XML或JSON傳輸資料的部分,使用的頻寬也相對變小。
Server Side除了使用傳統XML Web Service,更可以採用REST,讓Client的應用程式可以更快速掌握資料的新增修改刪除(CRUD)並簡化呼叫的服務URL。
能夠快速Mashup其他的Web應用程式資源,又能擁有高速的執行效能。

3.程序(PROCESS)害執行緒(THREAD)對網站性能有什麼不同的影響?
Program: 一群程式碼的集合,用以解決特定的問題。以物件導向的觀念來類比,相當於Class。 Process:由Program所產生的執行個體,一個Program可以同時執行多次,產生多個Process。以物件導向的觀念來類比,相當於 Object。每一個Process又由以下兩個東西組成 一個Memory Space。相當於Object的variable,不同Process的Memory Space也不同,彼此看不到對方的Memory Space。
程序(Process)
用在Web系統演進的第二時期,當使用者增多時,由於耗費過多系統資源會導致網站速度明顯下降。
執行緒(Thread)
用在Web系統演進的第三時期,取代了程序,而使用常駐的服務(Service\Daemon),此程式會一直留在系統內,除非關機,否則會一直做服務。當人多時Thread就會變多;人少時,Thread就會減少,故不會耗費系統資源而導致網站速度下降。


2. What does a CGI output contain in the HTTP header? Hint: Such as Content-type

計數器、和近來頗盛行的網頁遊戲如travian

3. If you want to upload an mp3 file, should you use the GET or POST method? Why?

Get是從輸入網址端的服務器上獲得資料。Post則用來對伺服器發布資料。上傳檔案室對伺服器發送數據資料,應該用post。

Lab 17: Form and Action, Part II

Hand code a HTML or use Nvu to edit an HTML so that the webpage can send a request to Google like
http://maps.google.com/maps?q=24.9586,+121.24114

Use Form CGI that includes action, input, and submit.
Try a few different coordinates.

1.插入按鍵



2.插入文字欄位



3.輸入表單連結




4.最後按下儲存




5.開啟剛剛儲存的網頁



6.輸入經緯度就可以出現地圖