现在的位置: 首页 > 综合 > 正文

Getting started with the Web ADF

2012年03月10日 ⁄ 综合 ⁄ 共 12812字 ⁄ 字号 评论关闭

Getting started with the Web ADF

//Web ADF入门

 

The Web ADF offers a number of ways to get started creating Web applications.  To create Web applications without writing code, use the Manager Web application.  For additional information, see the section titled  Developing Web Applications with Manager  or access the help system within the Manager application.   Manager creates a predefined(预定义) Web application based on the Web Mapping Application template, ready for deployment.  Although Manager provides a number of options to customize your Web application, you may choose to extend it further.  For additional information on customizing the Web application generated by Manager, see the section titled Customizing the Web Mapping Application.

Web ADF提供了多种方式来创建一个Web应用程序。使用Web 应用程序管理者,我们可以不用通过写代码就能创建一个应用程序。有关其他的消息请参考后面的连接的标题:Developing Web Applications with Manager或者使用管理程序里面的帮助系统。管理器创建了一个基于Web 地图应用程序模板的预定义程序。尽管管理器提供了许多选择供用户选择定制自己的Web应用程序。但是你还可以进一步定制自己的应用程序。更多关于定制由管理器创建的Web应用程序的信息请看后面的连接标题:Customizing the Web Mapping Application.

 

While generating Web applications via Manager offers a quick and easy solution to create and deploy a Web ADF application, the Web ADF is designed as a full featured development environment with a set of controls, frameworks and APIs to create custom Web solutions.  Since the Web ADF is built on Microsoft ASP.NET, developers should be proficient in the techniques and technologies of ASP.NET Web development.   Web application development can take many forms(形式).   Client-side development leverages(力量,影响) browser technologies (e.g. HTML, JavaScript, CSS) to provide an interactive interface and off load application logic for processing on the client.  

通过管理器提供的一个快速而容易的方法我们可以创建和部署Web ADF应用程序,但是Web ADF是一个基于一系列组件、框架、以及APFs的全要素的开发环境来创建自定义的Web解决方案。因为Web ADF是建立于微软的ASP.NET,开发者可能受益于ASP.NET网络开发技术和工艺的进步。Web 应用程序的发展可以使用多种形式,客户端技术的发展影响着浏览器技术提供一个交互的接口,通过在客户端处理来减轻应用程序的逻辑负担。

 However, browser capabilities are often limited: security restrictions hinder(阻碍、妨碍) resource access, remote services can be utilized via HTTP only, and the scripting(脚本) environment provides a somewhat rudimentary(基本的) (sometimes unstable) platform for execution logic.   Server-side development involves packaging application logic in the server or Web-tier with access to internal proprietary services and resources.   The full-featured(全功能的), stable(稳定的), true object-oriented development environment of the .NET Framework is accessible and extensible.  ASP.NET Web controls encapsulate(压缩的) business logic on the server or Web-tier and provide presentation(报告) content to the client browser.  Some client-side support content is provided (e.g. JavaScript) to enable client-side interactivity with the server, but a vast majority of the application logic resides(存在于) on the server.   The 9.3 Web ADF combines both in a hybrid approach to Web development by including both client and server logic to balance performance and functionality.  The Web ADF includes server-side Web controls with a scriptable interface so they can be utilized directly via JavaScript in a browser.  The ASP.NET AJAX JavaScript Library provides a foundation for our Web ADF JavaScript Library to manage client events and synchronize state with server-side Web controls. 

尽管如此:浏览器的能力还是有限的,安全设置妨碍了资源的访问,远程的服务只能通过HTTP这一种方法进行访问,脚本的环境体为逻辑的执行体统了一个基本的平台。服务器端的发展涉及包装应用程序的逻辑以及Web层面的互联网属性服务和资源的访问。这个全功能的、稳定的、面向对象的.NET开发环境是很容易获取的以及可扩展的。ASP.NET网络组件压缩了服务器上的或者Web层面的商业逻辑,并且向客户端浏览器提供客户端报告内容。一些客户端支持的内容被提交用来和服务器端来进行交互。但是绝大多数的应用程序在逻辑上存在于服务器端。Web ADF包含在服务器端的组件包含一个脚本的接口,所以他们在浏览器里面通过脚本就可以直接被利用。ASP.NET的AJAX脚本类库为我们的Web ADF脚本类库提供一个用来管理客户端事件和服务器端网络控件同步的功能。

 

As an ADF developer, you need to be familiar with a set of Web technologies to be able to take full advantage of Web ADF components in a custom ASP.NET Web application.   These technologies include: 

作为一个ADF的的开发人员,你需要熟悉一系列的Web技术从而能够完全的利用Web ADF组件开发自定义的ASP.NET网络应用程序。这些技术包括:

  • C# or VB.NET in ASP.NET

    • Event handling
    • Page Lifecycle
    • Custom Web controls
  • AJAX in ASP.NET

    • ASP.NET Callback pattern
    • ASP.NET AJAX Partial Postback pattern
    • ASP.NET AJAX Web controls (ScriptManager, UpdatePanel)
    • ASP.NET AJAX JavaScript Library
  • HTML
  • JavaScript

You'll also need to be familiar with IIS, the platform on which you will deploy your Web applications.  Topics related to enhancing performance, managing scalability, maintaining state, and monitoring ASP.NET worker process operations will benefit you when deploying a custom solution. 

你也需要对IIS熟悉,她是一个平台,你可以将你的Web应用程序部署到这个平台。增强自己的表现,维持状态,监视ASP.NET工作人员的操作都能够让你在部署一个自定的解决方案的时候收益。

As an ASP.NET Web developer using Web ADF components, application requirements combined with your skill level will dictate(规定、要求) how functionality will be added\integrated within a Web application.   In general, functionality is added to Web applications or components to handle user actions, process inputs and generate results.   How functionality is packaged for use in a Web application depends on whether you are a Page or Server Control developer. 

作为一个使用Web ADF组件的Web开发者而言,应用程序的要求以及你自己的技术水平规定了功能是如何添加或者集成到一个Web应用程序中的。一般来说,添加到Web应用程序或者组件上的功能是用来处理用户的操作,处理输入以及产生结果。一个功能如何被包装并应用到一个Web应用程序依赖于你是否是一个打包人员或者一个服务器端控件的开发者。

 

 

Page developers add functionality to a Web page using Web controls, handling events on controls or the page, wiring up custom events, adding logic for custom actions to a code file, or packaging related content into User controls.   Business logic is designed for a specific Web application and the developer knows explicitly what the application contains.   

网页开发人员使用Web控件向页面中添加功能,处理控件上或者页面上的事件,  发送自定义事件,为用户动作添加逻辑事件到代码文件,或者封装相关的内容到用户控件。 商业上的逻辑是为特殊的Web应用程序而设计的,并且开发人员非常清楚应用程序包含了那些内容。

 

Server Control developers extend or create custom composite(混合的,综合的) Web controls designed to encapsulate(压缩) business logic in a distributable component. 

服务器端的开发者扩展或者创建一个自定义的混合的Web组件,

Creating custom Web controls means understanding how to construct a control interface programmatically and leverage(力量,影响) control lifecycle with business logic as it operates within a page.   The custom Web control may be dependent on another control but generally it cannot depend on other page code, controls or content. As a result, Server Control developers must include logic to check for the availability of a component. For example, the Page developer knows if a ScriptManager is present within a page, thus he can work with the control reference in the page. Server Control developers may not know if the Web control they are creating is being utilized(利用) in a page with a ScriptManager. 

As a result, logic within the custom Web control must check for the presence of a ScriptManager and possibly handle situations where one is not available.  While creating custom Web controls is more flexible than adding functionality to a page, implementation is more complex.  In some cases, an ASP.NET Web developer will operate as both a Page and Server Control developer to take advantage both patterns when creating a custom Web solution

创建自定义的Web控件,意味着理解如何去创建一个控件接口和使用商业上的逻辑去影响控件的生命周期,就想他们在页面上操作的那样。自定的Web控件也许会依赖另一个控件,但是一般来说,她不会依赖另外页面的代码、组件或者内容。因此,服务器端控件开发着必须拥有一定的逻辑去检查组件的可获得性例如:网页的开发者如果如果知道一个页面中含有一个脚本管理器,那么他就能在页面中使用这些控件的引用。服务器端的开发人员也许不知道他们开发的Web控件是否会被页面的脚本管理器所使用。因此,控件在逻辑上就必须检查脚本管理器出现的可能性以及处理当一个不存在的情况的可能性创建自定义控件比添加功能到页面上复杂,但是她的实施却更加复杂。在一些情况下,一个ASP.NET网络开发人员在创建一个自定义的网络解决方案的时候,必须扮演页面和服务器端开发人员双重角色以此来利用两种类型。

 

Getting started as a Page developer       

从一个页面开发者入门

Most ASP.NET developers will use Visual Studio 2005\2008 to create custom Web applications with Web ADF controls and components.  To get started as a Page developer, you can open a Web application generated by Manager, use the Web Mapping Application template integrated with Visual Studio, or create a custom Web application from scratch.   You may also choose to modify an existing Web application by adding Web ADF controls or components.  A set of tutorials start with the template and progress through more complex topics, such as custom tool implementation and data source specific interaction.   The Web ADF includes a set of out of the box Web controls on which you may choose to handle events.  Adding custom functionality may involve adding a custom toolbar item that uses Web ADF core classes, using the task framework to display results, creating a custom User control that contain Web ADF controls, or leveraging the Web ADF JavaScript Library to take advantage of browser capabilities.     

大多数的ASP.NET开发者都会使用vs2005或者2008开发使用Web ADF控件或者组件技术的网络应用程序。作为一个页面开发人员入门者,你可以打开一个有管理器创建的应用程序,使用集成到VS里面的网络地图应用程序模板,或者创建一个自定义的应用程序。你还可以通过添加Web ADF控件或者组件来重新定义一个已经存在的WEB应用程序。很多的入门者是通过模板来开始学习的,通过一些复杂的话题取得进步。比如:自定义工具的实施,特定数据源的交互。Web ADF包含一系列的外部组件,你可以选择他们来处理事件。添加用户的功能也许和一些事件相关, 比如:使用Web ADF核心类来添加用户工具项;使用结果架构来显示结果;创建一个包含Web ADF控件的用户自定义组件或者通过使用Web ADF javascript类库来利用浏览器的功能。

 

Getting started as a Server Control developer

服务器端控件开发者入门

Server Control developers will either extend an existing Web ADF control to add or modify functionality or create a custom composite Web control that contains Web ADF controls.   This includes leveraging the Web ADF task framework to extend out-of-the-box Web ADF tasks or create new custom Web tasks (Web controls) that can be integrated with Visual Studio and Manager.   Another common situation may involve packaging custom Web ADF controls and content in a single composite Web control for deployment in a portal (e.g. SharePoint), multiview, or template.   This process will usually start by creating a custom class library project in Visual Studio and implementing the appropriate interfaces or extending the appropriate classes to generate a custom Web control for the desired deployment environment.             

服务器开发者不是扩展一个已经存在的Web ADF控件来添加,就是重新定义控件的功能,或者创建一个混合有web ADF组件的自定义控件。她包括通过影响Web ADF任务架构来扩展外部的Web ADF任务,或者创建一个新的可以被集成到VS和管理器里面的自定义网络组件。另一个通用的情况可能就是涉及到包装自定web ADF组件和能容到一个小的组件。这些操作通常都是以在VS里面创建一个用户类库工程开始,使那些合适的接口实施或者扩展那些合适的类来产生一个自定义网络组件,来满足那些特定要求的部署环境。

 

 

Getting started with data sources in the Web ADF

In either case, business logic in a page or control may require working with one or more data sources at the same time.  It is important to understand the relationship between Web ADF components and APIs which consolidate(加强、是**联合) and use different data sources using a common公用的   methodology.  From a data source perspective(视角、观点), the Web ADF provides custom Web controls to display and interact with map, geocode, and geoprocessing data from multiple data sources.  This capability is based on a Common Data Source API (Common API for short) designed so that Web ADF controls can interact with different data sources in the same way.  The following development paths are available, increasing in complexity and functionality from path I to IV.

 

在任何一种情况下,不管页面的或者控件的业务逻辑都会要求在同一个时间内同一个或者多个数据源工作。理解Web ADF组件和APIs之间的关系是非常重要的,她使用一个公用的方法关联和使用不同的数据源。从数据源的角度出发,Web ADF提供自定义的Web控件显示地图、和地图交互, 编码、处理来自多种数据源的数据。这种能力是建立在通用数据源接口上的,因此WEB控件可以使用同一种方法与多种不同的数据源进行交互。下面的开发路线都是可取的,从路线I到路线IV,开发的复杂性和功能都在增强。

 

In general, the best practice is to start with the simplest path available and select a more complex path only when necessary.  Selecting a more complex path depends on the functionality you need in your application.Developer paths I, II, and III are specific to the Web ADF.  If you can accomplish the task you need using the out-of-the-box Web controls, use path I.  If you would like to customize the Web ADF to work with all data source types by using generic functionalities in the Common API, use path II.  If you want to customize the Web ADF to work with a specific data source implementation of Common API functionality, use path III.  See the section titled Working with the Common Data Source API for more information.

一般来说,最后的练习方法是从一个最简单的开始并仅仅在需要的时候选择一个比较复杂的。根据你需要的功能选择一个比较复杂的路线应用到你的应用程序中,开发路线I,II,III都是指向Web ADF的。如果你使用外部的控件能够完成你需要的工作,那么你就选择第一个开发路线。如果你要定制Web ADF,通过调用一个公用功能的API接口在你工作中使用所有类型的数据源,那么请你选择开发路线II。如果你要定义WEB ADF使之能够和一个指定的数据源工作,实现通用API中的功能,那么请你使用开发路线III。更多的消息查看 Working with the Common Data Source API。

 

To utilize functionality associated with a specific data source (such as an ArcGIS Server server object or an ArcIMS service), a data source specific API may be provided.   This option is associated with developer path IV and offers the most functionality since you are working directly with the data source's API.  Note that most APIs can be used independent of(独立于) the Web ADF controls and Common Data Source API.   A set of data source specific components are installed with the Web ADF to support ArcGIS Server and ArcIMS.  Both data sources are discussed below:

为了利用与想关联特定数据源的功能,那么一个数据源特定的API接口就应该实现。这些选项都是和开发者路径IV想关联的并且提供了最多的功能,这是因为你要直接和数据源API工作。需要注意的是:所有的API接口的调用都独立于Web ADF控件和通用数据源API。

一系列的特定的数据源组件都随着Web ADF 框架安装来支持ArcGIS 服务和ArcIMS服务。两种数据源都要在后面讨论。

 

 

ArcGIS Server data sources are supported by two APIs: ArcObjects and SOAP.  In the Web ADF, both ArcGIS Server Local and Internet data sources are built on the SOAP API, however Local data sources also offer access to ArcObjects API.   See the section on ArcGIS Server implementation for more details.  Since the SOAP and ArcObjects APIs can be used apart from the Web ADF, two separate and distinct sections discuss their capabilities.  Working with the ArcGIS Server SOAP API discusses the implementation and use of standard SOAP based proxies and value objects for stateless communication with ArcGIS Server services. Working with the ArcObjects API discusses programming techniques and capabilities of working with both coarse and fine-grained ArcObjects remotely via ArcGIS Server. ArcGIS Server also provides the ability to customize and extend functionality on the server.  In the ArcGIS Server ArcObjects API discussion, see the section titled Extending ArcGIS Server for additional details.

ArcGIS Server 的数据源由两个APIs 来支持:ArcObject 和SOAP。在Web ADF 框架下, 本地的ArcGIS Server和Internet数据源都是建立在SOAP API上面的,尽管如此,本地的数据源仍然提供了ArcObject的访问方式,更多消息查看ArcGIS Server implementation

因为 SOAP和ArcObject API可以在Web ADF之外使用,两个独立和唯一的选项来讨论他们的能力。Working with the ArcGIS Server SOAP API讨论了实施和基于代理和值对象的标准SOAP的使用。Working with the ArcObjects API讨论编码技术以及通过ArcGIS Server同即粗糙又细密的ArcObjecgs对象远程工作的能力。ArcGIS Server 同样提供了在Server上进行扩展和自定义的能力,对于ArcGIS Server ArcObject API的讨论,请查看后面的连接Extending ArcGIS Server来获取更多的详细信息

 

ArcIMS data sources are supported by the pure(完全的) .NET ArcIMS API.  See the section titled Working with the ArcIMS API for more details.

ArcIMS数据源被.NET下的ArcIMS API接口完全支持。查看Working with the ArcIMS API接口获取更过的详细信息。

 

 

抱歉!评论已关闭.