Clark County & the Web Application Development Framework.
-
Upload
marvin-nixon -
Category
Documents
-
view
218 -
download
0
Transcript of Clark County & the Web Application Development Framework.
Clark County & theWeb
Application Development Framework
My background
• Bachelors of Science in Geography from UNR• Emphasis in Geographic Information Systems• Work experience in GIS:
– Internship with USDA Farm Service Agency– Hired full time by USDA NRCS– Employed with the county since May 2007
Scope of this Presentation
• Brief overview of the Web ADF
• Accumulation of resources that I have put together
• Highlight significant components
• Helpful hints and tips that I have found by working with the Web ADF
Application Development Framework
What is the Web ADF
• The Web ADF is not an application
• Provides a set of developer tools to be used with Visual Studio
• Convenience Classes
Getting Started
• An Integrated Development Environment– Visual Studio 2005 & .NET 2.0 Framework– Visual Studio Web Express
Callback Framework
• Communication between the client and server is central to any web application
• The default ASP.NET Web model uses a synchronous page postback
Client Callbacks
• The implementation of the Callback framework will dramatically improve the web mapping applications performance.
• Uses a modified version of the page life cycle
Life Cycle Comparison
AJAX
• This modified version of the page life cycle:– Makes the page more responsive by only
refreshing selected portions of a page– Allows interaction while still processing a callback– This is done by creating a new connection to the
server
JavaScript
• JavaScript is the language in which Ajax function are called
Developing Web Applications
• If you have developed with an IDE before you’ll find development with the ADF similar– Drag and drop controls– Set control properties– Programmatically define control behavior
• If any of the previous slides or above points are unfamiliar step back from GIS and investigate the above topics and working within a development environment
Web Manager
Using the Templates
Customizing Your Application
• There are two basic types of modifications:– Modifying properties of Web controls and
making basic HTML modifications. This is the equivalent of modifying the ArcIMSparam.js in the ArcIMS HTML Viewer applications (requires no programming)
– Programming with application programming interfaces (API)
Using the Manager• My suggestion in how to leverage the Web
Manager is to create an application, explore functionality, set break points, debug and see how the processes run and see how ESRI builds and utilizes its own application development framework
• Become familiar with how ESRI utilizes callbacks and JavaScript
• Start working with the ASP life cycle
Using the Manager continued• However the real power of the ADF is in your
ability to extend, customize and build your own applications
• The Manager is built for people with little or no programming experience.
• The template application is written to try and be flexible enough to cover all circumstances. This makes the code bloated and much of the functionality is a black box. This makes debugging difficult
• To create a custom application that is ready for deployment you need to build the application from the ground up
ADF Developer Kit Samples
The developer kit samples are another great resource on where to start working with a specific GIS functionality
Building Blocks of the Web ADF
• Web Controls
• Task Framework
• Common DataSource API
• Graphics & Consolidated Classes
Web Controls
Web Controls
• Major Web Controls included in the ADF:– Map– Navigation– Toolbar– Overview Map– Table of Contents– Magnifier, Scale bar and Measurement tool– Map Tips– Task Manger, Task Menu & Task Results– Resource Managers
Resource Managers
– Map Resource Manager– Geoprocessing Resource Manger– Geocode Resource Manager
Map Resource Manager• Allows you to:
– Add– Remove – Set the properties
Geoprocessing Resource Manager• Allows you to:
– Create & Remove Services– Set the properties for a resources that contain
geoprocessing capabilities.
• Geoprocessing tasks run on a published model or map document with an associated tool layer on the server
• The manager is built to work in conjunction with the task framework and specifically the geoprocessing task control
• Application Programmer Interfaces are also provided for the advanced developer to build custom tools.
Geocode Resource Manager
• Allows you to:– Add– Remove – Set the properties for any data source that provides
geocoding functionality
• The control is built to work in conjunction with the Task framework and specifically the Find Address Task
• Application Programmer Interfaces are also provided for the advanced developer to build custom tools.
Task Framework
Task Framework
• Tasks are defined as a set of related actions that provide a common results.
• The Web ADF task framework delivers an encapsulated web control that performs predefined functionality or tasks.
• The task framework delivers a set of easy to use tools for the basic GIS business operations in your application.
Available Tasks
• Navigation• Find Address• Find Place• Geoprocessing• Query Attributes• Search by Attributes• Editing• These tasks take nothing more than dragging
and dropping. No programming is needed.
Task Controls
• Task Manager– Designed to organize tasks in a web application
• Task Results– Designed to store & display the results from
tasks
Custom Tasks & Extending Tasks
• The task framework provides the developer the ability to write custom tasks through its implementation classes
• The Developer can also, through extension, customize the out-of-the-box functionality for a specific task– Many classes and interfaces are exposed for
the advanced customization of the task framework
Data Sources and Resource Types• Data sources provide access to geospatial information,
analysis and processing capabilities. Data sources are consumed as resources.
• Each data source can have different capabilities which define the type of resource they provide.(map, geocode, geoprocessing)
• One resource can be used in many different ways, thus resources support different functionalities.
• Functionalities are used by the web ADF controls to work with a data source.
• The capability of a data source defines the type of functionalities available
• The foundation of the Web ADF is the ability to consolidate and utilize multiple data sources. It is founded on the ability to work with a common, defined set of resources and functionalities
Common Data Source API
Common Data Source API
• Previous versions of the ADF (ArcGIS Server ADF) only supported a single data source.
• The new Web ADF has improved in two ways:– Supports data from multiple sources– Ability to integrate and interact with data
from different sources
Common API
• The common API provides a generic framework by which a data source can be consolidated and utilized within the web ADF
• You can “Plug-in” your different data sources by implementing classes and interfaces of the Common API
Data Sources & API’s
The Web ADF provides developers with a set of objects to program with. The Common API exposes a set of course grained properties, methods and events which allows the developer to interact with different resource types but with the same code base. Most likely you are going to run into situations where the Common API will not provide you with the advanced functionality that you will need. This will then require you to use a data source specific API.
Data Source Specific API
• ArcGIS Server– SOAP– ArcObjects
• ArcIMS– ArcIMS
Basic Architecture of the Web ADF• Each web control works with a single resource manager
either directly or through another control• The Resource Manager manages access to the resource• When a control accesses a resource it generates a
collection of functionalities• The data source type defines which capabilities a
resource has• The resource manager type
dictates the capabilities of a
resource it needs to utilize
Basic Architecture continued• With this multi-source environment there is the
need of a Common API to define or standardize the interaction between the multi-source Web controls and data source specific business objects
• The Common API defines an abstract contract to allow interaction between multiple data sources
• These abstract contracts are interfaces and each data source type implements these interfaces and are utilized by the web controls to perform tasks
Graphics & Consolidation Classes
Graphics & Consolidation ClassesHow do you perform analysis using data from multiple resources and then display the results into a common environment?
Graphics & Consolidation Classes
• The consolidated classes include such classes as:– Geometry– Spatial Reference– Query– Spatial Filters
• The Web ADF also manages a set of classes that support web-tier graphics data sets and layers using web geometry, symbols and renderers.
• Most of the graphics and consolidation classes are located in the ESRI.ArcGIS.ADF.Web.dll. This assembly contains a number of namespaces to categorize its contents.
Tiers
Converting between types
• Due to the multi-source environment that is now available with the Web ADF converting between data types becomes a necessity in the application development environment.
• Because the Web ADF integrates and consolidates client-tier interaction with a web-tier application that works with data sources that are on the server-tier the responsibility is left to the developer to convert between data types.
Common Problems
Project Management• Due to the large size of the Web ADF it is easy
to get side tracked• Don’t start until you have a clear and defined
scope• Define your business needs and design
requirements before you even write a line of code
• Separate your layer:– Business– Data management– Presentation
• Read a best practices approach book
ASP & AJAX
• You have to understand how these lifecycles work to build a working and useful application– Maintaining state
– Updating multiple controls with one callback
– Displaying results other than in the task results
Where to get HELP• EDN Discussion Forums
– ArcIMS Product Discussion Conference• ArcIMS: .NET Developers
– ArcGIS Server .NET• .Net General questions• .Net Web ADF
• ArcGIS Server Development Blog– http://blogs.esri.com/Dev/blogs/arcgisserver/
• Object Model Diagrams– C:\Program Files\ArcGIS\DeveloperKit\Diagrams\Server
• ESRI online Class References– Search on specific interfaces and exposed members
LinksArcGIS Server BLOG
http://blogs.esri.com/Dev/blogs/arcgisserver/
EDN& VS
http://edndoc.esri.com/arcobjects/9.2/NET_Server_Doc/developer/ADF/vsnet_integration.htm
http://edndoc.esri.com/arcobjects/9.2/NET_Server_Doc/developer/ADF/building_first_app_overview.htm
MSDN
http://msdn2.microsoft.com/en-us/library/ms178472.aspx
AJAX
http://edndoc.esri.com/arcobjects/9.2/NET_Server_Doc/developer/ADF/ajax_callback.htm
Using the manager
http://edndoc.esri.com/arcobjects/9.2/NET_Server_Doc/manager/applications/tutorial_create_app.htm
Map Resource Manager
http://edndoc.esri.com/arcobjects/9.2/NET_Server_Doc/developer/ADF/control_mapresourcemanager.htm
Geoprocessing Resource Manager
http://edndoc.esri.com/arcobjects/9.2/NET_Server_Doc/developer/ADF/control_geoprocessingresourcemanager.htm
Geocoding Resource Manager
http://edndoc.esri.com/arcobjects/9.2/NET_Server_Doc/developer/ADF/control_geocoderesourcemanager.htm
Tasks
http://blogs.esri.com/Dev/blogs/arcgisserver/
Data Source API’s
http://edndoc.esri.com/arcobjects/9.2/NET_Server_Doc/developer/ADF/access_datasource_api.htm Graphics and Consolodated Classes
http://edndoc.esri.com/arcobjects/9.2/NET_Server_Doc/developer/ADF/graphics_consolidation.htm
Type Conversion
http://edndoc.esri.com/arcobjects/9.2/NET_Server_Doc/developer/ADF/conversion.htm
Dustin W. [email protected]