英文文献及中文翻译_ASP.NET概述ASP.NETOverview
- 格式:docx
- 大小:13.26 KB
- 文档页数:8
是什么?简介简单来说, 是⼀个使⽤ HTML、CSS、JavaScript 和服务器脚本创建⽹页和⽹站的开发框架。
微软在2001年开发的第⼀个版本的,是⼀种建⽴在.NET之上的Web运⾏环境。
借助于,可以创造出内容丰富的、动态的、个性化的Web站点。
简单易学、功能强⼤、应⽤灵活、扩展性好,可以使⽤任何.NET兼容语⾔。
现在已经更新到4.7的版本了,但只能运⾏在Windows系统上,并不是跨平台的。
所以,微软后续⼜发布了的开源和跨平台版本的 Core(最新版已经更新到2.0)。
虽然⽬前最新技术是 Core,但作为 Core的基⽯,也并没有过时。
所以对于初学者来说,依然是⼀个不错的⼊门⽅向。
特点⼀.Web 控件 提供了七⼤类 Web 控件,分别是:1. ⽤于处理静态和动态数据的标准控件2. ⽤于显⽰来⾃数据源控件中指定的数据源数据的数据控件3. ⽤于各种不同类型验证的验证控件4. ⽤于在 ⽹页上创建菜单和其他导航辅助⼯具的导航控件5. ⽤于为 Web 应⽤程序提供可靠完整且⽆需编程的登录控件6. 使⽤户能够动态地对 Web 应⽤程序进⾏个性化设置的 Web 部件控件7. 在异步回发过程中进⾏部分页更新的 AJAX控件除此之外,还可以使⽤由开发⼈员或第三⽅软件供应商创建的⾃定义的控件。
有了这些控件,会⼤⼤降低开发⼈员的⼯作量。
例如使⽤GridView绑定数据,不⽤再写⼀套复杂的增删改查逻辑,只需要简单⼏步设置就能将数据绑定到控件上,省去了编写⼤量代码的时间。
开发⼈员甚⾄⽆需了解太多的编码知识,只需要将组件拖拉,组合,设计,就能快速开发出⼀个⽹页。
⼆.设计和代码分离采⽤了代码后置技术,将Web界⾯元素和程序逻辑分开显⽰,这样可以使代码更清晰,有利于阅读和维护。
三.⽀持服务器脚本语⾔使⽤⼀种服务端脚本技术(Razor),将服务器端代码同HTML代码结合起来,在⽹页返回给浏览器之前,基于服务器的代码可以创建动态的内容,并且可以运⾏更复杂的任务,使Web开发更加⾼效。
中英文对照外文翻译(文档含英文原文和中文翻译) Overview is a unified Web development model that includes the services necessary for you to build enterprise-class Web applications with a minimum of coding. is part of the .NET Framework, and when coding applications 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 applications that benefit from the common language runtime, type safety, inheritance, and so on. includes:• A page and controls framework•The compiler•Security infrastructure•State-management facilities•Application configuration•Health monitoring and performance features•Debugging support•An XML Web services framework•Extensible hosting environment and application life cycle management•An extensible designer environmentThe page and controls framework is a programming framework that runs on a Web server to dynamically produce and render Web pages. Web pages can be requested from any browser or client device, and renders markup (such as HTML) to the requesting browser. As a rule, you can use the same page for multiple browsers, because renders the appropriate markup for the browser making the request. However, you can design your Web page to target a specific browser, such as Microsoft Internet Explorer 6, and take advantage of the features of that browser. supports mobile controls for Web-enabled devices such as cellular phones, handheld computers, and personal digital assistants (PDAs). Web pages are completely object-oriented. Within Web pages you can work with HTML elements using properties, methods, and events. The page framework removes the implementation details of the separation of client and server inherent in Web-based applications by presenting a unified model for responding to client events in code that runs at the server. The framework also automatically maintains the state of a page and the controls on that page during the page processing life cycle.The page and controls framework also enables you to encapsulate common UI functionality in easy-to-use, reusable controls. Controls are written once, can be used in many pages, and are integrated into the Web page that they are placed in during rendering.The page and controls framework also provides features to control the overall look and feel of your Web site via themes and skins. You can define themes and skins and then apply them at a page level or at a control level.In addition to themes, you can define master pages that you use to create a consistent layout for the pages in your application. A single master page defines the layout and standard behavior that you want for all the pages (or a group of pages) in your application. You can then create individual content pages that contain the page-specific content you want to display. When users request the content pages, they merge with the master pageto produce output that combines the layout of the master page with the content from the content page.All code is compiled, which enables strong typing, performance optimizations, and early binding, among other benefits. Once the code has been compiled, the common language runtime further compiles code to native code, providing improved performance. includes a compiler that will compile all your application components including pages and controls into an assembly that the hosting environment can then use to service user requests.In addition to the security features of .NET, provides an advanced security infrastructure for authenticating and authorizing user access as well as performing other security-related tasks. You can authenticate users using Windows authentication supplied by IIS, or you can manage authentication using your own user database using forms authentication and membership. Additionally, you can manage the authorization to the capabilities and information of your Web application using Windows groups or your own custom role database using roles. You can easily remove, add to, or replace these schemes depending upon the needs of your application. always runs with a particular Windows identity so you can secure your application using Windows capabilities such as NTFS Access Control Lists (ACLs), database permissions, and so on. For more information on the identity of , provides intrinsic state management functionality that enables you to store information between page requests, such as customer information or the contents of a shopping cart. You can save and manage application-specific, session-specific,page-specific, user-specific, and developer-defined information. This information can be independent of any controls on the page. offers distributed state facilities, which enable you to manage state information across multiple instances of the same application on one computer or on several computers. applications use a configuration system that enables you to define configuration settings for your Web server, for a Web site, or for individual applications. You can make configuration settings at the time your applications are deployed and can add or revise configuration settings at any time with minimal impact on operational Web applications and servers. configuration settings are stored in XML-based files. Because these XML files are ASCII text files, it is simple to make configuration changes to your Web applications. You can extend the configuration scheme to suit your requirements. includes features that enable you to monitor health and performance of your application. health monitoring enables reporting of key events that provide information about the health of an application and about error conditions. These events show a combination of diagnostics and monitoring characteristics and offer a high degree of flexibility in terms of what is logged and how it is logged. supports two groups of performance counters accessible to your applications: •The system performance counter group•The application performance counter group takes advantage of the run-time debugging infrastructure to provide cross-language and cross-computer debugging support. You can debug both managed and unmanaged objects, as well as all languages supported by the common language runtime and script languages.In addition, the page framework provides a trace mode that enables you to insert instrumentation messages into your Web pages. supports XML Web services. An XML Web service is a component containing business functionality that enables applications to exchange information across firewalls using standards like HTTP and XML messaging. XML Web services are not tied to a particular component technology or object-calling convention. As a result, programs written in any language, using any component model, and running on any operating system can access XML Web services. includes an extensible hosting environment that controls the life cycle of an application from when a user first accesses a resource (such as a page) in the application to the point at which the application is shut down. While relies on a Web server (IIS) as an application host, provides much of the hosting functionality itself. The architecture of enables you to respond to application events and create custom HTTP handlers and HTTP modules. includes enhanced support for creating designers for Web server controls for use with a visual design tool such as Visual Studio. Designers enable you to build a design-time user interface for a control, so that developers can configure your control's properties and content in the visual design tool.Introduction to the C# Language and the .NET Framework C# is an elegant and type-safe object-oriented language that enables developers to build a wide range of secure and robust applications that run on the .NET Framework. You can use C# to create traditional Windows client applications, XML Web services, distributed components,client-server applications, database applications, and much, much more. Microsoft Visual C# 2005 provides an advanced code editor, convenient user interface designers, integrated debugger, and many other tools to facilitate rapid application development based on version 2.0 of the C# language and the .NET Framework.NoteThe Visual C# documentation assumes that you have an understanding of basic programming concepts. If you are a complete beginner, you might want to explore Visual C# Express Edition, which is available on the Web. You can also take advantage of any of several excellent books and Web resources on C# to learnpractical programming skills.C# syntax is highly expressive, yet with less than 90 keywords, it is also simple and easy to learn. The curly-brace syntax of C# will be instantly recognizable to anyone familiar with C, C++ or Java. Developers who know any of these languages are typically able to begin working productively in C# within a very short time. C# syntax simplifies many of the complexities of C++ while providing powerful features such as nullable value types, enumerations, delegates, anonymous methods and direct memory access, which are not found in Java. C# also supports generic methods and types, which provide increased type safety and performance, and iterators, which enable implementers of collection classes to define custom iteration behaviors that are simple to use by client code.As an object-oriented language, C# supports the concepts of encapsulation, inheritance and polymorphism. All variables and methods, including the Main method, the application's entry point, are encapsulated within class definitions. A class may inherit directly from one parent class, but it may implement any number of interfaces. Methodsthat override virtual methods in a parent class require the override keyword as a way to avoid accidental redefinition. In C#, a struct is like a lightweight class; it is astack-allocated type that can implement interfaces but does not support inheritance.In addition to these basic object-oriented principles, C# facilitates the development of software components through several innovative language constructs, including: •Encapsulated method signatures called delegates, which enable type-safe event notifications.•Properties, which serve as accessors for private member variables. •Attributes, which provide declarative metadata about types at run time.•Inline XML documentation comments.If you need to interact with other Windows software such as COM objects or native Win32 DLLs, you can do this in C# through a process called "Interop." Interop enables C# programs to do just about anything that a native C++ application can do. C# even supports pointers and the concept of "unsafe" code for those cases in which direct memory access is absolutely critical.The C# build process is simple compared to C and C++ and more flexible than in Java. There are no separate header files, and no requirement that methods and types be declared in a particular order. A C# source file may define any number of classes, structs, interfaces, and events.C# programs run on the .NET Framework, an integral component of Windows that includes a virtual execution system called the common language runtime (CLR) and a unified set of class libraries. The CLR is Microsoft's commercial implementation of the common language infrastructure (CLI), an international standard that is the basis for creating execution and development environments in which languages and libraries work together seamlessly.Source code written in C# is compiled into an intermediate language (IL) that conforms to the CLI specification. The IL code, along with resources such as bitmaps and strings, is stored on disk in an executable file called an assembly, typically with an extension of .exe or .dll. An assembly contains a manifest that provides information on the assembly's types, version, culture, and security requirements.When the C# program is executed, the assembly is loaded into the CLR, which might take various actions based on the information in the manifest. Then, if the security requirements are met, the CLR performs just in time (JIT) compilation to convert the IL code into native machine instructions. The CLR also provides other services related to automatic garbage collection, exception handling, and resource management. Code that is executed by the CLR is sometimes referred to as "managed code," in contrast to "unmanaged code" which is compiled into native machine language that targets a specific system. The following diagram illustrates the compile-time and run time relationships of C# source code files, the base class libraries, assemblies, and the CLR.Language interoperability is a key feature of the .NET Framework. Because the IL code produced by the C# compiler conforms to the Common Type Specification (CTS), IL code generated from C# can interact with code that was generated from the .NET versions of Visual Basic, Visual C++, Visual J#, or any of more than 20 otherCTS-compliant languages. A single assembly may contain multiple modules written in different .NET languages, and the types can reference each other just as if they were written in the same language.In addition to the run time services, the .NET Framework also includes an extensive library of over 4000 classes organized into namespaces that provide a wide variety of useful functionality for everything from file input and output to string manipulation to XML parsing, to Windows Forms controls. The typical C# application uses the .NET Framework class library extensively to handle common "plumbing" chores. 概述 是一个统一的 Web 开发模型,它包括您使用尽可能少的代码生成企业级 Web 应用程序所必需的各种服务。
外文翻译原文1 2.0 Web Pages and Web Controls U ntil now, all of the example applications in this text have focused on console-based and Windows Forms front ends. In this chapter and the next, you’ll explore how the .NET platform facilitates the construction of browser-based presentation layers. To begin, you’ll quickly review a number of key web-centric concepts (HTTP, HTML, client-side, and server-side script) and the role of the web server (including the development server, WebDev.WebServer.exe).With this web primer out of the way, the remainder of this chapter concentrates on the composition of (including the enhanced code-behind model) and how to work with web controls. As you will see, ASP.NE T 2.0 provides a number of new web controls, a new “master page”model, and various customization techniques.The Role of HTTPWeb applications are very different animals from traditional desktop applications (to say the least).The first obvious difference is that a production-level web application will always involve at least two networked machines (of course, during development it is entirely possible to have a single machine play the role of both client and server). Given this fact, the machines in question must agree upon a particular wire protocol to determine how to send and receive data. The wire protocol that connects the computers in question is the Hypertext Transfer Protocol (HTTP).When a client machine launches a web browser (such as Netscape Navigator, Mozilla Firefox,or Microsoft Internet Explorer), an HTTP request is made to access a particular resource (such as an *.aspx or *.htm file) on the remote server machine. HTTP is a text-based protocol that is built upon a standardrequest/response paradigm. For example, if you navigate to www. , the browser software leverages a web technology termed Domain Name Service (DNS) that converts the registered URL into a four-part, 32-bit numerical value (aka an IP address). At this point, the browser opens a socket connection (typically via port 80) and sends the HTTP request for the default page at the website.Once the hosting web server receives the incoming HTTP request, the specified resource may contain logic that scrapes out any client-supplied input values (such as values within a text box) in order to format a proper HTTP response. Web programmers may leverage any number of technologies (CGI, ASP, , Java servlets, etc.) to dynamically generate the content to be emitted into the HTTP response. At this point, the client-side browser renders the HTML emitted from the web server.Another aspect of web development that is markedly different from traditional desktop programming is the fact that HTTP is an essentially stateless wire protocol. As soon as the web server emits a response to the client, everything about the previous interaction is forgotten. Therefore, as a web developer, it is up to you take specific steps to “remember” information (s uch as items in a shopping cart) about the clients who are currently logged on to your site. As you will see in the next chapter, provides numerous ways to handle state, many of which are commonplace to any web platform (session variables, cookies, and application variables) as well as some new techniques (view state, control state, and the cache).Understanding Web Applications and Web ServersA web application can be understood as a collection of files (*.htm, *.asp, *.aspx, image files, etc.) and related components (such as a .NET code library) stored within a particular set of directories on a given web server. As shown in Chapter 24, web applications have a specific life cycle and provide numerous events (such as initial startup or final shutdown) that you can hook into.A web server is a software product in charge of hosting your web applications, and it typically provides a number of related services such as integrated security, File Transfer Protocol (FTP) support, mail exchange services, and so forth. Internet Information Server (IIS) is Microsoft’s enterprise-level web server product, and as you would guess, it has intrinsic support for classic ASP as well as web applications.When you build web applications, you will often need to interact with IIS. Be aware, however, that IIS is not automatically selected when you install the Windows Server 2003 or WindowsXP Professional Edition (you can’t install IIS on the Home editions of Windows). Therefore, depending on the configuration of your development machine, you may be required to manually install IIS before proceeding through this chapter. To do so, simply access the Add/Remove Program applet from the Control Panel folder and select Add/Remove Windows Components.Working with IIS Virtual DirectoriesA single IIS installation is able to host numerous web applications, each of which resides in a virtual directory. Each virtual directory is mapped to a physical directory on the local hard drive. Therefore,if you create a new virtual directory named CarsRUs, the outside world can navigate to this site using a URL such as (assuming your site’s IP address has been registered with the world at large). Under the hood, the virtual directory maps to a physical root directory such as C:\inetpub\wwwroot\AspNetCarsSite, which contains the content of the web application.When you create web applications using Visual Studio 2005, you have the option of generating a new virtual directory for the current website. However, you are also able to manually create a virtual directory by hand. For the sake of illustration, assume you wish to create a simple web application named Cars. The first step is to create a new folder on your machine to hold the collection of files that constitute this new site (e.g., C:\CodeTests\CarsWebSite).Next, you need to create a new virtual directory to host the Cars site. Simply right-click the Default Web Site node of IIS and select New ➤Virtual Directory from the context menu. This menu selection launches an integrated wizard. Skip past the welcome screen and give your website a name (Cars). Next, you are asked to specify the physical folder on your hard drive that contains the various files and images that represent this site (in this case, C:\CodeTests\CarsWebSite).The final step of the wizard prompts you for some basic traits about your new virtual directory (such as read/write access to the files it contains, the ability to view these files from a web browser, the ability to launch executables [e.g., CGI applications], etc.). For this example, the default selections are just fine (be aware that you can always modify your selections after running this tool using variousright-click Property dialog boxes integrated within IIS). 2.0网页和Web控件到现在为止,本书的示例应用程序主要集中在控制台和基于Windows窗体前端。
基于.NET平台的电力设备管理系统1前言电力建设是国民经济发展中一项重要、复杂的系统工程。
近年来国家一直投入巨资进行的大规模城乡电网改造,无疑显示出了电网建设的重要性,随着电力建设的飞速发展和电力体制改革的不断深入,传统的管理模式和管理方法越来越凸现出其自身的诸多弊端,其中电力设备的管理作为电力系统运行的重要环节,它的发展与现代化对整个电力的发展起着至关重要的作用,但是,由于电力设备数量多、分布地域广、受自然环境和人为因素影响的机会比较多,因此在运行管理工作中存在许多困难。
基于.NET平台的电力设备管理系统是适应当前电力行业设备管理和生产管理需要的信息系统,从而起到充分发挥现有各种信息资源的作用,达到管理行为规范化、管理制度流程化、管理结果信息化,管理手段现代化的最终目的。
2主题平台概述ASP指Active Server Pages(动态服务器页面)。
是新一代Web应用程序开发平台,它为用户提供了完整的可视化开发环境,它利用普通语言CLR运行时(Common Language Runtime)在服务器后端为用户提供建立强大的企业级Web应用服务的编程框架。
ASP.NET是建立在.NET Frame之上,使用Visual Basic、C#这样模块化程序设计语言。
它要第一次使用时进行编译,之后的执行不需要重新编译就可以直接运行,所以速度和效率比ASP提高很多。
同时它还具有代码的可重用性、可维护性和代码量相对较少等诸多优点。
ASP.NET不仅仅是下一版本的Active Senver Page(ASP);它是统一的Web开发平台,用来提供开发人员快速生成企业级web 应用程序,所需的服务ASP.NET的语法在很大程度上与ASP兼容。
由于ASP本身的局限性使得系统有一些不可克服的缺陷,而采取了ASP.NET技术的系统性能上有了很大的改善:1)ASP.NET页面只需要一次编译后不需要重新编译,直到该页面被修改或WEB应用程序重新启动,极大提升多次访问时的速度;2)ASP.NET通过ADO.NET 提供的DataGrid等数据库元件可以直接和数据库联系;3)ASP.NET采取“code —behind”方式编写代码使得代码易于编写,结构更清晰,降低了系统的开发与维护的复杂度和费用。
技术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的类被组织成有层次结构的命名空间。
Introduction to DevelopmentTo overcome the performance and scalability problems that CGI brings, Microsoft developed a new way for developers to build scalable applications. This high performance alternative is called the Internet Server Application Programming Interface(ISAPI). Instead of housing functionality in executable files, ISAPI uses DLLs. Using DLLs instead of executable programs has some definite performance and scalability advantages The ISAPI extension could also be called with arguments that will allow a single ISAPI extension to perform multiple tasks. Just as in the CGI example, the directory must have execute permissions enabled, or the DLL will be downloaded to the client rather than run on the server. ISAPI extensions are typically used to process client requests and output a response as HTML, which is very similar to the way CGI programs are used.ISAPI filters perform a function that can’t be directly duplicated with CGI applications. ISAPI filters are never explicitly called; instead, they are called by IIS in response to certain events in the life of a request. The developer can request that an ISAPI filter be called whenever any of the following events occur:1.When the server has preprocessed the client headers2.When the server authenticates the client3.When the server is mapping a logical URL to a physical URL4.Before raw data is sent from the client to the server5.After raw data is sent from the client to the server but before the server processes it 6.When the server logs information7.When the session is endingAs with any filter, ISAPI filters should request only the notifications it requires and process them as quickly as possible. One of the more common uses of ISAPI filters is to provide custom authentication. Another use is to modify the HTML that will be sent to the client. For example, an ISAPI filter could be used to change the background color of each page. Because ISAPI filters aren’t nearly as common as ISAPI extensions, I won’t cover them any further in this book. If you want to learn more about ISAPI extensions, you can check out my book Inside Server-Based Applications (Microsoft Press, 1999).ISAPI specifies several entry-point functions that must be exported from the DLL. Using these entry points, IIS can load the DLL; call the functions that it implements, passing in parameters as required; and receive the data to write back to the browser. ISAPI requires only two entry-point functions to be implemented these entry points, IIS can load the DLL;call the functions that it implements, passing in parameters as required; and receive the data to write back to the browser. ISAPI requires only two entry-point functions to be implementedA Better Solution: Active Server PagesIf you’re wondering why we’ve dwelt on th e alternatives to in a book about programming , the answer lies in the details of the implementation of and its predecessor, Active Server Pages (ASP). Understanding ISAPI is required for adept understanding of ASP and thus .During the beta of IIS 2.0, which became part of Windows NT 4.0, Microsoft introduced a new technology initially codenamed “Denali.” This was during Microsoft’s “Active” period and so the technology was eventually named Active Server Pages, or ASP. Several versions of have been released, most notably the versions included with Windows NT 4.0 Option Pack (ASP 2.0 and IIS 4.0) and Windows 2000 (ASP 3.0 and IIS 5.0). For the purposes of this discussion, I’ll consider ASP as a whole, without referring t o version differences became an instant hit, in large part because it made something that was difficult(create dynamic Web content) relatively easy. Creating CGI applications and ISAPI applications wasn’t terribly difficult, but using ASP was much simpler By default, ASP uses VBScript. Literally millions of developers are at least somewhat familiar with Visual Basic, Visual Basic for Applications (VBA), or VBScript. For these developers, ASP was the way to enter the Internet age. Certainly the developers could have learned a new programming language, but they didn’t have to with ASP. Partly because of its use of VBScript, ASP became a viable way to build Web applications.Just as important was the relatively easy access to databases allowed through Microsoft ActiveX Data Objects (ADO). When you need to generate dynamic content, that dynamic content obviously needs to come from somewhere, and ADO made it easy to get at that data.Finally, and perhaps most important, the development model allowed developers to essentially write code and run it. There was no need to perform compilation or elaborate installation steps. the architects were careful to capture this same development model, even though what’s going on under the covers is quite a bit different.A New Solution: When version 3.0 of was released along with Windows 2000, it became clearer that the future of software development was closely tied to the future of the Web. As part of its .NET initiative, Microsoft has introduced , a new version of ASP that retains the model of development ASP developers have come to know and love: youcan create the code and place it in the correct directory with the proper permissions, and it will just work. also introduces innovations that allow easier separation of the development of the core of an application and its presentation. adds many features to and enhances many of the capabilities in classic isn’t merely an incremental improvement to ASP; it’s really a completely new product, albeit a new product designed to allow the same development experience that ASP developers have enjoyed. Here are some of the notable features of : .NET Framework: The .NET Framework is an architecture that makes it easier to design Web and traditional applications.Common language runtime: The common language runtime provides a set of services for all languages. If you’re an ASP developer who has had to combine ASP scripting with COM objects, you’ll apprecia te the beauty of a common set of types across many languages.Compiled languages: provides enhanced performance through the use of compiled languages. Compiled languages allow the developer to verify that code is at least syntactically correct. ASP doesn’t provide any such facility, so simple syntax errors might not be caught until the first time the code is executed.Cool new languages Visual Basic: .NET is a completely new version of Visual Basic that provides a new, cleaner syntax. C# is a new language designed to look and feel a lot like C++, but without some of the unsafe features that make C++ difficult to use to create reliable applications. These two languages are available out of the box, but other languages will be available from third parties as well. As of this writing, COBOL and Eiffel implementations should be available for Visual Studio .NET as well.Visual Studio .NET: Visual Studio .NET is a cool new development environment that brings rapid application development (RAD) to the server.Improved components: The .NET Framework supports the use of new types of components that can be conveniently replaced in a running application.Web Forms: Web Forms allow Visual Basic–like development, with event handlers for common HTML widgets.XML Web services: XML Web services enable developers to create services and then make them available using industry standard protocols.: ADO for the .NET Framework is a new version of the technology that allows applications to more conveniently get at data residing in relational databases and in other formats, such as Extensible Markup Language (XML.) ConclusionThis brief history of Web development should provide you with a foundation as youcontinue reading about . Learning a programming language or development environment is much like learning a human language. Although books that cover the syntax and vocabulary are helpful, it’s often just as useful to understand the history of the people who use the language.If you’re an develope r, much of this chapter might be a review for you, but I hope that you’ve added something to your understanding of the history of . If you’re new to ASP and , understanding the history of ASP and what came before it will be useful as you begin to explore the exciting new technologies that make up .About Active Server Aside from the burden is not only (ASP) version of the next; It also provides a unified Web development models, including the development of enterprise-class Web applications generated personnel for the various services. grammar largely compatible with ASP, it also provides a new programming model and structure, flexibility and stability can produce better applications, and to provide better security protection. Through the existing ASP applications, gradually add functions to enhance ASP applications functions.When building applications, developers can use Web or XML Web services, or in any manner they deemed appropriate portfolio. Each functional access to the same support structure, so that you can use as a certification program, buffer frequently used data, or configuration of applications for self definition, only listed a few possibilities here.Y ou can use Web-based generation of powerful the Web page. These generated pages, can be used to build public complaints server UI elements, and programming for the implementation of their common task. Y ou can use these complaints to the building or from reusable components generated Web definition, thus simplifying the code page. For more information, please see Web pages. XML Web services provide a means of remote access server functions. Use XML Web services, enterprises can open data or business logic programming interface, and client-server applications and can acquire and operate these programming interfaces. Through the use of information such as web and XML standards such as the transmission of data across mobile firewall, XML Web services to customers - in-server or server-server programmed for data exchange. XML Web services without relying on specific components or technology transfer targets agreed. Therefore, the use of any language, using any component model, operating system and in any operating procedures can visit XML Web services. and. Net Framework version 1.1 installed, as each part of the Windows Server 2003 series products. Y ou can add it through the control panels for the newprocedures, or use "of your server guide" opening it. In addition, according to this theme later introduced "with Windows XP Professional or Windows 2000 Server computer installed " process downloading 1.0. Installed Visual Studio. Net will also install 1.0.Use "of your server guide," in the operation of the Windows Server 2003 server installed .In the mission column, hit "start" button and then hit the "management of your servers," in the "management of your servers" window, hit "Add or remove players."In the "configuration of your server guide", hit the "next step" in the "server roles", selected "application servers (IIS, )," and then hit "next". "applications server option", hit the "opening " of, hit the "next" and then hit "next". If necessary, inserted in CD-ROM drive Windows Server 2003 installation CD, and then hit the "next step." Installation completed, hit the "completion."The use of "add / delete process" in operating the Windows Server 2003 server installed . In the mission column, hit "start" button, pointing to "control panels" and then hit the "add or delete procedures." "Windows components guides," "components" box, hit the "application server" of, then hit the "next step." When the "Windows components guides" configuration End Windows Server 2003, hit the "completion."In Windows Server 2003 series products in China by opening Server ManagementColumn in the mission, hit "start" button and then hit the "operation." In the "operation open" box, the importation and then hit "determined." ."Server management machine", a "local computer" and then hit "Web service expansion." Panes right, hit "" and then hit "allowed." state then changed to "allow".In operation running Windows XP Professional or Windows 2000 computer, download and install . If necessary, install and start IIS. On the installation, please refer to the operating system files. At /downloads/default.asp, a "Software Development Kits" (software development kits), hit the "Microsoft. net Framework SDK, "and then read the page on the SDK download requests, notes and choice. Hit for download option, and read the end-user licensing agreements, and then hit the "yes" (is). "document downloaded", download options to preserve documents, the choice to install procedures and documents downloaded to personal tale of folder, and then hit the "preservation". Check up on the latest personal tale of any document. Download documents located in the folder, Net Framework installation procedures Setup.exe.If you have IIS installed and activated, the installation of and. Net Framework, deployed applications and requests a page, but received one of the followingerror message, indicating the Web site has not been for the establishment of an appropriate authority or directory :"C:\Inetpub\Wwwroot" catalogue visit was denied. Failure to start monitoring directory changes. Server applications to visit catalogue "C:\Inetpub\Wwwroot\ Virtual Directory Name \". The catalogue does not exist or could not be visited for security establishment.At root Web site or any virtual directory, needs account (Aspnet_wp.exe process account) the retrieval, delivery and set limits. These must be installed, can visit the contents of documents and surveillance document changes. Requests the Executive next steps corrected the problem.Web site or virtual directory in the root of adding account retrieval, delivery and competence listedIn Windows resources management devices, to browse Web sites containing roots(acquiescence to the establishment of : C:\Inetpub\Wwwroot) or the virtual directory folder. In the "safe" choice card, hit "Add". Import Computer Name \ASPNET (for example, in the computer named Web imported Web\ASPNET), and then hit "determined." Allow account the following date: retrieval and implementation, a folder content, retrieval. Attention if the "Everyone" (Everyone) group or "users" group to retrieve root Web site or virtual directory, there would be no need to implement these steps.In Windows 2003 domain controller server, applications to network service identity operation (nothing to do with IIS isolation mode). In some cases, the domain controller function request to take additional steps to make your normal installation. 1.1 operating in the domain controller on the issue of the potential problems more information, Please see Microsoft knowledge base article Q824308 "IWAM Account is Not Granted the Impersonate Privilege for 1.1 on Windows 2000 Domain Controller with SP4" (SP4 installed in the Windows 2000 domain controller, not to IWAM account for 1.1 simulation Privileges), Web site knowledge base for . In the domain controller function. Net Framework 1.0 more information, Please see Microsoft knowledge base article Q315158, " Does Not Work with the Default Account on a Domain Controller" (with the domain controller, not the acquiescence account work), Web site knowledge base for .Author: ouglas J. TomFrom: Microsoft Applications设计应用因特网服务器应用程式介面:CGI具有扩充性能和克服的问题的能力,是微软公司开发的一种新的方式开发建设规模的应用。
ASP毕业论文中英文资料外文翻译附件1:外文资料翻译译文 概述 是一个统一的 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 功能封装成易于使用且可重用的控件。
控件只需编写一次,即可用于许多页并集成到 网页中。
附录 1 英文原文Introduction to Pages and Inline Code and Share[10] The Web Forms page framework is a scalable common language runtime programming model that can be used on the server to dynamically generate Web pages. Intended as a logical evolution of ASP ( provides syntax compatibility with existing pages), the page framework has been specifically designed to address a number of key deficiencies in the previous model. In particular, it provides the ability to create and use reusable UI controls that can encapsulate common functionality and thus reduce the amount of code that a page developer has to write, the ability for developers to cleanly structure their page logic in an orderly fashion (not "spaghetti code"), and the ability for development tools to provide strong WYSIWYG design support for pages (existing classic ASP code is opaque to tools). This section of the QuickStart provides a high-level code walkthrough of some basic page features. Subsequent sections of the QuickStart drill down into more specific details. pages are text files with an .htm file name extension. Pages consist of code and markup and are dynamically compiled and executed on the server to produce a rendering to the requesting client browser (or device). They can be deployed throughout an IIS virtual root directory tree. When a browser client requests .htm resources, the runtime parses and compiles the target file into a .NET Framework class. This class can then be used to dynamically process incoming requests. (Note that the .htm file is compiled only the first time it is accessed; the compiled type instance is then reused across multiple requests).An page can be created simply by taking an existing HTML file and changing its file name extension to .htm (no modification of code is required). For example, the following sample demonstrates a simple HTML page that collects a user's name and category preference and then performs a form postback to the originating page when a button is clicked:Important: Note that nothing happens yet when you click the Lookup button. Thisis because the .htm file contains only static HTML (no dynamic content). Thus, the same HTML is sent back to the client on each trip to the page, which results in a loss of the contents of the form fields (the text box and drop-down list) between requests. provides syntax compatibility with existing ASP pages. This includes support for <% %> code render blocks that can be intermixed with HTML content within an .htm file. These code blocks execute in a top-down manner at page render time.The below example demonstrates how <% %> render blocks can be used to loop over an HTML block (increasing the font size each time):Important: Unlike with ASP, the code used within the above <% %> blocks is actually compiled--not interpreted using a script engine. This results in improved runtime execution performance. page developers can utilize <% %> code blocks to dynamically modify HTML output much as they can today with ASP. For example, the following sample demonstrates how <% %> code blocks can be used to interpret results posted back from a client.Important: While <% %> code blocks provide a powerful way to custom manipulate the text output returned from an page, they do not provide a clean HTML programming model. As the sample above illustrates, developers using only <% %> code blocks must custom manage page state between round trips and custom interpret posted values.In addition to code and markup, pages can contain server controls, which are programmable server-side objects that typically represent a UI element in the page, such as a textbox or image. Server controls participate in the execution of the page and produce their own markup rendering to the client. The principle advantage of server controls is that they enable developers to get complex rendering and behaviors from simple building-block components, dramatically reducing the amount of code it takes to produce a dynamic Web page. Another advantage of server controls is that it is easy to customize theirrendering or behavior. Server controls expose properties that can be set either declaratively (on the tag) or programmatically (in code). Server controls (and the page itself) also expose events that developers can handle to perform specific actions during the page execution or in response to a client-side action that posts the page back to the server (a "postback"). Server controls also simplify the problem of retaining state across round-trips to the server, automatically retaining their values across successive postbacks.Server controls are declared within an .htm file using custom tags or intrinsic HTML tags that contain a runat="server" attribute value. Intrinsic HTML tags are handled by one of the controls in the System.Web.UI.HtmlControls namespace. Any tag that doesn't explicitly map to one of the controls is assigned the type of System.Web.UI.HtmlControls.HtmlGenericControl.Important: Note that these server controls automatically maintain anyclient-entered values between round trips to the server. This control state is not stored on the server (it is instead stored within an <input type="hidden"> form field that is round-tripped between requests). Note also that no client-side script is required.In addition to supporting standard HTML input controls, enables developers to utilize richer custom controls on their pages. For example, the following sample demonstrates how the <asp:adrotator> control can be used to dynamically display rotating ads on a page.Each server control is capable of exposing an object model containing properties, methods, and events. developers can use this object model to cleanly modify and interact with the page.Note, however, how much cleaner and easier the code is in this new server-control-based version. As we will see later in the tutorial, the page Framework also exposes a variety of page-level events that you can handle to write code to execute a specific time during the processing of the page. Examples of these events are Page_Load and Page_Render.The example below demonstrates a simple page with three servercontrols, a TextBox, Button, and a Label. Initially these controls just render their HTML form equivalents. However, when a value is typed in the TextBox and the Button is clicked on the client, the page posts back to the server and the page handles this click event in the code of the page, dynamically updating the Text property of the Label control. The page then re-renders to reflect the updated text. This simple example demonstrates the basic mechanics behind the server control model that has made one of the easiest Web programming models to learn and master.Note that in the preceding example the event handler for the Button was located between <script></script>tags in the same page containing the server controls. calls this type of page programming code-inline, and it is very useful when you want to maintain your code and presentation logic in a single file. However, also supports another way to factor your code and presentation content, called the code-behind model. When using code-behind, the code for handling events is located in a physically separate file from the page that contains server controls and markup. This clear delineation between code and content is useful when you need to maintain these separately, such as when more than one person is involved in creating the application. It is often common in group projects to have designers working on the UI portions of an application while developers work on the behavior or code. The code-behind model is well-suited to that environment. 2.0 introduces an improved runtime for code-behind pages that simplifies the connections between the page and code. In this new code-behind model, the page is declared as a partial class, which enables both the page and code files to be compiled into a single class at runtime. The page code refers to the code-behind file in the CodeFile attribute of the <%@ Page %>directive, specifying the class name in the Inherits attribute. Note that members of the code behind class must be either public or protected (they cannot be private).The advantage of the simplified code-behind model over previous versions is that you do not need to maintain separate declarations of server control variablesin the code-behind class. Using partial classes (new in 2.0) allows the server control IDs of the ASPX page to be accessed directly in the code-behind file. This greatly simplifies the maintenance of code-behind pages.Although you can place code inside each page within your site (using the inline or code-behind separation models described in the previous section), there are times when you will want to share code across several pages in your site. It would be inefficient and difficult to maintain this code by copying it to every page that needs it. Fortunately, provides several convenient ways to make code accessible to all pages in an application.Just as pages can be compiled dynamically at runtime, so can arbitrary code files (for example .cs or .vb files). 2.0 introduces the App_Code directory, which can contain standalone files that contain code to be shared across several pages in your application. Unlike 1.x, which required these files to be precompiled to the Bin directory, any code files in the App_Code directory will be dynamically compiled at runtime and made available to the application. It is possible to place files of more than one language under the App_Code directory, provided they are partitioned in subdirectories (registered with a particular language in Web.config). The example below demonstrates using the App_Code directory to contain a single class file called from the page.By default, the App_Code directory can only contain files of the same language. However, you may partition the App_Code directory into subdirectories (each containing files of the same language) in order to contain multiple languages under the App_Code directory. To do this, you need to register each subdirectory in the Web.config file for the application.<configuration><system.web><compilation><codeSubDirectories><add directoryName="Subdirectory"/></codeSubDirectories></compilation></system.web></configuration>Supported in version 1, the Bin directory is like the Code directory, except it can contain precompiled assemblies. This is useful when you need to use code that is possibly written by someone other than yourself, where you don't have access to the source code (VB or C# file) but you have a compiled DLL instead. Simply place the assembly in the Bin directory to make it available to your site. By default, all assemblies in the Bin directory are automatically loaded in the app and made accessibe to pages. You may need to Import specific namespaces from assemblies in the Bin directory using the @Import directive at the top of the page.The .NET Framework 2.0 includes a number of assemblies that represent the various parts of the Framework. These assemblies are stored in the global assembly cache, which is a versioned repository of assemblies made available to all applications on the machine (not just a specific application, as is the case with Bin and App_Code). Several assemblies in the Framework are automatically made available to applications. You can register additional assemblies by registration in a Web.config file in your application.<configuration><compilation><assemblies><add assembly="System.Data, Version=1.0.2411.0,Culture=neutral,PublicKeyToken=b77a5c561934e089"/></assemblies></compilation></configuration>附录 2 中文译文介绍以及内联代码和共享 Web 窗体页框架是一种可用于在服务器上动态生成网页的可伸缩公共语言运行库编程模型。
英文文献及中文翻译 Overview is a unified Web development model that includes the services necessary for you to build enterprise-class Web applications with a minimum of is part of the .NET Framework, and when coding applications 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 and C#. These languages enable you to develop applications that benefit from the common language runtime, type safety, inheritance, and so on.If you want to try , you can install Visual Web Developer Express using the Microsoft Web Platform Installer, which is a free tool that makes it simple to download, install, and service components of the Microsoft Web Platform.These components include Visual Web Developer Express, Internet Information Services (IIS), SQL Server Express, and the .NET Framework. All of these are tools that you use to create Web applications. You can also use the Microsoft Web Platform Installer to install open-source and PHP Web applications.Visual Web DeveloperVisual Web Developer is a full-featured development environment for creating Web applications. Visual Web Developer provides an ideal environment in which to build Web sites and then publish them to a hosting site. Using the development tools in Visual Web Developer, you can develop Web pages on your own computer. Visual Web Developer includes a local Web server that provides all the features you need to test and debug Web pages, without requiring Internet Information Services (IIS) to be installed.Visual Web Developer provides an ideal environment in which to build Web sitesand then publish them to a hosting site. Using the development tools in Visual Web Developer, you can develop Web pages on your own computer. Visual Web Developer includes a local Web server that provides all the features you need to test and debug Web pages, without requiring Internet Information Services (IIS) to be installed.When your site is ready, you can publish it to the host computer using the built-in Copy Web tool, which transfers your files when you are ready to share them with others. Alternatively, you can precompile and deploy a Web site by using the Build Web Site command. The Build Web Sitecommand runs the compiler over the entire Web site (not just the code files) and produces a Web site layout that you can deploy to a production server.Finally, you can take advantage of the built-in support for File Transfer Protocol (FTP).Using the FTP capabilities of Visual Web Developer, you can connect directly to the host computer and then create and edit files on the server. Web Sites and Web Application ProjectsUsing Visual Studio tools, you can create different types of projects, which includes Web sites, Web applications, Web services, and AJAX server controls.There is a difference between Web site projects and Web application projects. Some features work only with Web application projects, such as MVC and certain tools for automating Web deployment. Other features, such as Dynamic Data, work with both Web sites and Web application projects.Page and Controls FrameworkThe page and controls framework is a programming framework that runs on a Web server to dynamically produce and render Web pages. Web pages can be requested from any browser or client device, and renders markup (such as HTML) to the requesting browser. As a rule, you can use the samepage for multiple browsers, because renders the appropriate markup for the browser making the request. However, you can design your Web page to target a specific browser and take advantage of the features of that browser. Web pages are completely object-oriented. Within Web pages you can work with HTML elements using properties, methods, and events. The page framework removes the implementation details of the separation of client and server inherent in Web-based applications by presenting a unified model for responding to client events in code that runs at the server. The framework also automatically maintains the state of a page and the controls on that page during the page processing life cycle.The page and controls framework also enables you to encapsulate common UI functionality in easy-to-use, reusable controls. Controls are written once, can be used in many pages, and are integrated into the Web page that they are placed in during rendering.The page and controls framework also provides features to control the overall look and feel of your Web site via themes and skins. You can define themes and skins and then apply them at a page level or at a control level.In addition to themes, you can define master pages that you use to create a consistent layout for the pages in your application. A single master page defines the layout and standard behavior that you want for all the pages (or a group of pages) in your application. You can then create individual content pages that contain the page-specific content you want to display. When users request the content pages, they merge with the master page to produce output that combines the layout of the master page with the content from the content page. The page framework also enables you to define the pattern for URLs that will be used in your site. This helps with search engine optimization (SEO) and makes URLs more user-friendly.The page and control framework is designed to generate HTML thatconforms to accessibility guidelines. CompilerAll code is compiled, which enables strong typing, performance optimizations, and early binding, among other benefits. Once the code has been compiled, the common language runtime further compiles code to native code, providing improved performance. includes a compiler that will compile all your application components including pages and controls into an assembly that the hosting environment can then use to service user requests.Security InfrastructureIn addition to the security features of .NET, provides an advanced security infrastructure for authenticating and authorizing user access as well as performing other security-related tasks. You can authenticate users using Windows authentication supplied by IIS, or you can manage authentication using your own user database using forms authentication and membership. Additionally, you can manage the authorization to the capabilities and information of your Web application using Windows groups or your own custom role database using roles. You can easily remove, add to, or replace these schemes depending upon the needs of your application. always runs with a particular Windows identity so you can secure your application using Windows capabilities such as NTFS Access Control Lists (ACLs),database permissions, and so on.State-Management Facilities provides intrinsic state management functionality that enables you to store information between page requests, such as customer information or the contents of a shopping cart. You can save and manage application-specific, session-specific, page-specific, user-specific, and developer-defined information. This information can beindependent of any controls on the page. offers distributed state facilities, which enable you to manage state information across multiple instances of the same application on one computer or on several computers. 概述是一个统一的Web开发模型,它包括您使用尽可能少的代码生成企业级Web应用程序所必需的各种服务。