49
Developing Web Applications with ArcGIS Server Kevin Kevin Deege Deege Educational Services Educational Services ESRI ESRI - - Washington DC Washington DC

Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

  • Upload
    others

  • View
    20

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

Developing Web Applications with ArcGIS Server

Kevin Kevin DeegeDeegeEducational ServicesEducational ServicesESRIESRI--Washington DCWashington DC

Page 2: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

Federal User Conference 2008Federal User Conference 2008 22

IntroductionsIntroductionsWho am I?Who am I?Who are you?Who are you?–– ESRI Product Development ExperienceESRI Product Development Experience–– What development languages are you usingWhat development languages are you using–– What types of applications are you developingWhat types of applications are you developing

Page 3: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

Session OverviewSession OverviewArcGISArcGIS Server OverviewServer OverviewArcGISArcGIS Server Developer ResourcesServer Developer ResourcesIntroduce the Web ADFIntroduce the Web ADFBuilding Web ADF applicationsBuilding Web ADF applications–– Manager, template, controlsManager, template, controls

Extending Web ADF applicationsExtending Web ADF applications–– Custom ToolsCustom Tools–– Custom TasksCustom Tasks

Federal User Conference 2008Federal User Conference 2008

Page 4: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

ArcGISArcGIS Server 9.2Server 9.2Complete & Integrated serverComplete & Integrated server--based GISbased GISOutOut--ofof--thethe--box applications and services box applications and services Tremendous developer opportunitiesTremendous developer opportunities

ArcGISArcGIS ServerServer

Spatial DataSpatial DataManagementManagement

VisualizationVisualization(Mapping)(Mapping)

SpatialSpatialAnalysisAnalysis

Web MappingWeb MappingApplicationsApplications

ArcGISArcGISMobileMobile

ArcGISArcGISExplorerExplorer

ArcGISArcGISDesktopDesktop

JavaJava

.NET.NET

Federal User Conference 2008Federal User Conference 2008

Page 5: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

Out of the Box Web based GISOut of the Box Web based GIS

Allows GIS Analysts to easily configure Web Applications Allows GIS Analysts to easily configure Web Applications –– No programming requiredNo programming required

Includes out of the box Desktop ClientsIncludes out of the box Desktop Clients–– ArcGISArcGIS Explorer Explorer –– ArcGISArcGIS DesktopDesktop

Allows analysts to publish rich GIS ServicesAllows analysts to publish rich GIS Services–– 2D and 3D Mapping services2D and 3D Mapping services–– GeocodingGeocoding, , GeodataGeodata, Network , Network Analysis,GeoprocessingAnalysis,Geoprocessing servicesservices–– SOAP, WMS, and KML based servicesSOAP, WMS, and KML based services

Federal User Conference 2008Federal User Conference 2008

Page 6: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

Development PlatformsDevelopment Platforms

Support for multiple platforms Support for multiple platforms –– .Net .Net –– JavaJava

CrossCross--platform developmentplatform development–– Available on Windows, Linux, and SolarisAvailable on Windows, Linux, and Solaris

Comprehensive SDKs for Application DevelopmentComprehensive SDKs for Application Development–– Web ADF Web ADF –– forfor Web Applications and Web ServicesWeb Applications and Web Services–– Mobile ADFMobile ADF –– for Mobile Applications (.Net only)for Mobile Applications (.Net only)–– Enterprise ADFEnterprise ADF -- for Enterprise JavaBeans (EJB) (Java only)for Enterprise JavaBeans (EJB) (Java only)

Federal User Conference 2008Federal User Conference 2008

Page 7: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

Product PlatformsProduct PlatformsArcGISArcGIS Server for the Microsoft .Net FrameworkServer for the Microsoft .Net Framework–– WindowsWindows

ArcGISArcGIS Server for the Java PlatformServer for the Java Platform–– Windows, Linux, SolarisWindows, Linux, Solaris

Platform specific install, documentationPlatform specific install, documentation–– SDK and IDE integrationSDK and IDE integration

Both platforms have the same GIS functionalityBoth platforms have the same GIS functionality–– Rich GIS ServicesRich GIS Services–– Management ApplicationsManagement Applications–– Web Mapping ApplicationsWeb Mapping Applications–– ArcGISArcGIS Explorer and Desktop clientsExplorer and Desktop clients

Federal User Conference 2008Federal User Conference 2008

Page 8: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

AuthorAuthor GIS contentGIS content–– Create GIS resourcesCreate GIS resources–– ArcGISArcGIS Desktop applicationsDesktop applications

ServeServe contentcontent–– Publish GIS resources as servicesPublish GIS resources as services–– ArcCatalogArcCatalog and and ArcGISArcGIS

Server ManagerServer Manager

UseUse GIS servicesGIS services–– Web mapping applicationsWeb mapping applications–– ArcGISArcGIS ExplorerExplorer–– ArcGISArcGIS DesktopDesktop–– Many othersMany others

GIS on the Web in 3 stepsGIS on the Web in 3 steps1

3

2

Page 9: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

ArcGISArcGIS Server Web ServicesServer Web ServicesServer Objects exposed as web servicesServer Objects exposed as web services––TypesTypes

Map serviceMap serviceGeocodeGeocode serviceserviceGlobe service Globe service GeodataGeodata service service GeoprocessingGeoprocessing serviceserviceMore at 9.3 (Image Service)More at 9.3 (Image Service)

––CapabilitiesCapabilitiesMap/Data/QueryMap/Data/QueryGeocodeGeocode/Reverse /Reverse GeocodeGeocode3D Visualization3D VisualizationData ReplicationData ReplicationGeospatial AnalysisGeospatial Analysis

Consumed by both Java and .NETConsumed by both Java and .NETFederal User Conference 2008Federal User Conference 2008

Page 10: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

ESRI Developer Network (EDN)ESRI Developer Network (EDN)Access to the Access to the ArcGISArcGIS Development PlatformDevelopment Platform

The Developer ProductThe Developer Product–– ArcGISArcGIS Server (all Levels and Editions)Server (all Levels and Editions)–– ArcGISArcGIS Image ServerImage Server–– ArcIMSArcIMS–– ArcGISArcGIS EngineEngine–– ArcGISArcGIS Desktop*Desktop*

Software Developers KitsSoftware Developers Kits–– .NET and JAVA.NET and JAVA

Website for DevelopersWebsite for Developers–– http://http://edn.esri.comedn.esri.com

Federal User Conference 2008Federal User Conference 2008

Page 11: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

Developer ResourcesDeveloper ResourcesArcGISArcGIS Server Development Server Development BlogBlog

http://http://blogs.esri.comblogs.esri.com

Federal User Conference 2008Federal User Conference 2008

Page 12: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

Introducing the Web ADFIntroducing the Web ADFLibraries used to build GIS Web applicationsLibraries used to build GIS Web applications–– Web controls (ASP.NET, JSF)Web controls (ASP.NET, JSF)

AJAX enabledAJAX enabledMap image blendingMap image blending

–– Supports multiple data sourcesSupports multiple data sourcesArcGISArcGIS Server, Server, ArcIMSArcIMS, , ArcWebArcWeb, WMS, WMSWeb ADF graphicsWeb ADF graphics

–– Task FrameworkTask FrameworkExtensible ArchitectureExtensible Architecture

ArcGISArcGIS Server ManagerServer Manager–– Build Web ApplicationsBuild Web Applications

IDE integrationIDE integrationFederal User Conference 2008Federal User Conference 2008

Page 13: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

.NET Web ADF Architecture.NET Web ADF Architecture

AJAX enabled AJAX enabled GIS Web controlsGIS Web controls

Multi-sourcesupport

Extend, distributecustom functionality

WebWeb--tier tier graphics,graphics,geometry,geometry,renderingrendering

Federal User Conference 2008Federal User Conference 2008

Page 14: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

Java Web ADF

Web Controls

Tasks & Framew

orkWebContextWebContext & &

AttributesAttributes

Tasks & Framework

AGS IMS WMS GRAWS Resource APIs

Common API

Java Web ADF ArchitectureJava Web ADF Architecture

Federal User Conference 2008Federal User Conference 2008

Page 15: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

.NET Web ADF controls.NET Web ADF controlsResource manager controlsResource manager controls–– Not visible at run timeNot visible at run time–– Manage resourcesManage resources

Mapping controlsMapping controls–– MapMap–– Overview mapOverview map

Related controlsRelated controls–– ToolbarToolbar–– Table of contentsTable of contents

Page 16: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

Java Web ADF controlsJava Web ADF controlsSet of custom Set of custom JavaServerJavaServer Faces Web controlsFaces Web controlsExpose server object functionalityExpose server object functionality–– ContextContext, Map, Overview, Toc, and Toolbar, Map, Overview, Toc, and Toolbar–– Gives access to other APIs (common or resource specific)Gives access to other APIs (common or resource specific)–– com.esri.adf.web.faces.componentcom.esri.adf.web.faces.component

SDKSDK–– JavaDocJavaDoc–– Web control tag libraryWeb control tag library–– SamplesSamples

Federal User Conference 2008Federal User Conference 2008

Page 17: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

Allow developers to add simple graphics to the mapAllow developers to add simple graphics to the mapSupported symbolsSupported symbols–– LineLine–– MarkerMarker–– PolygonPolygon–– True type markerTrue type marker

Supported Supported renderersrenderers–– Unique valueUnique value–– Class breakClass break–– SimpleSimple

Integrated into Web and Browser tiersIntegrated into Web and Browser tiers

Web Graphics Web Graphics

Federal User Conference 2008Federal User Conference 2008

Page 18: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

Graphics LayersGraphics LayersDisplay geometry and text dynamically within a mapDisplay geometry and text dynamically within a map

Web ADF Graphics

Web-tier

Server-tier

Client-tier

ArcGIS Server ArcIMS

Web ADF

ArcGIS Server

ArcIMS

Create Image Create Image

Create Image

Map image

Map data layersGraphics layer

Web ADF resources

Federal User Conference 2008Federal User Conference 2008

Page 19: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

Web ADF Web ADF –– TasksTasksAllow the end user to perform useful workAllow the end user to perform useful workVisual components Visual components Perform a set of related actions and generate a resultPerform a set of related actions and generate a result

Configurable from ManagerConfigurable from Manager

Product ships with out of the box tasksProduct ships with out of the box tasks–– Search by attributesSearch by attributes–– Query AttributesQuery Attributes–– Find PlaceFind Place–– Find AddressFind Address–– EditingEditing–– GeoprocessingGeoprocessing

Developers can extend the system with Custom tasksDevelopers can extend the system with Custom tasks

Federal User Conference 2008Federal User Conference 2008

Page 20: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

Visual Studio 2005 integrationVisual Studio 2005 integration

Web controlsWeb controlsWeb Mapping Application templateWeb Mapping Application templateContext menusContext menusDeveloper HelpDeveloper Help

Page 21: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

IDE integration IDE integration -- EclipseEclipse

Eclipse plugEclipse plug--in in –– Template applicationsTemplate applications–– Reusable code available as snippetsReusable code available as snippets–– Integrated documentationIntegrated documentation–– Samples are integrated to run from within the IDESamples are integrated to run from within the IDE

Federal User Conference 2008Federal User Conference 2008

Page 22: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

Building Web ApplicationsBuilding Web Applications

Use the Web ADFUse the Web ADF–– ArcGISArcGIS Server for .Net Server for .Net -- Web ADFWeb ADF–– ArcGISArcGIS Server for Java Server for Java –– Web ADFWeb ADF

Leverage AJAX Enabled Leverage AJAX Enabled ASP.NetASP.Net or JSF Web Controlsor JSF Web Controls

Work with GIS Web Services using the SOAP APIWork with GIS Web Services using the SOAP API

Work with GIS Server Objects using either Work with GIS Server Objects using either –– The SOAP APIThe SOAP API–– Finer Grained Finer Grained ArcObjectsArcObjects APIAPI

Federal User Conference 2008Federal User Conference 2008

Page 23: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

Web ADF Development PathsWeb ADF Development Paths

Web ControlsWeb Controls

Common Data Source APICommon Data Source API

Data Source (GIS Server) Specific APIsData Source (GIS Server) Specific APIs

GenericGeneric

DeveloperPaths I II III IV

Increasing complexity and functionalityIncreasing complexity and functionality

Data Source ImplementationsData Source Implementations

Federal User Conference 2008Federal User Conference 2008

Page 24: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

Creating Web ADF applicationsCreating Web ADF applications1.1. Use Use ArcGISArcGIS Server Manager Server Manager

–– Web site builder Web site builder –– Modify in Visual Studio, EclipseModify in Visual Studio, Eclipse

2.2. Use template Use template –– Same template used bySame template used by

ArcGISArcGIS Server ManagerServer Manager–– Visual Studio, Eclipse, CreatorVisual Studio, Eclipse, Creator

3.3. Create using Web controlsCreate using Web controls

Federal User Conference 2008Federal User Conference 2008

Page 25: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

Web Mapping Application templateWeb Mapping Application template

Web controlsWeb controlsThemesThemesResourcesResourcesCustom toolsCustom toolsHelp systemHelp system

Federal User Conference 2008Federal User Conference 2008

Page 26: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

Advantages of using the templateAdvantages of using the templateStart with a complete Start with a complete GIS Web applicationGIS Web applicationThe template provides: The template provides: –– Measure user controlMeasure user control–– Identify toolIdentify tool–– Layout Layout DIVsDIVs –– resize, etc.resize, etc.–– Code for docking items, closing applicationCode for docking items, closing application–– ThemesThemes–– Help systemHelp system

Federal User Conference 2008Federal User Conference 2008

Page 27: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

Web ADF controlsWeb ADF controlsZoomLevel

Map

Toc

MapTips

MapResourceManager

OverviewMap

Magnifier

GeocodeResourceManager

PageLayout ToolbarNavigation

FloatingPanel

ScaleBar

TaskManager

ASP.NET Navigation Controls

ContextMenu

TreeViewPlus

TaskResults

GeoprocessingResourceManager

SearchAttributesTask

QueryAttributesTask

FindAddressTask

FindPlaceTask

GeoprocessingTask

EditorTask

Core Web controls

Task Web controls

Task Framework Web controls

Federal User Conference 2008Federal User Conference 2008

Page 28: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

.NET Map control.NET Map controlAssociate with a Map resource manager controlAssociate with a Map resource manager controlWorks with multiple map resourcesWorks with multiple map resources–– Create dynamic map imagesCreate dynamic map images–– Fetch preFetch pre--generated image tilesgenerated image tiles

(cached services)(cached services)

Image blendingImage blending–– Web tier or browserWeb tier or browser

GameGame--style navigationstyle navigation–– Seamless pan and zoomSeamless pan and zoom–– Keyboard and mouse integrationKeyboard and mouse integration

AJAX enabled!AJAX enabled!Federal User Conference 2008Federal User Conference 2008

Page 29: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

.NET Toolbar control .NET Toolbar control Work with Map control using callbacksWork with Map control using callbacks–– Write serverWrite server--side code onlyside code only–– ClientClient--side code provided by the Web ADFside code provided by the Web ADF

OutOut--ofof--thethe--box map actions:box map actions:–– Zoom InZoom In–– Zoom OutZoom Out–– PanPan–– Full Extent Full Extent

Tools and Commands configurableTools and Commands configurablein Visual Studio designin Visual Studio design--timetimedialog dialog

Federal User Conference 2008Federal User Conference 2008

Page 30: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

Java ADF Java ADF -- MVC architecture MVC architecture

Federal User Conference 2008Federal User Conference 2008

Page 31: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

The Context controlEstablishes a connection to the GIS Server (non-visual)Container of all attributes and resourcesHas attributes registered to it– Notifies attributes about changes

in application state– WebContext.refresh()

Stored in session scope– Data objects can be

retrieved from context

Works with a WebContext object

Context control

WebContext

WebMap WebTocWebGraphics

Federal User Conference 2008Federal User Conference 2008

Page 32: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

The Map controlAJAX-enabledWorks with multiplemap resources– Creates dynamic map images– Supports image caching

Map service blending– Web tier or browser

Required attributes– id– value mapviewer.jsp

com.esri.adf.web.dataClass WebContext

<a:map id="map1"

value="#{mapContext.webMap}" />

<a:map id="map1"

value="#{mapContext.webMap}" />

Federal User Conference 2008Federal User Conference 2008

Page 33: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

Using the Web controls with JSP

<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>

<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>

<%@taglib uri="http://www.esri.com/adf/web" prefix="a"%>

<f:view> <h:form id="f">

<a:context value="#{mapContext}" />

<table> <tr> <td>

<a:map id="map1" value="#{mapContext.webMap}" width="600" height="600"/>

</td><td>

<a:toc mapId="map1" value="#{mapContext.webToc}" style="height:200" />

<a:overview mapId="map1" value="#{mapContext.webOverview}" /> </td>

</tr> </table>

</h:form>

</f:view>

<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>

<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>

<%@taglib uri="http://www.esri.com/adf/web" prefix="a"%>

<f:view> <h:form id="f">

<a:context value="#{mapContext}" />

<table> <tr> <td>

<a:map id="map1" value="#{mapContext.webMap}" width="600" height="600"/>

</td><td>

<a:toc mapId="map1" value="#{mapContext.webToc}" style="height:200" />

<a:overview mapId="map1" value="#{mapContext.webOverview}" /> </td>

</tr> </table>

</h:form>

</f:view>

Federal User Conference 2008Federal User Conference 2008

Page 34: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

.NET .NET -- Creating a custom toolCreating a custom tool

To create a tool/command:To create a tool/command:1.1. Write serverWrite server--side code to handle map actionside code to handle map action2.2. Add a new toolbar item to toolbar. Add a new toolbar item to toolbar. 3.3. Set server actionSet server action4.4. For tools, choose client action (point, rectangle, etc.)For tools, choose client action (point, rectangle, etc.)5.5. Set imagesSet images

Federal User Conference 2008Federal User Conference 2008

Page 35: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

Common Data Source APICommon Data Source API

IMapTocFunctionalityIMapTocFunctionality

IQueryFunctionalityIQueryFunctionality

Resource ManagersResource ManagersWeb ADF ControlsWeb ADF Controls

Web ADF ControlsWeb ADF Controls

IGISDataSourceIGISDataSource IGISResourceIGISResource IGISFunctionalityIGISFunctionality

IMapResouceIMapResouce

IGeoprocessingResouceIGeoprocessingResouce

IGeocodeResouceIGeocodeResouce

IMapFunctionalityIMapFunctionality ITileFunctionalityITileFunctionality

IScalebarFunctionalityIScalebarFunctionality

IGeocodeFunctionalityIGeocodeFunctionality

IGeoprocessingFunctionalityIGeoprocessingFunctionality

ArcGISArcGISServerServer ArcIMSArcIMS

GenericGeneric

ImplementationsImplementations

Federal User Conference 2008Federal User Conference 2008

Page 36: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

Common Data Source API benefitsCommon Data Source API benefits

Removes business and GIS logic from Web controlsRemoves business and GIS logic from Web controlsSupport for multiple data sources using the same APISupport for multiple data sources using the same APIEasy to program against different data sources Easy to program against different data sources Implement your own custom data sourcesImplement your own custom data sources

Federal User Conference 2008Federal User Conference 2008

Page 37: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

Data sourceData source--specific APIsspecific APIsEach data source a different set of capabilities Each data source a different set of capabilities –– ArcGISArcGIS ServerServer

SOAP, SOAP, ArcObjectsArcObjects

–– ArcIMSArcIMSArcXMLArcXML

–– ArcWebArcWeb ServicesServicesSOAP SOAP

What does this mean?What does this mean?–– Many data sourceMany data source--specific classes availablespecific classes available–– More business/GIS logicMore business/GIS logic–– Different APIs may use different communication protocolsDifferent APIs may use different communication protocols–– Requires different programming patterns for each data sourceRequires different programming patterns for each data source

Federal User Conference 2008Federal User Conference 2008

Page 38: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

ArcGISArcGIS Server APIsServer APIsSOAPSOAP

Available for services and server object extensionsAvailable for services and server object extensionsDesigned for stateless interactionDesigned for stateless interaction

ArcObjectsArcObjectsAvailable for Local Available for Local ArcGISArcGIS Server servicesServer servicesDesigned for stateless and Designed for stateless and statefulstateful interactioninteraction

Federal User Conference 2008Federal User Conference 2008

Page 39: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

Web ADF TasksWeb ADF TasksVisual components Visual components –– perform a set of related actionsperform a set of related actions–– generate resultsgenerate results

Encapsulate a workflowEncapsulate a workflow–– UI for gathering inputUI for gathering input–– Perform some action based on inputsPerform some action based on inputs–– Generate resultsGenerate results

Federal User Conference 2008Federal User Conference 2008

Page 40: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

Web ADF TasksWeb ADF TasksConfigurable from ManagerConfigurable from ManagerOut of the box tasksOut of the box tasks–– NavigationNavigation–– GeoprocessingGeoprocessing–– Search by attributesSearch by attributes–– EditingEditing–– Find directionFind direction–– Predefined queryPredefined query–– Find placeFind place–– Print Task (9.3)Print Task (9.3)

Custom tasksCustom tasks

Federal User Conference 2008Federal User Conference 2008

Page 41: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

The Task Framework (.NET)The Task Framework (.NET)Framework provides for:Framework provides for:–– Configuring tasks in VS.NET and ManagerConfiguring tasks in VS.NET and Manager–– Organization of tasksOrganization of tasks–– Feedback when a task is executingFeedback when a task is executing–– Management of resultsManagement of results

DisplayDisplayVisualization on MapVisualization on MapDelete, Refresh, ReDelete, Refresh, Re--runrun

–– Distributable UI componentsDistributable UI componentsPlugs into ManagerPlugs into Manager

ExtensibleExtensible CustomTask

VS 2005

VS 2005

Manager

Manager

Federal User Conference 2008Federal User Conference 2008

Page 42: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

.NET Web Custom Tasks.NET Web Custom TasksBasic task implements Basic task implements ITaskITaskCreate a custom Web control Create a custom Web control –– Extend Task or Extend Task or FloatingPanelTaskFloatingPanelTask abstract base classesabstract base classes

ESRI.ArcGIS.ADF.Web.UI.WebControlsESRI.ArcGIS.ADF.Web.UI.WebControls

FloatingPanelFloatingPanel

ESRI.ArcGIS.ADF.Web.UI.WebControlsESRI.ArcGIS.ADF.Web.UI.WebControls

FloatingPanelTaskFloatingPanelTask

CustomTaskCustomTask

ICallbackEventHandlerICallbackEventHandlerIBuddyControlSupportIBuddyControlSupportITaskITask

ASP.NET Web ControlsASP.NET Web ControlsFederal User Conference 2008Federal User Conference 2008

Page 43: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

.NET Custom Task Classes

ITaskITask

TaskTask

FloatingFloatingPanelTaskPanelTask

DevTaskDevTaskDesignerDesigner

CustomCustomTaskResultsTaskResults

TaskDesignerTaskDesigner

IWebConfiguratorIWebConfigurator

ITaskResultsContainerITaskResultsContainer

TaskResultsTaskResults

DevTaskDevTaskWebConfiguratorWebConfigurator

RequiredRequired OptionalOptional

DevTaskDevTask

Federal User Conference 2008Federal User Conference 2008

Page 44: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

Java Custom Web TasksJava Custom Web TasksParametersParameters–– Inputs needed by the taskInputs needed by the task–– E.g. Layer name, zoom factor, etc E.g. Layer name, zoom factor, etc ……

Commands (Actions)Commands (Actions)–– Business logic Is executed without user interaction with the mapBusiness logic Is executed without user interaction with the map–– E.g. Zoom to full extentE.g. Zoom to full extent

ToolsTools–– User interaction with the map is requiredUser interaction with the map is required–– ClientClient--side action is requiredside action is required–– E.g. Identify, dynamic navigation E.g. Identify, dynamic navigation

Federal User Conference 2008Federal User Conference 2008

Page 45: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

Java Custom Task ImplementationJava Custom Task Implementation

1.1. Create a standard Java ClassCreate a standard Java Class–– Signature of the method will dictate command or tool Signature of the method will dictate command or tool

2.2. Register the Java class as a managed beanRegister the Java class as a managed bean–– Faces.configFaces.config–– Make it available in the ADFMake it available in the ADF

3.3. Add the task tag to the Add the task tag to the jspjsp–– Reference the managed beanReference the managed bean–– To visually display the UI to the userTo visually display the UI to the user

Federal User Conference 2008Federal User Conference 2008

Page 46: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

Implement a custom task (1)Implement a custom task (1)Create a standard Java ClassCreate a standard Java Class

Register Java class as a managed beanRegister Java class as a managed bean

public class public class MyTaskMyTask {{

}}

MyTask.java

<managed<managed--bean>bean>

<managed<managed--beanbean--name>name>myTaskmyTask</managed</managed--beanbean--name>name>

<managed<managed--beanbean--class>class>myPackage.MyTaskmyPackage.MyTask</managed</managed--beanbean--class>class>

<managed<managed--beanbean--scope>session</managedscope>session</managed--beanbean--scope>scope>

</managed</managed--bean>bean>

faces-config.xml

Federal User Conference 2008Federal User Conference 2008

Page 47: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

Implement a custom task (2)Implement a custom task (2)Add the control to the Add the control to the jspjsp–– Value attribute = value of managedValue attribute = value of managed--beanbean--name in facesname in faces--configconfig

<<a:taska:task value="#{value="#{myTaskmyTask}" }" mapIdmapId="map1" />="map1" />

xxx.jsp

<managed<managed--bean>bean>

<managed<managed--beanbean--name>name>myTaskmyTask</managed</managed--beanbean--name>name>

faces-config.xml

Federal User Conference 2008Federal User Conference 2008

Page 48: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

Questions?Questions?

Federal User Conference 2008Federal User Conference 2008

Page 49: Developing Web Applications with ArcGIS Server · Product Platforms ArcGIS Server for the Microsoft .Net Framework –Windows ArcGIS Server for the Java Platform –Windows, Linux,

Thank YouThank You

Federal User Conference 2008Federal User Conference 2008