計算機外文資料翻譯_第1頁
計算機外文資料翻譯_第2頁
計算機外文資料翻譯_第3頁
計算機外文資料翻譯_第4頁
計算機外文資料翻譯_第5頁
已閱讀5頁,還剩8頁未讀 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

1、.畢業(yè)設計(論文)外文資料翻譯院 系計算機科學與工程學院專業(yè)計算機科學與技術學生姓名班級學號外文出處Russ Basiura,Mike BatongbacalProfessional ASP.NET Web ServicesMatt WeisfeldThe Object-Oriented Thought ProcessJeffrey PutzMaximizing ASP.NET:Real World,Object-Oriented Development附件:1.外文資料翻譯譯文; 2.外文資料原文;指導教師評語:指導教師簽名:年月日附件1:外文資料翻譯譯文1 利用面向對象實現(xiàn)設計一般來說,一

2、個可靠的面向對象的數(shù)額及過程往往包含以下步驟:(1)完成適當?shù)姆治觯?2)建立一份描述系統(tǒng)的工作陳述;(3)從上述的工作陳述中收集需求;(4)開發(fā)一個用戶界面模型;(5)明確類;(6)確定各個類的職責;(7)確定各個類是如何相互交互的;(8)創(chuàng)建一個工程模型來描述要構建的系統(tǒng);系統(tǒng)(或對象模型)由類圖和類交互構成。這個模型應當真實地表示系統(tǒng),而且要易于理解和修改。2 類到底是什么簡而言之,類似對象的一個藍圖。當你在實例化一個對象時,就是使用一個類作為構建這個對象的基礎。實際上,解釋類和對象時確實存在“先有雞還是先有蛋”的問題。要描述類很難不使用對象這個詞,反過來,描述對象時又少不了類。例如,一

3、輛自行車是一個對象。不過,必須有人創(chuàng)建了自行車的藍圖(也就是類)。在面向對象的軟件設計中就不存在這樣的問題,我們確實知道哪一個在前應該是先有類。如果沒有類,對象就無法實例化。要解釋類和方法,即一個關系數(shù)據(jù)庫領域的例子會很有幫助的。在一個數(shù)據(jù)庫表中,表的自身的定義(字段、描述和所用的數(shù)據(jù)類型)就是一個類(元數(shù)據(jù)),對象則是表中的行(數(shù)據(jù))。3 建立用戶界面模型作為面向對象設計過程的最后一步,必須創(chuàng)建用戶界面的一個原型。這個原型將提供很有價值的信息來幫助指導迭代完成設計過程。在Object-Oriented Design in Java一書中,Gilbert和McCarty就曾指出“對于一個系統(tǒng)用

4、戶來說,用戶界面就是系統(tǒng)”。這種說法非常貼切。創(chuàng)建用戶界面原型有很多不同的方法??梢栽诩埳匣蛘咴诎装迳袭嫵鲇脩艚缑?,可以使用一種專門的原型工具甚至一個語言環(huán)境(如Visual Basic,它常用于建立快速模型),也可以使用你最喜歡的開發(fā)工具的集成開發(fā)環(huán)境來創(chuàng)建原型。不論你用哪種方式來開發(fā)用戶模型界面,都需要確保用戶能夠對界面的外觀做最后的評判。4 繼承面向對象程序設計中最強大的一個特性可能是代碼的重用。結構化設計在某種程度上提供了代碼重用你可以編寫 一個過程,然后根據(jù)需要使用多次。然而,面向對象設計者更進一步,允許通過組織類并且抽取各個類之間的共性來定義類之間的關系,這不僅有利于代碼的重用,而

5、且還可以實現(xiàn)過了更好的整體設計。集成是體重這種功能的一個主要途徑。繼承允許類繼承另一個類的屬性和方法。這就允許通過抽取共同的屬性和方法來創(chuàng)建全新的類。5 使用對象持久性對象持久性也還是許多面向對象系統(tǒng)必須解決的一個問題。持久性概念是指維護對象的狀態(tài)。運行程序是,如果沒有以某種方式保存對象,對象就會死亡,永遠不能恢復。這些臨時性對象在某些應用中可能適用,但是在大多數(shù)商業(yè)系統(tǒng)中,必須保存對象的狀態(tài)以備以后使用??梢酝ㄟ^將對象串行化并寫至一個平面文件來持久保存對象,這是最簡單的方法。現(xiàn)在的最新技術是基于XML的。盡管從理論上來講,對象只要沒有被撤銷就能在內存中持久保存,但是我們所要強調的是將持久對象

6、保存到某種存儲設備上??梢钥紤]以下3種主要的存儲設備。.平面文件系統(tǒng)可以通過串行化對象來將對象保存在一個平面文件中。這種用法很有限。.關系數(shù)據(jù)庫必須使用某種中間件將對象轉化為關系模型。.面向對象數(shù)據(jù)庫這是保證對象持久性最合理的方法,但是大多數(shù)公司都已經(jīng)將數(shù)據(jù)存儲在遺留系統(tǒng)中,而且只是剛開始研究對象數(shù)據(jù)庫。通常,及時是全新的面向對象應用也必須與遺留數(shù)據(jù)交互。6 什么是UML?顧名思義,UML是一種建模語言。UML用戶指南將UML定義為“一種用戶可視化表示、指定、構造和描述軟件密集系統(tǒng)中部件的圖形化語言”。UML為編寫系統(tǒng)藍圖提供了一種標準方法。簡單的說,UML提供了一種以圖形化方式表示和管理面向

7、對象軟件系統(tǒng)的發(fā)那個發(fā)。它不僅是系統(tǒng)設計的表示,而且是一種有助于完成系統(tǒng)設計的工具。7 ASP.NET 概述ASP.NET 是一個統(tǒng)一的 Web 開發(fā)模型,它包括您使用盡可能少的代碼生成企業(yè)級 Web 應用程序所必需的各種服務。ASP.NET 作為 .NET Framework 的一部分提供。當您編寫 ASP.NET 應用程序的代碼時,可以訪問 .NET Framework 中的類。您可以使用與公共語言運行庫 (CLR) 兼容的任何語言來編寫應用程序的代碼,這些語言包括 Microsoft Visual Basic、C#、JScript .NET 和 J#。使用這些語言,可以開發(fā)利用公共語言運

8、行庫、類型安全、繼承等方面的優(yōu)點的 ASP.NET 應用程序。8 Web服務也是一種對象Web服務通過使用XML來提供一種與平臺無關的數(shù)據(jù)交換方式。而簡單對象訪問協(xié)議(SOAP)這是作為一種標準來序列化和傳遞對象數(shù)據(jù)。ASP.NET致力于讓程序員和XML分離,以便使他們能夠用自己熟知的面向對象的設計理念來實現(xiàn)所需的功能。雖然你可以用面向對象的設計方式來模擬Web服務的設計,但是我們應該盡量把Web服務看成數(shù)據(jù)交換的一個終端,類似于你調用本地類的靜態(tài)方法,你也可以在容器類里包裝數(shù)據(jù)。但是你要充分考慮到這種Web服務設計帶來的性能影響,并且這種設計的伸縮性也不好。在VS中使用Web服務僅僅需要給W

9、eb服務添加應用。在一個Web項目里,Web服務的應用是動態(tài)生成的,而在類庫項目里這是創(chuàng)建了一個物理代理類。在這兩種情況下,你都能對這些對象進行編程,就好象這些對象是位于你本地系統(tǒng)一樣,這樣說帶來的好處就是不需要關注數(shù)據(jù)是怎么與遠程系統(tǒng)進行交換的。9 IIS和WEB應用程序的具體細節(jié)IIS(Internet Information Services)是Windows操作系統(tǒng)的組成部分之一,它服務與對Web站點的請求。IIS管理器用樹形結構顯示W(wǎng)eb站點的集群,每個站點都被設置成通過IP地址,端口,和一個主機頭接受請求。其中主機頭使得一個IP地址,根據(jù)不同的域名,能訪問多個站點。當一個HTTP請

10、求達到服務器是,IIS根據(jù)請求的文件的擴展名判斷由哪個應用程序來處理請求,如果沒有找到匹配的擴展名,被請求的文件將不經(jīng)過任何處理直接發(fā)送給客戶端。IIS首先獲取請求并判斷由哪一個ISAPI(網(wǎng)絡服務應用程序接口)程序來處理。以ASP.NET為例,它將請求交由aspnet_isapi.dll處理。ASP.NET把以多個不同物理文件形式存在的頁面編譯成一個程序集并緩存起來供其他請求使用。在多種可能的編碼模型中,inline編碼和code-beside是最簡單也是最實用的代碼編寫及維護形式。由發(fā)布程序執(zhí)行的預編譯可以通過隱藏代碼、預先檢查錯誤和防止在第一次請求是執(zhí)行編譯等方式來緩解部署應用程序的壓力

11、。10 測試、測試、再測試以我個人的觀點來看,測試在了解需求階段就已經(jīng)考試了。任何開發(fā)人員在Visual Studio里面敲入“Public Class”之前,就必須對你的軟件所要實現(xiàn)的功能有一個非常清晰的認識,這就要求每一個項目相關人員(最終用戶、業(yè)務專家、數(shù)據(jù)庫管理員、硬件人員等)都必須介入到軟件的開發(fā)過程中,這些人員必須參與開發(fā)的整個過程。把開發(fā)看成一個漸進的過程要比你在項目一開始的時候就確定你將要交付給客戶的一個什么樣的產(chǎn)品容易得多。如果使用測試驅動的開發(fā)方法,在實際編碼前應先寫好相應的測試代碼。一般來說,這些測試的代碼應該盡量以能夠讓需求分析員(也許就是你自己)能讀懂這些代碼并測試這

12、些代碼實都能夠滿足預期的使用目的。 測試是伴隨整個開發(fā)過程的,如果一個或多個測試失敗,您將不得不修改自己的代碼來確保測試順利通過,而絕不是等寫完了所有代碼之后才去測試。所有代碼接近完工的時候,你的傳統(tǒng)測試就可以開始了,這個時候你可以讓測試人員去檢查那些用戶接口部分還有哪些不合理的地方(可以使用類似ACT的自動化工具)。因為在整個開發(fā)過程中,你一直在測試,所以這個時候系統(tǒng)底層的業(yè)務邏輯應該已經(jīng)可以很好的工作。從項目的理想到軟件的最終發(fā)布,你的項目的所有相關人員都必須參與到開發(fā)的整個過程中一確保你的軟件能夠滿足預期的使用需求。十一 訪問關系數(shù)據(jù)庫所有數(shù)據(jù)庫應用都有以下結構:.數(shù)據(jù)庫客戶.數(shù)據(jù)庫服務

13、器.數(shù)據(jù)庫數(shù)據(jù)庫客戶是為系統(tǒng)提供界面的用戶應用。通常這是一個GUI應用,允許用戶查詢和更新數(shù)據(jù)庫。SQLSQL是指結構化查詢語言(Structured Query Language)。只是數(shù)據(jù)庫客戶與實現(xiàn)了這個標準的不同廠商的數(shù)據(jù)庫系統(tǒng)哦你之間進行通信所采用的一種標準方法。數(shù)據(jù)庫客戶要通過SQL語句與數(shù)據(jù)庫服務器進行通信。圖12-5顯示了數(shù)據(jù)庫客戶/服務器模型的一般解決方案。用戶數(shù)據(jù)庫客戶數(shù)據(jù)庫服務器數(shù)據(jù)庫SQL驅動程序附件2:外文原文1 Designing with ObjectsGenerally, a solid OO design process will generally incl

14、ude the following steps:1. Doing the proper analysis2. Developing a statement of work that describes the system3. Gathering the requirements from this statement of work4. Developing a prototype for the user interface5. Identifying the classes6. Determining the responsibilities of each class7. Determ

15、ining how the various classes interact with each other8. Creating a high-level model that describes the system to be builtThe system, or object model, is made up of class diagrams and class interactions.This model should represent the system faithfully and be easy to understand and modify.2 What Exa

16、ctly Is a Class?In short, a class is a blueprint for an object.When you instantiate an object, you use a class as the basis for how the object is built. In fact, trying to explain classes and objects is really a chicken-and-egg dilemma. It is difficult to describe a class without using the term obje

17、ct and visa versa. For example, a specific individual bike is an object. However, someone had to have created the blueprints (that is, the class) to build the bike. In OO software, unlike the chicken-and-egg dilemma,we do know what comes firstthe class.An object cannot be instantiated without a clas

18、s.To explain classes and methods, its helpful to use an example from the relational database world. In a database table, the definition of the table itself (fields, description, and data types used) would be a class (metadata), and the objects would be the rows of the table (data).3 Prototyping the

19、User InterfaceAs our final step in the OO design process,we must create a prototype of our user interface.This prototype will provide invaluable information to help navigate through the iterations of the design process.As Gilbert and McCarty in Object-Oriented Design in Java aptly point out,“to a sy

20、stem user, the user interface is the system.”There are several ways to create a user interface prototype.You can sketch the user interface by simply drawing it on paper or a whiteboard.You can use a special prototyping tool or even a language environment like Visual Basic, which is often used for ra

21、pid prototyping. Or you can use the IDE from your favorite development tool to create the prototype.However you develop the user interface prototype, make sure that the users have the final say on the look and feel.4 InheritanceOne of the most powerful features of OO programming is, perhaps, code re

22、use. Structured design provides code reuse to a certain extentyou can write a procedure and then use it as many times as you want. However, OO design goes an important step further, allowing you to define relationships between classes that facilitate not only code reuse, but also better overall desi

23、gn, by organizing classes and factoring in commonalties of various classes. Inheritance is a primary means of providing this functionality. Inheritance allows a class to inherit the attributes and methods of another class.This allows creation of brand new classes by abstracting out common attributes

24、 and behaviors.One of the major design issues in OO programming is to factor out commonality of the various classes.5 Using Object PersistenceObject persistence is another issue that must be addressed in many OO systems. Persistence is the concept of maintaining the state of an object.When you run a

25、 program, if you dont save the object in some manner, the object simply dies, never to be recovered.These transient objects might work in some applications, but in most business systems, the state of the object must be saved for later use.In its simplest form, an object can persist by being serializ

26、ed and written to a flat file.The state-of-the-art technology is now XML-based.Although it is true that an object theoretically can persist in memory as long as it is not destroyed,we will concentrate on storing persistent objects on some sort of storage device.There are three primary storage device

27、s to consider:. Flat file systemYou can store an object in a flat file by serializing the object.This has very limited use. Relational databaseSome sort of middleware is necessary to convert an object to a relational model.OO databaseThis is the logical way to make objects persistent, but most compa

28、nies have all their data in legacy systems and are just starting to explore object databases. Even brand-new OO applications must usually interface with legacy data.6 What Is UML?UML, as its name implies, is a modeling language.The UML User Guide defines UML as “a graphical language for visualizing,

29、 specifying, constructing and documenting the artifacts of a software-intensive system.”UML gives you a standard way to write the systems blueprints. In a nutshell,UML offers a way to graphically represent and manipulate an object-oriented (OO) software system. It is not only the representation of t

30、he design of a system, but a tool to assist in this design.7 ASP.NET OverviewASP.NET is a unified Web development model that includes the services necessary for you to build enterprise-class Web applications with a minimum of coding. ASP.NET is part of the .NET Framework, and when coding ASP.NET app

31、lications you have access to classes in the .NET Framework. You can code your applications in any language compatible with the common language runtime (CLR), including Microsoft Visual Basic, C#, JScript .NET, and J#. These languages enable you to develop ASP.NET applications that benefit from

32、the common language runtime, type safety, inheritance, and so on.8 Web Services as ObjectsWeb services provide a platform-neutral means of exchanging data between two systems over the Web using XML. Simple Object Access Protocol (SOAP) is a standard used to serialize and transfer object data between

33、 these systems. ASP.NET goes a long way to isolate programmers from the actual XML and allows them to concentrate on the implementation in the familiar realm of object-oriented code.Although it's possible to simulate full object orientation in the design of Web services, consideration should be

34、given to make them act as endpoints for the exchange of data, similarly to the way you'd call a static method from a local class. You can also package data in container classes. It's important to consider the performance implications of a Web service that needs to make many calls back and fo

35、rth to arrive at an end result, as this kind of solution would not scale well.Consuming a Web service from Visual Studio 2005 requires little more than adding a reference to the Web service. In a Web project, this reference is created dynamically, while a class library creates a physical proxy class

36、. In both scenarios, you can code against these objects as if they were locally in your own system, releasing you from the details of how the data is exchanged with the remote system.9 The Nuts and Bolts of IIS and Web ApplicationsInternet Information Services is the part of the Windows operating sy

37、stem that services requests to your Web site. The IIS Manager shows a tree of sites grouped under the Web Sites group. Each site is set to take requests by IP address, port (normally port 80), and a host header value, which allows one IP to be used for several sites.When an HTTP request arrives at t

38、he machine, IIS determines which application will handle the request based on the file extension of the request. If no matching extension is found, the requested file is served straight, the file is served without any processing. These applications that handle the various file types are known as ISA

39、PI applications (Internet Server Application Program Interface).IIS first gets the request and figures out which ISAPI program will process the page. In the case of ASP.NET, it makes its way to aspnet_isapi.dll and is processed.ASP.NET compiles pages in one of several different physical file schemes

40、 and caches that code for execution in other requests. Of the different schemes possible, inline code and code-beside are the easiest and most practical means of writing and maintaining code.The pre-compilation performed by the publishing utility can ease deployment by hiding your code, checking for

41、 errors, and avoiding the first-run compilation process on the first request.10 Test, Test, and Retest with All StakeholdersIn my frequently less-than-humble opinion, testing actually begins with the development of specifications and requirements. Before any developer types "public class"

42、in Visual Studio, an extensive discovery process must take place to flesh out exactly what your application is supposed to do. This requires involvement from every stakeholder in the process. End-users, subject matter experts (generally the "business people"), DBAs, hardware peopleeveryone

43、. What's more, these people should stay involved throughout the entire process. It's easier to view development as an evolutionary process than getting a sign-off at the start of the project and delivering what you think they wanted.Using test-driven development (TDD) principles (more on tha

44、t in a moment), you'll write tests before the actual code. These tests are frequently simple enough that requirements analysts (yeah, that might be the same person as you) can read the code to understand what's going on and determine whether they match the stated goals or use cases of the ap

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
  • 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評論

0/150

提交評論