【正文】
sends to you as the result. (Of course, if the client has more intelligence via Java or a scripting language, the raw data can be sent and formatted at the client end, which will be faster and less load on the server.) Or you might want to register your name in a database when you join a group or place an order, which will involve changes to that database. These database requests must be processed via some code on the server side, which is generally referred to as serverside programming. Traditionally, serverside programming has been performed using Perl, Python, C++, or some other language, to create CGI programs, but more sophisticated systems have been appearing. These include Javabased Web servers that allow you to perform all your serverside programming in Java by writing what are called servlets. Servlets and their offspring, JSPs, are two of the most pelling reasons that panies who develop Web sites are moving to Java, especially because they eliminate the problems of dealing with differentlyabled browsers (these topics are covered in Thinking in Enterprise Java) Online shopping Online shopping is the process whereby consumers directly buy goods or services from a seller in realtime, without an intermediary service, over the Inter. It is a form of electronic merce. An online shop, eshop, estore, inter shop, webshop, webstore, online store, or virtual store evokes the physical analogy of buying products or services at a bricksandmortar retailer or in a shopping mall. The process is called BusinesstoConsumer (B2C) online shopping. When a business buys from another business it is called BusinesstoBusiness (B2B) online shopping. History In 1990 Tim BernersLee created the first World Wide Web server and browser. It opened for mercial use in 1991. In 1994 other advances took place, such as online banking and the opening of an online pizza shop by Pizza Hut. During that same year, Netscape introduced SSL encryption of data transferred online, which has bee essential for secure online shopping. Also in 1994 the German pany Intershop introduced its first online shopping system. In 1995 Amazon launched its online shopping site, and in 1996 eBay appeared. Customers In recent years, online shopping has bee popular。 however, it still caters to the middle and upper class. In order to shop online, one must be able to have access to a puter, a bank account and a debit card. Shopping has evolved with the growth of technology. According to research found in the Journal of Electronic Commerce, if one focuses on the demographic characteristics of the inhome shopper, in general, the higher the level of education, ine, and occupation of the head of the household, the more favourable the perception of nonstore shopping. Online shopping widened the target audience to men and women of the middle class. At first, the main users of online shopping were young men with a high level of ine and a university education. This profile is changing. For example, in USA in the early years of Inter there were very few women users, but by 2020 women were % of the online population. Payment Online shoppers monly use credit card to make payments, however some systems enable users to create accounts and pay by alternative means, such as: ? Billing to mobile phones and landlines ? Cash on delivery (., offered by very few online stores) ? Check ? Debit card ? Direct debit in some countries ? Electronic money of various types ? Gift cards ? Postal money order ? Wire transfer/delivery on payment Design Why does electronic shopping exist? For customers it is not only because of the high level of convenience, but also because of the broader selection。 petitive pricing and greater access to information. For anizations it increases their customer value and the building of sustainable capabilities, next to the increased profits. 中文翻譯 Java 和因特網(wǎng) 既然 Java 不過另一種類型的程序設(shè)計(jì)語言,大家可能會奇怪它為什么值得如此重視,為什么還有這么多的人認(rèn)為它是計(jì)算機(jī)程序設(shè)計(jì)的一個里程碑呢?如果您來自一個傳統(tǒng)的程序設(shè)計(jì)背景,那么答案在剛開始的時候并不是很明顯。 Java 除了可解決傳統(tǒng)的程序設(shè)計(jì)問題以外,還能解決 World Wide Web(萬維網(wǎng))上的編程問題。 什么是 Web? Web 這個詞剛開始顯得有些泛泛,似乎 “ 沖浪 ” 、 “ 網(wǎng)上存在 ” 以及 “ 主頁 ” 等等都和它拉上了一些關(guān)系。甚至還有一種 “Inter 綜合癥 ” 的說法,對許多人狂熱的上網(wǎng)行為提出了質(zhì)疑。我們在這里有必 要作一些深入的探討,但在這之前,必須理解客戶機(jī)/服務(wù)器系統(tǒng)的概念,這是充斥著許多令人迷惑的問題的又一個計(jì)算領(lǐng)域。 /服務(wù)器計(jì)算 客戶機(jī)/服務(wù)器系統(tǒng)的基本思想是我們能在一個統(tǒng)一的地方集中存放信息資源。一般將數(shù)據(jù)集中保存在某個數(shù)據(jù)庫中,根據(jù)其他人或者機(jī)器的請求將信息投遞給對方??蛻魴C(jī)/服務(wù)器概述的一個關(guān)鍵在于信息是 “ 集中存放 ” 的。所以我們能方便地更改信息,然后將修改過的信息發(fā)放給信息的消費(fèi)者。將各種元素集中到一起,信息倉庫、用于投遞信息的軟件以及信息及軟件所在的那臺機(jī)器,它們聯(lián)合起來便叫作 “ 服務(wù)器 ” ( Server)。而對那些駐留在遠(yuǎn)程機(jī)器上的軟件,它們需要與服務(wù)器通信,取回信息,進(jìn)行適當(dāng)?shù)奶幚?,然后在遠(yuǎn)程機(jī)器上顯示出來,這些就叫作 “ 客戶 ” ( Client)。 這樣看來,客戶機(jī)/服務(wù)器的基本概念并不復(fù)雜。這里要注意的一個主要問題是單個服務(wù)器需要同時向多個客戶提供服務(wù)。在這一機(jī)制中,通常少不了一套數(shù)據(jù)庫管理系統(tǒng),使設(shè)計(jì)人員能將數(shù)據(jù)布局封裝到表格中,以獲得最優(yōu)的使用。除此以外,系統(tǒng)經(jīng)常允許客戶將新信息插入一個服務(wù)器。這意味著必須確??蛻舻男聰?shù)據(jù)不會與其他客戶的新數(shù)據(jù)沖突,或者說需要保證那些數(shù)據(jù)在加入數(shù)據(jù)庫的時 候不會丟失(用數(shù)據(jù)庫的術(shù)語來說,這叫作 “ 事務(wù)處理 ” )??蛻糗浖l(fā)生了改變之后,它們必須在客戶機(jī)器上構(gòu)建、調(diào)試以及安裝。所有這些會使問題變得比我們一般想象的復(fù)雜得多。另外,對多種類型的計(jì)算機(jī)和操作系統(tǒng)的支持也是一個大問題。最后,性能的問題顯得尤為重要:可能會有數(shù)百個客戶同時向服務(wù)器發(fā)出請求。所以任何微小的延誤都是不能忽視的。為盡可能緩解潛伏的問題,程序員需要謹(jǐn)慎地分散任務(wù)的處理負(fù)擔(dān)。一般可以考慮讓客戶機(jī)負(fù)擔(dān)部分處理任務(wù),但有時亦可分派給服務(wù)器所在地的其他機(jī)器,那些機(jī)器亦叫作 “ 中間件 ” (中間件也用于改進(jìn)對系統(tǒng)的 維護(hù))。 所以在具體實(shí)現(xiàn)的時候,其他人發(fā)布信息這樣一個簡單的概念可能變得異常復(fù)雜。有時甚至?xí)谷水a(chǎn)生完全無從著手的感覺。客戶機(jī)/服務(wù)器的概念在這時就可以大顯身手了。事實(shí)上,大約有一半的程序設(shè)計(jì)活動都可以采用客戶機(jī)/服務(wù)器的結(jié)構(gòu)。這種系統(tǒng)可負(fù)責(zé)從處理訂單及信用卡交易,一直到發(fā)布各類數(shù)據(jù)的方方面面的任務(wù) —— 股票市場、科學(xué)研究、政府運(yùn)作等等。在過去,我們一般為單獨(dú)的問題采取單獨(dú)的解決方案;每次都要設(shè)計(jì)一套新方案。這些方案無論創(chuàng)建還是使用都比較困難,用戶每次都要學(xué)習(xí)和適應(yīng)新界面??蛻魴C(jī)/服務(wù)器問題需要從根本上加以變 革! Web 實(shí)際就是一套規(guī)模巨大的客戶機(jī)/服務(wù)器系統(tǒng)。但它的情況要復(fù)雜一些,因?yàn)樗蟹?wù)器和客戶都同時存在于單個網(wǎng)絡(luò)上面。但我們沒必要了解更進(jìn)一步的細(xì)節(jié),因?yàn)槲ㄒ灰P(guān)心的就是一次建立同一個服務(wù)器的連接,并同它打交道(即使可能要在全世界的范圍內(nèi)搜索正確的服務(wù)器)。 最開始的時候,這是一個簡單的單向操作過程。我們向一個服務(wù)器發(fā)出請求,它向我們回傳一個文件,由于本機(jī)的瀏覽器軟件(亦即 “ 客戶 ” 或 “ 客戶程序 ” )負(fù)責(zé)解釋和格式化,并在我們面前的屏幕上正確地顯示出來。但人們不久就不滿足于只 從一個服務(wù)器傳遞網(wǎng)頁。他們希望獲得完全的客戶機(jī)/服務(wù)器能力,使客戶(程序)也能反饋一些信息到服務(wù)器。比如希望對服務(wù)器上的數(shù)據(jù)庫進(jìn)行檢索,向服務(wù)器添加新信息,或者下一份訂單等等(這也提供了比以前的系統(tǒng)更高的安全要求)。在 Web 的發(fā)展過程中,我們可以很清晰地看出這些令人心喜的變化。 Web 瀏覽器的發(fā)展終于邁出了重要的一步:某個信息可在任何類型的計(jì)算機(jī)上顯示出來,毋需任何改動。然而,瀏覽器仍然顯得很原始,在用戶迅速增多的要求面前顯得有些力不從心。