




版權(quán)說(shuō)明:本文檔由用戶(hù)提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、河北科技師范學(xué)院本科畢業(yè)設(shè)計(jì)外文翻譯ASP.NET Overview院(系、部名稱(chēng):數(shù)學(xué)與信息科技學(xué)院專(zhuān)業(yè)名稱(chēng):網(wǎng)絡(luò)工程學(xué)生姓名:張三學(xué)生學(xué)號(hào):0913080104指導(dǎo)教師:張三2011年 11月 21日河北科技師范學(xué)院教務(wù)處制ASP.NET and the .NET FrameworkASP.NET is part of Microsoft's overall .NET framework, which contains a vast set of programming classes designed to satisfy any conceivable programming
2、need. In the following two sections, you learn how ASP.NET fits within the .NET framework, and you learn about the languages you can use in your ASP.NET pages.The .NET Framework Class LibraryImagine that you are Microsoft. Imagine that you have to support multiple programming languagessuch as Visual
3、 Basic, JScript, and C+. A great deal of the functionality of these programming languages overlaps. For example, for each language, you would have to include methods for accessing the file system, working with databases, and manipulating strings.Furthermore, these languages contain similar programmi
4、ng constructs. Every language, for example, can represent loops and conditionals. Even though the syntax of a conditional written in Visual Basic differs from the syntax of a conditional written in C+, the programming function is the same.Finally, most programming languages have similar variable dat
5、a types. In most languages, you have some means of representing strings and integers, for example. The maximum and minimum size of an integer might depend on the language, but the basic data type is the same.Maintaining all this functionality for multiple languages requires a lot of work. Why keep r
6、einventing the wheel? Wouldn't it be easier to create all this functionality once and use it for every language?The .NET Framework Class Library does exactly that. It consists of a vast set of classes designed to satisfy any conceivable programming need. For example,the .NET framework contains c
7、lasses for handling database access, working with the file system, manipulating text, and generating graphics. In addition, it contains more specialized classes for performing tasks such as working with regular expressions and handling network protocols.The .NET framework, furthermore, contains clas
8、ses that represent all the basic variable data types such as strings, integers, bytes, characters, and arrays.Most importantly, for purposes of this book, the .NET Framework Class Library contains classes for building ASP.NET pages. You need to understand, however, that you can access any of the .NE
9、T framework classes when you are building your ASP.NET pages.Understanding NamespacesAs you might guess, the .NET framework is huge. It contains thousands of classes (over 3,400. Fortunately, the classes are not simply jumbled together. The classes of the .NET framework are organized into a hierarch
10、y of namespaces.ASP Classic NoteIn previous versions of Active Server Pages, you had access to only five standard classes (the Response, Request, Session, Application, and Server objects. ASP.NET, in contrast, provides you with access to over 3,400 classes!A namespace is a logical grouping of classe
11、s. For example, all the classes that relate to working with the file system are gathered together into the System.IO namespace.The namespaces are organized into a hierarchy (a logical tree. At the root of the tree is the System namespace. This namespace contains all the classes forthe base data type
12、s, such as strings and arrays. It also contains classes for working with random numbers and dates and times.You can uniquely identify any class in the .NET framework by using the full namespace of the class. For example, to uniquely refer to the class that represents a file system file (the File cla
13、ss, you would use the following:System.IO refers to the namespace, and File refers to the particular class.NOTEYou can view all the namespaces of the standard classes in the .NET Framework Class Library by viewing the Reference Documentation for the .NET Framework.Standard ASP.NET NamespacesThe clas
14、ses contained in a select number of namespaces are available in your ASP.NET pages by default. (You must explicitly import other namespaces. These default namespaces contain classes that you use most often in your ASP.NET applications:SystemContains all the base data types and other useful classes s
15、uch as those related to generating random numbers and working with dates and times.System.CollectionsContains classes for working with standard collection types such as hash tables, and array lists.System.Configuration Contains classes for working with configuration files (Web.config files.System.Te
16、xtContains classes for encoding, decoding, and manipulating the contents of strings.System.WebContains the basic classes for working with the World Wide Web, including classes for representing browser requests and server responses.NET Framework-Compatible LanguagesFor purposes of this book, you will
17、 write the application logic for your ASP.NET pages using Visual Basic as your programming language. It is the default language for ASP.NET pages (and the most popular programming language in the world. Although you stick to Visual Basic in this book, you also need tounderstand that you can create A
18、SP.NET pages by using any language that supports the .NET Common Language Runtime. Out of the box, this includes C# (pronounced See Sharp, JScript.NET (the .NET version of JavaScript, and the Managed Extensions to C+.NOTEThe CD included with this book contains C# versions of all the code samples.Doz
19、ens of other languages created by companies other than Microsoft have been developed to work with the .NET framework. Some examples of these other languages include Python, SmallTalk, Eiffel, and COBOL. This means that you could, if you really wanted to, write ASP.NET pages using COBOL.Regardless of
20、 the language that you use to develop your ASP.NET pages, you need to understand that ASP.NET pages are compiled before they are executed. This means that ASP.NET pages can execute very quickly.The first time you request an ASP.NET page, the page is compiled into a .NET class, and the resulting clas
21、s file is saved beneath a special directory on your server named Temporary ASP.NET Files. For each and every ASP.NET page, a corresponding class file appears in the Temporary ASP.NET Files directory. Whenever you request the same ASP.NET page in the future, the corresponding class file is executed.W
22、hen an ASP.NET page is compiled, it is not compiled directly into machine code. Instead, it is compiled into an intermediate-level language called Microsoft Intermediate Language (MSIL. All .NET-compatible languages are compiled into this intermediate language.An ASP.NET page isn't compiled into
23、 native machine code until it is actually requested by a browser. At that point, the class file contained in the TemporaryASP.NET Files directory is compiled with the .NET framework Just in Time (JIT compiler and executed.The magical aspect of this whole process is that it happens automatically in t
24、he background. All you have to do is create a text file with the source code for your ASP.NET page, and the .NET framework handles all the hard work of converting it into compiled code for you.ASP CLASSIC NOTEWhat about VBScript? Before ASP.NET, VBScript was the most popular language for developing
25、Active Server Pages.ASP.NET does not support VBScript, and this is good news. Visual Basic is a superset of VBScript, which means that Visual Basic has all the functionality of VBScript and more. So, you have a richer set of functions and statements with Visual Basic.Furthermore, unlike VBScript, Vi
26、sual Basic is a compiled language. This means that if you use Visual Basic to rewrite the same code that you wrote with VBScript, you can get better performance.If you have worked only with VBScript and not Visual Basic in the past, don't worry. Since VBScript is so closely related to Visual Bas
27、ic, you'll find it easy to make the transition between the two languages.NOTE Microsoft includes an interesting tool named the IL Disassembler (ILDASM with the .NET framework. You can use this tool to view the disassembled code for any of the ASP.NET classes in the Temporary ASP.NET Files direct
28、ory. It lists all the methods and properties of the class and enables you to view the intermediate-level code.ASP.NET 和 .NET Framework.NET框架類(lèi)庫(kù)假設(shè)你就是微軟,假設(shè)你必須支持多語(yǔ)言編程,例如VB,JS,C+。這些語(yǔ)言的很多函數(shù)都重復(fù)了,比如對(duì)于每種語(yǔ)言,你都必須包含一些訪問(wèn)文件系統(tǒng),與數(shù)據(jù)庫(kù)打交道,以及處理字符串的函數(shù)。而且這些語(yǔ)言都包含了相似的變成結(jié)構(gòu)。每種語(yǔ)言都有循環(huán)和條件語(yǔ)句。雖然條件語(yǔ)句的語(yǔ)法有些出入,但是功能還是一樣的。最后,很多變成語(yǔ)言都有相似
29、的變量類(lèi)型定義。在很多語(yǔ)言中,你都可以表達(dá)出字符串類(lèi)型和整型。整型數(shù)的最大和最小值則由語(yǔ)言本身決定,但基本的表量類(lèi)型還是相同的。維護(hù)所有這些語(yǔ)言的函數(shù)會(huì)很費(fèi)事。干嗎要不斷的重復(fù)歷史的車(chē)輪?如果只對(duì)函數(shù)建立一次而后對(duì)每種語(yǔ)言都使用是否會(huì)更爽些?而.net框架類(lèi)庫(kù)正是如此,它包含了一組為滿(mǎn)足變成需要而設(shè)計(jì)的類(lèi)。舉例來(lái)說(shuō),.net框架包含了處理數(shù)據(jù)庫(kù)訪問(wèn)的一組類(lèi)。同時(shí)還有文件系統(tǒng)處理類(lèi)以及視圖產(chǎn)生類(lèi)。而且,他包含了更多的較為細(xì)化的用來(lái)處理正則表達(dá)式和網(wǎng)絡(luò)協(xié)議的類(lèi)。更重要的是,.net框架還將所有一些基礎(chǔ)變量都表示了出來(lái),例如字符串類(lèi)型,整型,字符型和數(shù)組。搞懂命名空間正如你所想的,.net框架很龐大
30、。他包含了數(shù)以千計(jì)的類(lèi)。還好的是,這些類(lèi)不是雜亂的拼在一起的。.net框架中的這些類(lèi)是按照命名空間的各個(gè)層次組織在一起的。在asp過(guò)去的版本中,你僅僅可以訪問(wèn)五個(gè)標(biāo)準(zhǔn)類(lèi)。想必來(lái)說(shuō),則為你提供了多達(dá)3400個(gè)類(lèi)。命名空間就是對(duì)類(lèi)進(jìn)行邏輯上的劃分。比如,所有和文件系統(tǒng)相關(guān)的類(lèi)都被放入system.io的命名空間中。同時(shí),命名空間也被組織為一個(gè)邏輯上的分層。在這個(gè)邏輯分層的最根部是system 命名空間。這個(gè)命名空間包含了所有與基礎(chǔ)數(shù)據(jù)類(lèi)型相關(guān)的類(lèi),比如字符串和數(shù)組。同時(shí)他還包含了處理隨機(jī)數(shù)和日期時(shí)間的類(lèi)。System.IO表示命名空間,而File表示這個(gè)特殊的類(lèi)。注意如果想要瀏覽在.net框架類(lèi)庫(kù)
31、中的所有的關(guān)于標(biāo)準(zhǔn)類(lèi)的命名空間,你可以通過(guò)瀏覽參考文檔。標(biāo)準(zhǔn)命名空間部分命名空間中包含的一些類(lèi)是默認(rèn)可以使用的,但有些命名空間則必須明確的引用進(jìn)來(lái)。這些默認(rèn)的命名空間包含了你最常使用的一些類(lèi)。System-包含了所有基礎(chǔ)類(lèi)型和其他一些有用的類(lèi),例如涉及到產(chǎn)生隨機(jī)數(shù)以及和時(shí)間和日期相關(guān)的類(lèi)。System.Collections-包含了一些例如hash表和數(shù)組列表這些標(biāo)準(zhǔn)集合類(lèi)型的類(lèi)。System.Configuration-包含了處理配置文件的一些類(lèi)。System.Text-包含了一些涉及到編碼,解碼以及處理字符串內(nèi)容的類(lèi)。System.Web-包含了處理網(wǎng)絡(luò)方面的一些基本的類(lèi),包括表示瀏覽器請(qǐng)
32、求及服務(wù)端應(yīng)答的類(lèi)。.NET框架兼容的語(yǔ)言這本書(shū)的目的,是使你會(huì)使用Visual Basic作為您的編程語(yǔ)言來(lái)實(shí)現(xiàn)ASP.NET頁(yè)。Visual Basic是ASP.NET網(wǎng)頁(yè)的默認(rèn)語(yǔ)言(并且是世界上最流行的編程語(yǔ)言。雖然在這本書(shū)中您堅(jiān)持使用Visual Basic,但您還需要了解得是,您可以使用任何支持. NET通用語(yǔ)言運(yùn)行庫(kù)的語(yǔ)言創(chuàng)建ASP.NET頁(yè)。這些語(yǔ)言包括 C #(發(fā)音為sharp, JScript.NET (. NET版本的JavaScript 和擴(kuò)展C + + 。注意隨本書(shū)攜帶的CD包含C #所有版本的代碼示例。除微軟公司之外還有許多其他公司也已經(jīng)開(kāi)發(fā)出數(shù)十種可以在. NET Framework平臺(tái)上進(jìn)行開(kāi)發(fā)的語(yǔ)言
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶(hù)所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶(hù)上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶(hù)上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶(hù)因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 足療店成本分析與財(cái)務(wù)決策支持系統(tǒng)研究
- 酒店旅游團(tuán)隊(duì)用餐的菜單策劃與實(shí)踐案例分享
- 跨國(guó)企業(yè)知識(shí)產(chǎn)權(quán)培訓(xùn)的必要性及方法
- 跨平臺(tái)設(shè)計(jì)軟件的發(fā)展與應(yīng)用分析
- 北京專(zhuān)版2024年中考生物復(fù)習(xí)主題訓(xùn)練四
- 資金管理與企業(yè)價(jià)值的創(chuàng)造過(guò)程
- 魯京津瓊專(zhuān)用2025版高考數(shù)學(xué)大一輪復(fù)習(xí)第十一章統(tǒng)計(jì)與統(tǒng)計(jì)案例11.1隨機(jī)抽樣教案含解析
- 通史版2025版高考?xì)v史大一輪復(fù)習(xí)專(zhuān)題八近代化的新探索-五四運(yùn)動(dòng)到新中國(guó)成立前6通史綜合訓(xùn)練二中國(guó)近代史含解析新人教版
- 高中政治1.2科學(xué)社會(huì)主義的理論與實(shí)踐練習(xí)1含解析部編版必修1
- 閱讀理解能力與思維能力的提升
- 胸椎小關(guān)節(jié)紊亂診斷與治療-課件
- 四川省德陽(yáng)市各縣區(qū)鄉(xiāng)鎮(zhèn)行政村村莊村名居民村民委員會(huì)明細(xì)及行政區(qū)劃代碼
- Unit1Developingideaslittlewhitelies課件-高中英語(yǔ)外研版必修第三冊(cè)
- Unit 2 Listening and speaking 課件-高中英語(yǔ)人教版(2019)選擇性必修第二冊(cè)
- (參考)食品加工操作流程圖
- 員工面試登記表
- 鋼棧橋施工方案型鋼
- PySide學(xué)習(xí)教程
- 事業(yè)單位綜合基礎(chǔ)知識(shí)考試題庫(kù) 綜合基礎(chǔ)知識(shí)考試題庫(kù).doc
- 譯林初中英語(yǔ)教材目錄
- 物業(yè)交付后工程維修工作機(jī)制
評(píng)論
0/150
提交評(píng)論