云题海 - 专业文章范例文档资料分享平台

当前位置:首页 > 物业管理系统论文中英文对照资料外文翻译文献

物业管理系统论文中英文对照资料外文翻译文献

  • 62 次阅读
  • 3 次下载
  • 2025/5/2 5:52:34

外 文 翻 译

原文1

ASP.NET 2.0 Web Pages and Web Controls

Until 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 ASP.NET development server, WebDev.WebServer.exe).

With this web primer out of the way, the remainder of this chapter concentrates on the composition of ASP.NET (including the enhanced code-behind model) and how to work with ASP.NET web controls. As you will see, ASP.NET 2.0 provides a number of new web controls, a new “master page”model, and various customization techniques.

The Role of HTTP

Web 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 standard

request/response paradigm. For example, if you navigate to www. IntertechTraining.com, 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 http://www.IntertechTraining.com 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, ASP.NET, 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 (such 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, ASP.NET 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 Servers

A 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 ASP.NET web applications.

When you build ASP.NET 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 Windows

XP 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 Directories

A 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 http://www.CarsRUs.com (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 ASP.NET 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 various right-click Property dialog boxes integrated within IIS).

ASP.NET 2.0网页和Web控件

到现在为止,本书的示例应用程序主要集中在控制台和基于Windows窗体前端。在本章及下面学习中,将探讨如何用.NET平台促进浏览器的建设。首先,你很快就会再次看到关于网络中心的概念(HTTP,HTML格式,客户端和服务器端脚本)和web服务器(包括ASP.NET开发服务器,WebDev.WebServer作用。exe文件)。

了这一点,本章的剩余部分主要是ASP网络(包括增强的代码隐藏模型),以及如何使用ASP.NET Web控件和ASP.NET组成。正如你所看到的,ASP.NET 2.0提供了一些新的网络控制模式,新的“母版页”的模式,以及各种定制技术。

HTTP的作用

Web应用程序不同于传统的桌面应用程序。第一个明显不同的是,产生Web应用程序将至少涉及两台联网的机器(当然在开发过程中完全有可能有一台机器扮演客户端和服务器角色)。鉴于这一事实,机器必须确定一个特定的有线协议,以确定如何发送和接收数据。线路协议,关系到计算机的问题是超文本传递协议(HTTP)。

当客户机启动一个(如Netscape Navigator,Mozilla Firefox浏览器,或Microsoft Internet Explorer)浏览器,一个HTTP请求访问(如*. aspx或*. htm文件)在远程服务器上的特定资源。 HTTP是一个基于文本的协议,是建立在一个标准的请求/响应式。例如,如果导航到http://www.IntertechTraining.com,浏览器软件利用网络技术网域名称服务(DNS)转换成由四个部分组成,32位数值(又名IP地址)注册的网址。此时,浏览器打开一个(通常是通过端口80)套接字连接和发送的默认HTTP网页上http://www.IntertechTraining.com要求。

  • 收藏
  • 违规举报
  • 版权认领
下载文档10.00 元 加入VIP免费下载
推荐下载
本文作者:...

共分享92篇相关文档

文档简介:

外 文 翻 译 原文1 ASP.NET 2.0 Web Pages and Web Controls Until 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 quick

× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价:10 元/份 原价:20元
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219
Copyright © 云题海 All Rights Reserved. 苏ICP备16052595号-3 网站地图 客服QQ:370150219 邮箱:370150219@qq.com