ASP外文翻译原文

合集下载

ASP(计算机专业)外文翻译

ASP(计算机专业)外文翻译

英文原文The Active Server Pages( ASP) is a server to carry the script plait writes the environment, using it can create to set up with circulate the development, alternant Web server application procedure. Using the ASP cans combine the page of HTML, script order to create to set up the alternant the page of Web with the module of ActiveX with the mighty and applied procedure in function that according to Web. The applied procedure in ASP develops very easily with modify.The HTML plait writes the personnel if you are a simple method that a HTML plait writes the personnel, you will discover the script of ASP providing to create to have diplomatic relation with each other page. If you once want that collect the data from the form of HTML, or use the name personalization HTML document of the customer, or according to the different characteristic in different usage of the browser, you will discover ASP providing an outstanding solution. Before, to think that collect the data from the form of HTML, have to study a plait distance language to create to set up a CGI application procedure. Now, you only some simple instruction into arrive in your HTML document, can collect from the form the data combine proceeding analysis. You need not study the complete plait distance language again or edit and translate the procedure to create to have diplomatic relation alone with each other page.Along with control to use the ASP continuously with the phonetic technique in script, you can create to set up the more complicated script. For the ASP, you can then conveniently usage ActiveX module to carry out the complicated mission, link the database for example with saving with inspectional information.If you have controlled a script language, such as VBScript, JavaScript or PERL, and you have understood the method that use the ASP.As long as installed to match the standard cowgirl in the script of ActiveX script engine, can use in the page of ASP an any a script language. Does the ASP take the Microsoft? Visual Basic? Scripting Edition ( VBScript) with Microsoft? Script? Of script engine, like this you can start the editor script immediately. PERL, REXX with Python ActiveX script engine can from the third square develops the personnel acquires. The Web develops thepersonnel if you have controlled a plait distance language, such as Visual Basic, you will discover the ASP creates a very vivid method that set up the Web application procedure quickly. Pass to face to increase in the HTML the script order any, you can create the HTML that set up the applied procedure connects. Pass to create to set up own the module of ActiveX, can will apply the business in the procedure logic seal to pack and can adjust from the script, other module or from the other procedure the mold piece that use.The usage ASP proceeds the calculating Web can convert into the visible benefits, it can make the supplier of Web provide the alternant business application but not only is to announce the contents. For example, the travel agency can compare the announcement aviation schedule makes out more; Using the script of ASP can let the customer inspect the current service, comparison expenses and prepare to book seats.Include too can lower in the Windows NT Option Microsoft in the pack Transaction Server ( MTS) on the server complexity of constructing the procedure with expenses. The MTS can resolve to develop those confidentialities strong, can ratings of and the dependable Web applies the complexity problem of the procedure. Active Server Pages modelThe browser requests from the server of Web. Hour of asp document, the script of ASP starts circulating. Then the server of Web adjusts to use the ASP, the ASP reads completely the document of the claim, carry out all scripts order any, combining to deliver the page of Web to browser.Because script is on the server but is not at the customer to carry the movement, deliver the page of Web on the browser is on the Web server born. Combining to deliver the standard HTML to browser. Because only the result that there is script returns the browser, so the server carries the not easy replication in script. The customer cans not see to create to set up them at script order that the page that view.We introduce the Basic form of the database language known as SQL, a language that allows us to query and manipulate data on computerized relational database systems. SQL has been the lingua franca for RDBMS since the early 1980s, and it is of fundamental importance for many of the concepts presented in this text. The SQLlanguage is currently in transition from the relational form (the ANSI SQL –92 standard) to a newer object-relational form (ANSI SQL -99, which was released in 1999). SQL-99 should be thought of as extending SQL-92, not changing any of the earlier valid language. Usually, the basic SQL we define matches most closely the ANSI SQL standards basic subsets, called Entry SQL -92 and core SQL-99 that are commonly implemented; our touchstone in defining basic SQL is to provide a syntax that is fully available on most of the major RDBMS products[7].We begin with an overview of SQL capabilities, and then we explain something about the multiple SQL standards and dialects and how we will deal with these in our presentation.We will learn how to pose comparable queries in SQL, using a form known as the Select statement. As we will see, the SQL select statement offers more flexibility in a number of ways than relational algebra for posing queries. However, there is no fundamental improvement in power, nothing that could not be achieved in relational algebra , given a few well-considered extensions. For this reason, experience with relational algebra gives us a good idea of what can be accomplished in SQL. At the same time, SQL and relational algebra have quite different conceptual models in a number of respects, and the insight drawn from familiarity with the relational algebra approach may enhance your understanding of SQL capabilities.The most important new feature you will encounter with SQL is the ability to pose queries interactively in a computerized environment. The SQL select statement is more complicated and difficult to master than the relatively simple relational algebra, but you should never feel list or uncertain as long as you have access to computer facilities where a few experiments can clear up uncertainties about SQL use. The interactive SQL environment discussed in the current chapter allows you to type a query on a monitor screen and get an immediate answer. Such interactive queries are sometimes called ad box queries. This term refers to the fact that an SQL select statement is meant to be composed all at once in a few type written lines and not be dependent on any prior interaction in a user session. The feature of not being dependent on prior interaction is also down as non-procedurality. SQL differs in this way even from relational algebra, where a prior alias statement might be needed inorder to represent a product of a table with itself. The difference between SQL and procedural languages such as java or c is profound: you do not need to write a program to try out an SQL query, you just have to type the relatively short, self-contained text of the query and submit it .Of course, an SQL query can be rather complex . A limited part of this full form, know as a sub-query, is defined recursively, and the full select statement form has one added clause. You should not feel intimidated by the complexity of the select statement, however. The fact that a select statement is non-procedural means that it has a lot in common with a menu driven application, where a user is expected to fill in some set of choices from a menu and then press the enter key to execute the menu choices all at once. The various clauses of the select statement correspond to menu choices: you will occasionally need all these clauses, but on not expect to use all of them every time you pose a query.Observed reliability depends on the context in which the system s used. As discussed already, the system environment cannot be specified in advance nor can the system designers place restrictions on that environment for operational systems. Different systems in an environment may react to problems in unpredictable ways, thus affecting the reliability of all of these systems. There for, even when the system has been integrated, it may be difficult to make accurate measurements of its reliability.Visual Basic Database Access prospectsWith the recent Web application software and the rapid development of the existing data stored in diverse forms, Visual Basic Database Access Solutions faces such as rapid extraction enterprises located in the internal and external business information with the multiple challenges. To this end Microsoft, a new database access strategy "unified data access" (UniversalDataAccess) strategy. "Unified data access" to provide high-performance access, including relational and non-relational data in a variety of sources, provide independent in the development of language development tools and the simple programming interface, these technologies makes enterprise integration of multiple data sources, better choice of development tools, application software, operating platforms, and will establish a maintenance easysolution possible.汉语翻译Active Server Pages(ASP)是服务器端脚本编写环境,使用它可以创建和运行动态、交互的Web 服务器应用程序。

ASP外文翻译+原文

ASP外文翻译+原文

ASP外文翻译+原文ENGLISHE:Develop Web application program using ASP the architecture that must first establish Web application. Now in application frequently with to have two: The architecture of C/S and the architecture of B/S.Client/server and customer end / server hold the architecture of C/S.The customer / server structure of two floor.Customer / server ( Client/Server ) model is a kind of good software architecture, it is the one of best application pattern of network. From technology, see that it is a logic concept, denote will a application many tasks of decomposing difference carry out , common completion is entire to apply the function of task. On each network main computer of web site, resource ( hardware, software and data ) divide into step, is not balanced, under customer / server structure, without the client computer of resource through sending request to the server that has resource , get resource request, so meet the resource distribution in network not balancedness. With this kind of structure, can synthesize various computers to cooperate with work, let it each can, realize the scale for the system of computer optimization ( Rightsizing ) with scale reduce to melt ( Downsizing ). Picture is as follows:It is most of to divide into computer network application into two, in which the resource and function that part supports many users to share , it is realized by server; Another part faces every user , is realized by client computer, also namely, client computer is usual to carry out proscenium function , realizes man-machine interaction through user interface , or is the application program of specific conducted user. And server usually carries out the function of backstage supporter , manages the outside request concerning seting up, accepting and replying user that shared. For a computer, it can have double function , is being certain and momentary to carve to act as server , and again becomes client computer in another time.Customer / server type computer divide into two kinds, one side who offers service is called as server , asks one side of service to be called as customer. To be able to offer service, server one side must have certain hardware and corresponding server software; Also, customer one side must also have certain hardware and corresponding customer software.There must be a agreement between server and customer, both sides communicate according to this agreement.Apply customer / server model in Internet service , the relation betweencustomer and server is not immutable. Some Internet node offers service on the one hand , also gets service on the other hand from other node; It is even in one time dialogue course, mutual role also exchanges probably. As in carry out file transmission , if be called as one side who offers file server, is called as one side who gets file customer, when using get or mget order since another node takes file, can think that what self use and it is client computer , is using put or mput order to another node dispatch file can again think the machine that used self is server.Multilayer customer / server structureAlong with the development of enterprise application, recently, have again arisen a kind of new multilayer architecture, it applies customer end to divide into two minutes: Customer application and server apply. Customer application is the part of original customer application , is another and partial to have been transfered to server to apply. New customer application takes the responsibility for user interface and simple regular business logic and new server application resident core , changeable business logic. Therefore its structure has become new ( Client application + Server application )/Server structure. Following picture shows:This kind of structure has solved traditional Client/Server can expand problem, have reduced customer end business logic , and have reduced the requirement of customer end for hardware. At the same time because of a lot of business logic concentrations have gone to unitary application server on, the maintenance work of application system had been also concentrated together, have eliminated the problem in the traditional structure of Client/Server that software distributes. This kind of structure is called as the architecture of B/S.Browser/Server and browser / server hold the architecture of B/S. On essence, Browser/Server is also a kind of structure of Client/Server, it is a kind of from the traditional two levels of structural development of Client/Server come to thethree-layer structural special case of Client/Server that applied on Web.In the system of Browser/Server, user can pass through browser to a lot of servers that spread on network to send request. The structure of Browser/Server is maximum to have simplified the work of client computer, on client computer, need to install and deploy few customer end software only , server will bear more work, for database visit and apply program carry out will in server finish.Under the three-layer architecture of Browser/Server, express layer( Presentatioon ) , function layer ( Business Logic ) , data layer ( Data Service ) have been cut the unit of 3 relative independences:It is the first layer of to express layer: Web browser.In expressing layer contain system show logic, locate in customer end. It's task is to suggest by Web browser to the certain a Web server on network that service is asked , after verifying for user identity, Web server delivers needed homepage with HTTP agreement to customer end, client computer accept the homepage file that passed , and show it in Web browser on.Second layer function layer: Have the Web server of the application function of program extension.In function layer contain the systematic handling of general affairs logic, locate in Web server end. It's task is the request concerning accepting user , need to be first conducted and corresponding to expand application program and database to carry out connection , passes through the waies such as SQL to database server to put forward data handling to apply for, then etc. database server the result of handling data submit to Web server, deliver again by Web server to return customer end.The number of plies of 3th according to layer: Database server.In data layer contain systematic data handling logic, locate in database server end. It's task is to accept the request that Web server controls for database, realization is inquired and modified for database , update etc. function, submit operation result to Web server.Careful analysis is been easy to see , the architecture of Browser/Server ofthree-layer is the handling of general affairs of the two levels of structure ofClient/Server logic modular from the task of client computer in split , from the first floor of individual composition bear the pressure of its task and such client computer have alleviated greatly, distribute load balancedly and have given Web server, so from the structural change of Client/server of original two floor the structure ofBrowser/Server of three-layer. This kind of three-layer architecture following picture shows.This kind of structure not only client computer from heavy burden and the requirement of performance that rises continuously for it in liberation come out , also defend technology people from heavy maintenance upgrading work in free oneself. Since client computer handles general affairs , logic partial minutes have given function server, make client computer right off " slender " a lot of, do not take the responsibility for handling complex calculation and data again visit etc. crucial general affairs, is responsible to show part, so, maintenance people do not rush about again for the maintenance work of program between every client computer, and put major energy in the program on function server update work. Between this kind of three-layer structural layer and layer, the mutually independent change of any first floor does not affect the function of other layer. It has changed the defect of the two levels of architecture of Client/Server of tradition from foundation, it is the transform with deep once in application systematic architecture.The contrast of two architecturesThe architecture of Browser/Server and the architecture of Client/Server compare with all advantages that not only have the architecture of Client/Server and also have the architecture of Clinet/Server the unique advantage that place does not have:Open standard: The standard adopted by Client/Server only in department unification for but, it's application is often for special purpose.It is lower to develop and defend cost: It need to be implemented on all client computers that the application of Client/Server must develop the customer end software for special purpose, no matter installation and disposition escalate still, have wasted manpower and material resources maximumly. The application ofBrowser/Server need in customer end have general browser , defend and escalate to work in server end go on , need not carry out any change as customer holds , have reduced the cost of development and maintenance so greatly.It is simple to use , interface friendly: The interface of the user of Client/Server is decided by customer end software, interface and the method of its use are not identical each, per popularize a system of Client/Server ask user study from the beginning, is hard to use. The interface of the user of Browser/Server is unified on browser, browser is easy to use , interface friendly, must not study use again other software, the use of a Lao Yong Yi that has solved user problem.Customer end detumescence: The customer end of Client/Server has the function that shows and handles data , as the requirement of customer end is a client computer " it is fat " very high. The customer of Browser/Server holds the access that not takes the responsibility for database again and the etc. task of complex data calculation, need it only show , the powerful role that has played server fully is so large to have reduced the requirement for customer end, customer end become very " thin ".System is flexible: The 3 minutes of the system of Client/Server, in modular, have the part that need to change to want relation to the change of other modular, make system very difficult upgrading. The 3 minutes of the system of Browser/Server modular relative independence, in which a part of modular change, other modular does not get influence, it is very easy that system improve to become, and can form the system with much better performance with the product of different manufacturer.Ensure systematic safety: In the system of Client/Server, directly join with database server because of client computer, user can very easily change the data on server, can not guarantee systematic safety. The system of Browser/Server has increased a level of Web server between client computer and database server , makes two not to be directly linked again, client computer can not be directly controled for database, prevent user efficiently invade illegally.The architecture of Browser/Server of three-layer has the advantage that a lot of traditional architectures of Client/Server does not have , and is close to have combined the technology of Internet/Intranet, is that the tendency of technical development tends to , it application system tape into one brand-new develop times. From this us option the configuration of B/S the architecture that develops as system.what are C/S with B/SFor " C/S " with the technology of " B/S " develop change know , first,must make it clear that 3 problems.( 1 ) What is the structure of C/S.C/S ( Client/Server ) structure, the server structure and client computer that all know well. It is software systematic architecture, through it can hold hardware environment fully using two advantage, realize task reasonable distribution to Client end and Server end , have reduced systematic communication expense. Now, the most systems of application software are the two levels of structure of the form of Client/Server , are developing to the Web application of distribution type since current software application is systematic, Web and the application of Client/Server can carry out same business handling , apply different modular to share logic assembly; Therefore it is systematic that built-in and external user can visit new and existing application , through the logic in existing application system, can expand new application system. This is also present application system develop direction. Traditional C /S architecture though adopting is open pattern, but this is the openness that system develops a level , in specific application no matter Client end or Server end the software that need to still specify support. Because of the software software that need to develop different edition according to the different system of operating system that can not offer the structure of C/S and the open environment of user genuine expectation , besides, the renovation of product is very rapid, is nearly impossible to already meet the 100 computer above users of local area network at the same time use. Price has low efficiency high. If my courtyard uses , Shanghai exceed the orchid company's management software " statistics of law case" is typical C /S architecture management software.( 2 ) What is the structure of B/S.B/S ( Browser/Server ) structure browser and server structure. It is along with the technology of Internet spring up , it is for the structure of improvement or a kind of change of the structure of C/S. Under this kind of structure, user working interface is to realize through WWW browser, lose the logic of general affairs very much in front( Browser) realization, but the major logic of general affairs in server end( Server) realization, form the three-layer claimed 3-tier structure. So, have simplified customerend computer load greatly , have alleviated system to defend workload and the cost with upgrading , have reduced the overall cost of user ( TCO ). With present technology see , local area network the network application that establishes the structure of B/S , and under the pattern of Internet/Intranet, database application is easy to hold relatively , cost also is lower. It is that oneness goes to the development of position , can realize different people, never same place, with difference receive the way of entering ( for example LAN, WAN, Internet/Intranet etc.) visit and operate common database; It can protect data platform efficiently with management visit limits of authority, server database is also safe. Now in my courtyard, net ( Intranet ) , outer net ( Internet ) with Beijing eastern clear big company " law case and the management software of official business " is the structural management software of B/S , policemen each working station in local area network pass through WWW browser can realize working business. Especially in JAVA step platform language appearance after, the configuration management software of B/S is more facilitated , is shortcut, efficient.( 3 ) The management software technology of main stream.The technology of main stream of management software technology is as management thought , have also gone through 3 develop period. First, interface technology goes to Windows graph interface ( or graph user interface GUI ) from last century DOS character interface, till Browser browser interface 3 differences develop period. Secondly, today own the browser interface of computer, is not only visual and is easy to use , what is more major is that any its style of application software based on browser platform is as, make the requirement of choosing a person for the job for operating training not high and software operability is strong , is easy to distinguish; Moreover platform architecture the file that also goes to today from past single user development /server ( F /S ) system and client computer /server ( C /S ) system and browser /server ( B /S ) system.The comparison of C/S and B/SC/S and B/S is the now world two technologies of main stream of developing pattern technical configuration. C/S is that American Borland company researches and develop most early, B/S is that American Microsoft researches anddevelop. Now this two technologies with quilt world countries grasp , it is many that domestic company produce article with C/S and the technical development of B/S. This two technologies have the certain market share of self , is with customer crowd , each domestic enterprise says that own management software configuration technical function is powerful, advanced, convenient , the customer group that can lift , have a crowd scholar ink guest to shake flag self cry out , advertisement flies all over the sky , may be called benevolent to see kernel, sage sees wisdomC/S configures inferior position and the advantage of software( 1 ) Application server operation data load is lightcomparatively.The database application of the most simple architecture of C/S is become by two partial groups, customer applies program and database server program. Both can be called as proscenium program and the program of backstage supporter respectively. The machine of operation database server program is also called as application server. Once server program had been started , waits the request concerning responding customer program hair at any time; Customer application program operation can be called as customer computer on the own computer of user, in correspondence with database server, when needs carry out any operation for the data in database, customer program seeks server program voluntarily , and sends request to it, server program is regular as basis intends to make to reply, send to return result, application server operation data load is lighter.( 2 ) Data store management function relatively transparent.In database application data store management function, is carried out respectively independently by server program and customer application program , is regular as proscenium application can violate , and usually those different( no matter is have known still unknown ) operations data, in server program, do not concentrate realization, for instance visit limits of authority, serial number can be repeated , must have customer talent establishment the rule order. It is these to own , for the last user that works on proscenium program is " transparent ", they need not be interest in ( can not usually also interfere ) the course of behind, can complete own all work. In the application of customer server configuration proscenium program not is very " thin ",troublesome matter is delivered to server and network. In the system of C/S take off , database can not become public really , professionally more competent storehouse, it gets independent special management.( 3 ) The inferior position of the configuration of C/S is high maintenance cost make investment just big.First, with the configuration of C/S, will select proper database platform to realize the genuine "unification" of database data, make the data synchronism that spreads in two lands complete deliver by database system go to manage, but the logically two operators of land will directly visit a same database to realize efficiently , have so some problems, if needs establishment the data synchronism of " real time ", the database server that must establish real time communication connection between two places and maintains two lands is online to run , network management staff will again want to defend and manage for customer end as server defends management , maintenance and complex tech support and the investment of this high needs have very high cost, maintenance task is measured.Secondly, the software of the structure of C/S of tradition need to develop the software of different edition according to the different system of operating system , is very rapid because of the renovation of product, price is working needs high with inefficient already do not meet. In JAVA step platform language appearance after, the configuration of B/S is more vigorous impact C/S , and forms threat and challenge for it. .The advantage of B/S configuration software( 1 ) The Maintenance of inferior position and upgrading way are simple.Now upgrading and the improvement of software system more and more frequently, the product of the configuration of B/S embodies more convenient property obviously. For one a little a little bit big unit , if systematic administrator needs , between hundreds of 1000 even last computers round trip run , efficiency and workload is to can imagine, but the configuration of B/S software needs management server have been all right , all customer ends are browser only, need not do any maintenance at all. No matter the scale of user has , is what , has how many branch will not increase any workload of maintenance upgrading , is all to operate needs to aim at server to go on;If need differently only, net server connection specially , realize long-range maintenance and upgrading and share. So client computer more and more " thin ", and server more and more " fat " is the direction of main stream of future informative development. In the future, software upgrading and maintenance will be more and more easy , and use can more and more simple, this is for user manpower , material resources, time and cost save is obvious , it is astonishing. Therefore defend and escalate revolutionary way is the client computer " it is thin ", " is fat " server.( 2 ) Cost reduction, it is more to select.All know windows in the computer of top of a table on nearly one Tong world, browser has become standard disposition, but on server operating system, windows is in absolute dominance position not. Current tendency is the application management software that uses the configuration of B/S all , need to install only in Linux server on , and safety is high. The so server option of operating system is many, no matter choosing those operating system, can let the most of ones use windows in order to the computer of top of a table of operating system does not get influence, this for make most popular free Linux operating system develop fast, Linux except operating system is free besides, it is also free to link database, this kind of option is very pupular.Say, many persons on daily, "Sina website" nets , so long as having installed browser for can , and what need not know the server of " Sina website " to use is that what operating system, and in fact the most of websites do not use windows operating system really, but the computer of user is most of as installing to be windows operating system.( 3 ) Application server operation data load value comparatively.Since B/S configures management, software installation in server end ( Server ) on, it is been all right that network administrator need to manage server only, the user interface major logic of general affairs in server ( Server ) end pass through WWW browser completely realization, lose the logic of general affairs very much in front( Browser) realization, all customer ends has only browser, network administrator need to do hardware maintenance only. But application server operation data load is heavier, once occuring " server collapse " to wait for problem,consequence is unimaginable. Therefore a lot of units have database to stock server , are ready for any eventuality.原文翻译:利用ASP开发Web应用程序首先必须确立Web应用的体系结构。

外文翻译ASP简介

外文翻译ASP简介

附件1:外文资料翻译译文ASP简介服务器端的方案设计曾经相当的困难。

如果想要通过CGI书写代码就必须要求掌握一些编程语言,例如Perl或是C语言,然后导入,这样的工作效率是非常低的。

之后有人改进了CGI技术,一种新的运用于服务器端的程序产生了。

如果你的源程序是用Perl等解释程序编写的,服务器程序就需要运行一个Perl的解释程序,这样会占据处理器许多的时间和内存空间。

这种情况如果在那些每天采集一千多数据的站点后果是十分严重的。

同样,你也不可能给程序划分出一个完美的分界面,就象VB、VC++、或者其他一些程序。

你可以通过观察它们的运行时所产生的错误,去检验该程序的运行代码。

这是一种对于枯燥乏味的寻找语法错误的很有趣的实践体验,然而,在此之前必须通过学习认识到在生命中有更好的事情需要做,例如阅读WiredNew.微软努力尝试去通过他们所开发的ASP技术去改变以上的那些情况。

ASP技术是由服务器产生的页面去指导其他程序执行一些操作,例如access databases(按日计工资存取),提供不同页面给不同的基础浏览器,现在我们已经很少使用以前的服务器程序CGI,ASP就如同是一个高效率的提供给服务器直接运行编码的解释程序,并且ASP的工作效率要比CGI高的多,因为ASP主要运行于服务性工作,并且使用多线程体系结构保持优势。

这里是来自Microsoft site的一段解释:“ASP是一个公开的、编译快捷的应用程序环境,在这里你可以结合HTML、源程序、并且可以再度使用ActiveX服务构造来创建动态的,强有力的基于Web的商业解决方案。

ASP能够提供服务器端程序通过自带的IIS,并且支持VBScript和Jscript两种脚本语言。

”听起来很棒,是吗?但是,要紧记的是ASP并不是治疗癌症的完美的药方。

的确,他可以治愈你的烦恼如果你是一个拥有老资质的微软开发者,舒适的伫立在垄断地位。

IMNSHO,ASP的提出以致于世界上所有的VB程序将再次被需要。

asp.net外文文献+翻译

asp.net外文文献+翻译

技术1.构建 页面 和结构 是微软.NET framework整体的一部分, 它包含一组大量的编程用的类,满足各种编程需要。

在下列的二个部分中, 你如何学会 很适合的放在.NET framework, 和学会能在你的 页面中使用语言。

.NET类库假想你是微软。

假想你必须支持大量的编程语言-比如Visual Basic 、C# 和C++. 这些编程语言的很多功能具有重叠性。

举例来说,对于每一种语言,你必须包括存取文件系统、与数据库协同工作和操作字符串的方法。

此外,这些语言包含相似的编程构造。

每种语言,举例来说,都能够使用循环语句和条件语句。

即使用Visual Basic 写的条件语句的语法不与用C++ 写的不一样,程序的功能也是相同的。

最后,大多数的编程语言有相似的数据变量类型。

以大多数的语言,你有设定字符串类型和整型数据类型的方法。

举例来说,整型数据最大值和最小值可能依赖语言的种类,但是基本的数据类型是相同的。

对于多种语言来说维持这一功能需要很大的工作量。

为什么继续再创轮子? 对所有的语言创建这种功能一次,然后把这个功能用在每一种语言中岂不是更容易。

.NET类库不完全是那样。

它含有大量的满足编程需要的类。

举例来说,.NET类库包含处理数据库访问的类和文件协同工作,操作文本和生成图像。

除此之外,它包含更多特殊的类用在正则表达式和处理Web协议。

.NET framework,此外包含支持所有的基本变量数据类型的类,比如:字符串、整型、字节型、字符型和数组。

最重要地, 写这一本书的目的, .NET类库包含构建的 页面的类。

然而你需要了解当你构建.NET页面的时候能够访问.NET framework 的任意类。

理解命名空间正如你猜测的, .NET framework是庞大的。

它包含数以千计的类(超过3,400) 。

幸运地,类不是简单的堆在一起。

.NET framework的类被组织成有层次结构的命名空间。

ASP外文翻译+原文

ASP外文翻译+原文

ASP Banner Ad SystemTo the Reader from Joe: This is a user-submitted tutorial by the author above. I have read the tutorial and set the format to fit HTML Goodies, but for the most part have not changed the language. I chose this tutorial because many readers have been asking for more ASP tutorials. This is a great one.Sorry I cannot show you the event here. The HTML Goodies servers do not offer ASP. I will tell you though that if you run IE5.0 or better, open the contents of the zip file into a directory and it runs just fine.If you haven't already, you may want to read my introductory ASP tutorial before this one. If not, then enjoy.There may be a point in your web design career, where your site becomes real popular. That is when companies become interested in advertising on your site. A Banner Ad system can be built to control all those advertisements that you are so willing to display, for a price. Active Server Pages makes it very easy to create a banner ad system. So easy, that the Microsoft ASP developers created an "AdRotator" component for the occasion. Before you begin reading this article, make sure you download the support material below.The files included aread.txtbanner.asp3 banner imagesclicks.aspexample.aspredirect.aspad.txtIn order for the AdRotator component to work, you must configure a text file. This text file contains all the banner ad properties. However, The text file must follow a certain format. The first four lines are as follows:REDIRECT redirect.aspWIDTH 400HEIGHT 50*REDIRECTWhen a banner is clicked, the "AdRotator" component goes to a preliminary page. This page is called a redirect page. The redirect page handles any extra programming events before directing a user to the banners destination. In this example banner system, I called the preliminary file "redirect.asp".WIDTHThis sets the width of the banner ad image. The value must be in pixels.HEIGHTThis sets the height of the banner ad image. The value must be in pixels.*The asterisk tells the "AdRotator" component that it is about to acquire banner ad information. The asterisk is required.Once you define the general properties above the asterisk, then comes the list of banners to display. In the ad.txt file, there are three banners defined below the asterisk.banner1.jpg20banner2.jpg30banner3.jpg30Each banner requires four lines of properties, which follow the format below:Image filenameWeb AddressDescriptionBanner WeightImage FileThe image filename can be a fully qualified web address or relative name that points to the image. If the image is in a different folder, then you also include the folder name as well.(/banner1.jpg, banner1.jpg, or foldername/banner.jpg)>Web AddressThe web address can be a page on your site or a fully qualified web address that leads to another site.DescriptionThe description will be displayed as a tool tip. When you rest your mouse over the banner, the description pops up.Banner WeightThe banner weight determines how much a banner is displayed. The "AdRotator" component adds all of the banner weights and determines theprobability or percent chance of a particular banner being displayed. A banner with a higher weight has better a better probability.NOTE: You can disable a banners property by substituting with a dash. banner3.jpg-30The example entry above would create a banner ad that does not have a web address.Banner.aspThis file uses the "AdRotator" component and analyzes the contents of the ad.txt file. Below is the code.sub banner(strTarget)dim bannerad, htmlset bannerad = server.CreateObject("MSWC.adrotator")bannerad.TargetFrame = strTargethtml = bannerad.GetAdvertisement("ad.txt")Response.Write htmlend subThe first thing to note is that the ASP was written with VBScript. The second thing to note is that the code is written inside a sub procedure called banner(strTarget).For those of you who do not know, a sub procedure allows you to group together a bunch of code that can be reused over and over. Like a function, it takes an argument, such as a word or variable. In the code above the argument is strTarget.Unlike a function, a sub-procedure does not return any values, it just executes the code inside line by line.Inside the sub I declare two variables...dim bannerad, htmlNext I store the "AdRotator" component inside the "bannerad" variable. When storing a component inside a variable you use the set keyword. Since we are programming server-side with ASP, we use server.CreateObject to summon the component. "MSWC.adrotator" is the component key or name value.set bannerad = server.CreateObject("MSWC.adrotator")Next I use a property of the "AdRotator" called "TargetFrame". This property is equivalent to:html = bannerad.GetAdvertisement("ad.txt")Finally, I want to print the contents of the "html" variable. This prints the code that displays the banner images.Response.Write htmlRedirect.aspThis is the file that is processed before someone is redirected to the banners web address. Inside this file, we can capture information like how many times a particular banner is clicked and so on. To start things off, I defined a variable called "strUrl".Dim strUrlNext I store a querystring value inside this new variable.strUrl = Request.Querystring("url")A querystring is nothing more than a bunch of name/value pairs attached to a web address. When a user clicks on a banner, the "AdRotator" component attaches a querystring to the redirect file. So if we were to click banner1.jpg, defined in ad.txt, we would end up with a redirect web address that looks like so.Redirect.asp?url=&image=banner1.jpgIn essence assigning "Request.Querystring("url") to "strUrl", is the same as assigning to it.Finally, I check to see which banner was clicked. I accomplish this with the VBSCript inStr( ) function.if instr(strUrl, "htmlgoodies") thenApplication.Lockapplication("htmlgoodies") = application("htmlgoodies") + 1Application.UnLockResponse.ClearResponse.Redirect strUrlend ifThe inStr( ) function returns the number position of a sub-word (sub-string) within another word (string). The format is as followsInStr(main word, sub-word)If the sub-word exist within the main word, then the function will equal a number greater-than zero or true. If the sub-word does not exist, then the function will equal zero or false. In the example above, I check to see if "htmlgoodies" exist within . Since the answer is true, then the code inside the if... then... statement will execute.Inside the if... then... I use an application variable. An application variable is native to ASP. Application variables store information as long as a web application exist, a web application ceases to exist when say someone shuts off the web hosting server. The beauty of an application variable is that you can define it on one web page and use it in other web pages within your web application. The downfall is that the users computer must have cookies enabled.Anyways, the code adds one to the application variable, every time a banner is clicked. After one is added, the code redirects to the banners web page. So if banner1 was clicked then you shall be redirected to "".Response.Redirect strUrlExample.aspThis is an example page that uses the banner ad system. When you refresh the page, you should most likely see a different banner. Whenever you want to insert the banner ad on a page, you can use the SSI directive below...<!-- #include file="banner.asp" -->Once you include the file above, then you can call the sub-procedure inside the banner.asp file like so...Call banner("_blank")Notice that I supply one of the values for the "TargetFrame" as an argument. So if the banner is clicked, then the web page should open up in a separate browser window.Clicks.aspThis is a very simple page that displays the number of clicks per banner ad. To display the number of times a banner was clicked, you just print the contents of the application variables that were created inside "redirect.asp". Pretty nifty. <% =application("htmlgoodies") %>ASP横幅广告系统乔给读者的话:这是一个由用户提交上述笔者的教程。

中英文翻译(asp)

中英文翻译(asp)

外文翻译(附英文原文)Dreamweaver MX 中的数据库Macromedia Dreamweaver MX是一个令人兴奋的版本,它在建立动态网的应用方面带来了一个很大的推进。

越来越多的人拥有了他们需要的工具去快速且简单的把他们的网站连接到数据库,他们可以做从收取e-mail到使用完全的网络商店数据服务的所有事情。

在强大功能同时也带来的一点责任,无论是你自己、你的客户还有你网站的用户都有。

你有责任去建立一个安全的应用端,我们的目的是为了保护你收集的数据和商店免于被非法盗用。

建立一个安全连接并不是一个很困难的任务,但是他要让你切实注意你所做的一切。

你将要采取一些保护数据措施才能使你的站点在发展和推广期间走的更远。

他们不仅包括Dreamweaver MX 还包括你使用的数据程序。

带索引序列存取(ISAM)数据库包括了一些流行的基于文件的数据库里例如Microsoft Access, FileMaker, 以及FoxPro。

他们都是典型的独立体且能通过一个驱动程序访问,他们不需要服务端请求去运行。

这些程序是本地建立的然后通过DSN上传到网络服务器,一总硬件代码连接方式,或者象ASP里面的Server.MapPath一样的方法。

ISAM是廉价并且易于使用。

但是如果你不用一些简单的方法保护他们的话也是很容易被突破的。

首先,注意你存储数据的文件。

如果可能的话,把数据库的文件夹放在你网站根目录的上层。

例如,如果到你的服务器上的网站的物理路径是c:\websites\mywebsite,mywebsite文件夹和下层的内容就都是从浏览器可看到的内容。

这意味着如果你把你的数据库文件放到c:\websites\mywebsite\database,那么某些知道或者猜到你的文件名的人就能简单的通过/database/filename.mdb去下载到你的数据文件。

因为服务器没有关联程序去运行mdb文件,它就默许了用户下载这个文件。

外文翻译---提高字符串处理性能的ASP应用程序

外文翻译---提高字符串处理性能的ASP应用程序

的。

这是一个设有一个可配置的字符串缓冲区并且管理新文本插入到该缓冲区,只有当文本长度超过字符串缓冲区的长度时,才产生字符串的充足。

微软网框架免费地提供了这种类别。

(System.Text.StringBuilder)。

这是在那种环境下进行串联操作所推荐的。

在ASP和传统的Visual Basic的世界中,我们无权使用此类别,因此我们需要建立我们自己的一个类别。

以下是一个范例是用Visual Basic 6.0创建的StringBuilder类(错误处理代码为了简便已省略)。

Option Explicitdefault initial size of buffer and growth factorPrivate Const DEF_INITIALSIZE As Long = 1000Private Const DEF_GROWTH As Long = 1000buffer size and growthPrivate m_nInitialSize As LongPrivate m_nGrowth As Longbuffer and buffer countersPrivate m_sText As StringPrivate m_nSize As LongPrivate m_nPos As LongPrivate Sub Class_Initialize()set defaults for size and growthm_nInitialSize = DEF_INITIALSIZEm_nGrowth = DEF_GROWTHinitialize bufferInitBufferEnd Subset the initial size and growth amountPublic Sub Init(ByVal InitialSize As Long, ByVal Growth As Long)If InitialSize > 0 Then m_nInitialSize = InitialSizeIf Growth > 0 Then m_nGrowth = GrowthEnd Subinitialize the bufferPrivate Sub InitBuffer()m_nSize=-1m_nPos=1End Subgrow the bufferPrivate Sub Grow(Optional MinimimGrowth As Long) initialize buffer if necessaryIf m_nSize = -1 Thenm_nSize = m_nInitialSizem_sText = Space$(m_nInitialSize)Elsejust growDim nGrowth As LongnGrowth = IIf(m_nGrowth > MinimimGrowth,m_nGrowth, MinimimGrowth)m_nSize = m_nSize + nGrowthm_sText = m_sText & Space$(nGrowth)End IfEnd Subtrim the buffer to the currently used sizePrivate Sub Shrink()If m_nSize > m_nPos Thenm_nSize = m_nPos - 1m_sText = RTrim$(m_sText)End IfEnd Subadd a single text stringPrivate Sub AppendInternal(ByVal Text As String) If (m_nPos + Len(Text)) > m_nSize Then Grow Len(Text) Mid$(m_sText, m_nPos, Len(Text)) = Textm_nPos = m_nPos + Len(Text)End Subadd a number of text stringsPublic Sub Append(ParamArray Text())Dim nArg As LongFor nArg = 0 To UBound(Text)AppendInternal CStr(Text(nArg))Next nArgEnd Subreturn the current string data and trim the bufferPublic Function ToString() As StringIf m_nPos > 0 ThenShrinkToString = m_sTextElseToString = ""End IfEnd Functionclear the buffer and reinitPublic Sub Clear()InitBufferEnd Sub使用这个类别的基本原理是一个类别级的变量(m_sText)被保留,这个变相相当于一个字符串缓冲区,而这个缓冲区的大小设定是靠使用Space$功能来对其填充空格符号。

ASP和net技术及数据库管理外文原文+中文翻译

ASP和net技术及数据库管理外文原文+中文翻译
第 1 页 共 12 页
服务器上运行。将程序在服务器端首次运行时进行编译,比 ASP 即时解释程序速 度上要快很多.而且是可以用任何与 . net 兼容的语言(包括 Visual Basic . net、 C# 和 JScript . net.)创作应用程序。另外,任何 ASP. net 应用程序都可以使用 整个 . net Framework。开发人员可以方便地获得这些技术的优点,其中包括托管 的 公 共 语 言 运 行 库 环 境 、 类 型 安 全 、 继 承 等 等 。 ASP. net 可 以 无 缝 地 与 WYSIWYG HTML 编辑器和其他编程工具(包括 Microsoft Visual Studio . net) 一起工作。这不仅使得 Web 开发更加方便,而且还能提供这些工具必须提供的 所有优点, 包括开发人员可以用来将服务器控件拖放到 Web 页的 GUI 和完全集 成的调试支持。 当创建 ASP. net 应用程序时,开发人员可以使用 Web 窗体或 XML Web services,或以他们认为合适的任何方式进行组合。每个功能都能得到 同一结构的支持,使您能够使用身份验证方案,缓存经常使用的数据,或者对应 用程序的配置进行自定义. 如果你从来没有开发过网站程序,那么这不适合你,你 应该至少掌握一些 HTML 语言和简单的 Web 开发术语(不过我相信如果有兴趣的 话是可以很快的掌握的)。你不需要先前的 ASP 开发经验(当然有经验更好) ,但 是你必须了解交互式 Web 程序开发的概念, 包含窗体, 脚本, 和数据接口的概念, 如果你具备了这些条件的话,那么你就可以在 的世界开始展翅高飞了。 不仅仅是 Active Server Page (ASP) 的下一个版本,而且是一种建立 在通用语言上的程序构架,能被用于一台 Web 服务器来建立强大的 Web 应用程 序。 提供许多比现在的 Web 开发模式强大的优势。 ASP. net 运行的架构分为几个阶段: 在 IIS 与 Web 服务器中的消息流动阶段。 在 ASP. net 网页中的消息分 派。 在 ASP. net 网页中的消息处理。 ASP. net 的原始设计构想,就是要让开发人员能够像 VB 开发工具那样,可 以使用事件驱动式程序开发模式 (Event-Driven Programming Model) 的方法来 开发网页与应用程序,若要以 ASP 技术来做到这件事的话,用必须要使用大量的 辅助信息,像是查询字符串或是窗体字段数据来识别与判断对象的来源、事件流 向以及调用的函数等等,需要撰写的代码量相当的多,但 ASP. net 很巧妙利用窗 体字段和 JavaScript 脚本把事件的传递模型隐藏起来了。 在 ASP. net 运行的时候, 经常会有网页的来回动作 (round-trip), 在 ASP. net 中称为 PostBack,在传统的 ASP 技术上,判断网页的来回是需要由开发人员自 行撰写,到了 ASP. net 时,开发人员可以用 Page.IsPostBack 机能来判断是否 为第一次运行 (当 发现 HTTP POST 要求的数据是空值时), 它可以保 证 ASP. net 的控件事件只会运行一次,但是它有个缺点(基于 HTTP POST 本 身的缺陷) ,就是若用户使用浏览器的刷新功能 (按 F5 或刷新的按钮) 刷新网页 时,最后一次运行的事件会再被运行一次,若要避免这个状况,必须要强迫浏览 器清空高速缓存才可以。
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

是一个统一的 Web 开发模型,它包括您使用尽可能少的代码生成企业级 Web 应用程序所必需的各种服务。

作为 .NET Framework 的一部分提供。

当您编写 应用程序的代码时,可以访问 .NET Framework 中的类。

您可以使用与公共语言运行库 (CLR) 兼容的任何语言来编写应用程序的代码,这些语言包括 Microsoft Visual Basic、C#、JScript .NET 和 J#。

使用这些语言,可以开发利用公共语言运行库、类型安全、继承等方面的优点的 应用程序。

包括:•页和控件框架• 编译器•安全基础结构•状态管理功能•应用程序配置•运行状况监视和性能功能•调试支持•XML Web services 框架•可扩展的宿主环境和应用程序生命周期管理•可扩展的设计器环境 页和控件框架是一种编程框架,它在 Web 服务器上运行,可以动态地生成和呈现 网页。

可以从任何浏览器或客户端设备请求 网页, 会向请求浏览器呈现标记(例如 HTML)。

通常,您可以对多个浏览器使用相同的页,因为 会为发出请求的浏览器呈现适当的标记。

但是,您可以针对诸如 Microsoft Internet Explorer 6 的特定浏览器设计 网页,并利用该浏览器的功能。

支持基于 Web 的设备(如移动电话、手持型计算机和个人数字助理 (PDA))的移动控件。

网页是完全面向对象的。

在 网页中,可以使用属性、方法和事件来处理 HTML 元素。

页框架为响应在服务器上运行的代码中的客户端事件提供统一的模型,从而使您不必考虑基于 Web 的应用程序中固有的客户端和服务器隔离的实现细节。

该框架还会在页处理生命周期中自动维护页及该页上控件的状态。

使用 页和控件框架还可以将常用的 UI 功能封装成易于使用且可重用的控件。

控件只需编写一次,即可用于许多页并集成到 网页中。

这些控件在呈现期间放入 网页中。

页和控件框架还提供各种功能,以便可以通过主题和外观来控制网站的整体外观和感觉。

可以先定义主题和外观,然后在页面级或控件级应用这些主题和外观。

除了主题外,还可以定义母版页,以使应用程序中的页具有一致的布局。

一个母版页可以定义您希望应用程序中的所有页(或一组页)所具有的布局和标准行为。

然后可以创建包含要显示的页特定内容的各个内容页。

当用户请求内容页时,这些内容页与母版页合并,产生将母版页的布局与内容页中的内容组合在一起的输出。

所有 代码都经过了编译,可提供强类型、性能优化和早期绑定以及其他优点。

代码一经编译,公共语言运行库会进一步将 编译为本机代码,从而提供增强的性能。

包括一个编译器,该编译器将包括页和控件在内的所有应用程序组件编译成一个程序集,之后 宿主环境可以使用该程序集来处理用户请求。

除了 .NET 的安全功能外, 还提供了高级的安全基础结构,以便对用户进行身份验证和授权,并执行其他与安全相关的功能。

您可以使用由 IIS 提供的 Windows 身份验证对用户进行身份验证,也可以通过您自己的用户数据库使用 Forms 身份验证和 成员资格来管理身份验证。

此外,可以使用 Windows 组或您自己的自定义角色数据库(使用 角色)来管理Web 应用程序的功能和信息方面的授权。

您可以根据应用程序的需要方便地移除、添加或替换这些方案。

始终使用特定的 Windows 标识运行,因此,您可以通过使用Windows 功能(例如 NTFS 访问控制列表 (ACL)、数据库权限等等)来保护应用程序的安全。

提供了内部状态管理功能,它使您能够存储页请求期间的信息,例如客户信息或购物车的内容。

您可以保存和管理应用程序特定、会话特定、页特定、用户特定和开发人员定义的信息。

此信息可以独立于页上的任何控件。

提供了分布式状态功能,使您能够管理一台计算机或数台计算机上同一应用程序的多个实例的状态信息。

通过 应用程序使用的配置系统,可以定义 Web 服务器、网站或单个应用程序的配置设置。

您可以在部署 应用程序时定义配置设置,并且可以随时添加或修订配置设置,且对运行的 Web 应用程序和服务器具有最小的影响。

配置设置存储在基于 XML 的文件中。

由于这些 XML 文件是ASCII 文本文件,因此对 Web 应用程序进行配置更改比较简单。

您可以扩展配置方案,使其符合自己的要求。

包括可监视 应用程序的运行状况和性能的功能。

使用 运行状况监视可以报告关键事件,这些关键事件提供有关应用程序的运行状况和错误情况的信息。

这些事件显示诊断和监视特征的组合,并在记录哪些事件以及如何记录事件等方面提供了高度的灵活性。

支持两组可供应用程序访问的性能计数器:• 系统性能计数器组• 应用程序性能计数器组 利用运行库调试基础结构来提供跨语言和跨计算机调试支持。

可以调试托管和非托管对象,以及公共语言运行库和脚本语言支持的所有语言。

此外, 页框架提供使您可以将检测消息插入 网页的跟踪模式。

支持 XML Web services。

XML Web services 是包含业务功能的组件,利用该业务功能,应用程序可以使用 HTTP 和 XML 消息等标准跨越防火墙交换信息。

XML Web services 不用依靠特定的组件技术或对象调用约定。

因此,用任何语言编写、使用任何组件模型并在任何操作系统上运行的程序,都可以访问 XML Web services。

包括一个可扩展的宿主环境,该环境控制应用程序的生命周期,即从用户首次访问此应用程序中的资源(例如页)到应用程序关闭这一期间。

虽然 依赖作为应用程序宿主的 Web 服务器 (IIS),但 自身也提供了许多宿主功能。

通过 的基础结构,您可以响应应用程序事件并创建自定义 HTTP 处理程序和 HTTP 模块。

中提供了对创建 Web 服务器控件设计器(用于可视化设计工具,例如 Visual Studio)的增强支持。

使用设计器可以为控件生成设计时用户界面,这样开发人员可以在可视化设计工具中配置控件的属性和内容。

C# 是一种简洁、类型安全的面向对象的语言,开发人员可以使用它来构建在 .NET Framework 上运行的各种安全、可靠的应用程序。

使用 C#,您可以创建传统的 Windows 客户端应用程序、XML Web services、分布式组件、客户端 - 服务器应用程序、数据库应用程序以及很多其他类型的程序。

Microsoft Visual C# 2005 提供高级代码编辑器、方便的用户界面设计器、集成调试器和许多其他工具,以在 C# 语言版本 2.0 和 .NET Framework 的基础上加快应用程序的开发。

C# 语法表现力强,只有不到 90 个关键字,而且简单易学。

C# 的大括号语法使任何熟悉 C、C++ 或 Java 的人都可以立即上手。

了解上述任何一种语言的开发人员通常在很短的时间内就可以开始使用 C# 高效地工作。

C# 语法简化了C++ 的诸多复杂性,同时提供了很多强大的功能,例如可为空的值类型、枚举、委托、匿名方法和直接内存访问,这些都是 Java 所不具备的。

C# 还支持泛型方法和类型,从而提供了更出色的类型安全和性能。

C# 还提供了迭代器,允许集合类的实现者定义自定义的迭代行为,简化了客户端代码对它的使用。

作为一种面向对象的语言,C# 支持封装、继承和多态性概念。

所有的变量和方法,包括 Main 方法(应用程序的入口点),都封装在类定义中。

类可能直接从一个父类继承,但它可以实现任意数量的接口。

重写父类中的虚方法的各种方法要求 override 关键字作为一种避免意外重定义的方式。

在 C# 中,结构类似于一个轻量类;它是一种堆栈分配的类型,可以实现接口,但不支持继承。

除了这些基本的面向对象的原理,C# 还通过几种创新的语言结构加快了软件组件的开发,其中包括:•封装的方法签名(称为委托),它实现了类型安全的事件通知。

•属性 (Property),充当私有成员变量的访问器。

•属性 (Attribute),提供关于运行时类型的声明性元数据。

•内联 XML 文档注释。

在 C# 中,如果需要与其他 Windows 软件(如 COM 对象或本机 Win32 DLL)交互,可以通过一个称为“Interop”的过程来实现。

互操作使 C# 程序能够完成本机 C++ 应用程序可以完成的几乎任何任务。

在直接内存访问必不可少的情况下,C# 甚至支持指针和“不安全”代码的概念。

C# 的生成过程比 C 和 C++ 简单,比 Java 更为灵活。

没有单独的头文件,也不要求按照特定顺序声明方法和类型。

C# 源文件可以定义任意数量的类、结构、接口和事件。

C# 程序在 .NET Framework 上运行,它是 Windows 的一个必要组件,包括一个称为公共语言运行时 (CLR) 的虚拟执行系统和一组统一的类库。

CLR 是Microsoft 的公共语言基础结构 (CLI) 的一个商业实现。

CLI 是一种国际标准,是用于创建语言和库在其中无缝协同工作的执行和开发环境的基础。

用 C# 编写的源代码被编译为一种符合 CLI 规范的中间语言 (IL)。

IL 代码与资源(如位图和字符串)一起作为一种称为程序集的可执行文件存储在磁盘上,通常具有的扩展名为 .exe 或 .dll。

程序集包含清单,它提供关于程序集的类型、版本、区域性和安全要求等信息。

执行 C# 程序时,程序集将加载到 CLR 中,这可能会根据清单中的信息执行不同的操作。

然后,如果符合安全要求,CLR 执行实时 (JIT) 编译以将 IL 代码转换为本机机器指令。

CLR 还提供与自动垃圾回收、异常处理和资源管理有关的其他服务。

由 CLR 执行的代码有时称为“托管代码”,它与编译为面向特定系统的本机机器语言的“非托管代码”相对应。

下图演示了 C# 源代码文件、基类库、程序集和 CLR 的编译时与运行时的关系。

语言互操作性是 .NET Framework 的一个关键功能。

因为由 C# 编译器生成的IL 代码符合公共类型规范 (CTS),因此从 C# 生成的 IL 代码可以与从 Visual Basic、Visual C++、Visual J# 的 .NET 版本或者其他 20 多种符合 CTS 的语言中的任何一种生成的代码进行交互。

单一程序集可能包含用不同 .NET 语言编写的多个模块,并且类型可以相互引用,就像它们是用同一种语言编写的。

除了运行时服务,.NET Framework 还包含一个由 4000 多个类组成的内容详尽的库,这些类被组织为命名空间,为从文件输入和输出到字符串操作、到 XML 分析、到 Windows 窗体控件的所有内容提供多种有用的功能。

相关文档
最新文档