55
Introduction to ArcGIS Server Development Introduction to ArcGIS Server Development Java Web ADF Java Web ADF Sathya Prasad Sathya Prasad ESRI Developer Summit 2008 ESRI Developer Summit 2008 1 1

Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

Introduction to ArcGIS Server DevelopmentIntroduction to ArcGIS Server Development

Java Web ADFJava Web ADF

Sathya PrasadSathya Prasad

ESRI Developer Summit 2008ESRI Developer Summit 2008 11

Page 2: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

TopicsTopics

• Introduction to the Web ADF• Web ADF controls• Toolbars, commands and tools• Tasks• Introduction to developer APIs

– Common API– Resource Specific APIs– Library Specific APIs

• Graphics

ESRI Developer Summit 2008ESRI Developer Summit 2008 22

Page 3: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

Introducing the Web Application Developer Framework (ADF)

•• Set of controls, tasks, and Web applications to enable Set of controls, tasks, and Web applications to enable creation of GIS applicationscreation of GIS applications

•• Developer librariesDeveloper libraries

•• TemplatesTemplates

•• DocumentationDocumentation

•• SamplesSamples

•• Geospatial Enterprise Java Beans (EJB)Geospatial Enterprise Java Beans (EJB)

–– Enterprise ADFEnterprise ADF

ESRI Developer Summit 2008ESRI Developer Summit 2008 33

ArcObjects

ArcGIS Server

ArcGIS Server Web

Service ArcIMSJSF Framework

Web ADF for the Java Platform

Page 4: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

Features of the Web ADFFeatures of the Web ADF

•• ArcGIS Server ManagerArcGIS Server Manager–– Build, host, and manage your Web applicationsBuild, host, and manage your Web applications

•• Custom JSF componentsCustom JSF components–– ObjectObject--oriented, AJAXoriented, AJAX--enabled JavaScript libraryenabled JavaScript library

•• Multisource web controlsMultisource web controls–– ArcGIS Server, ArcIMS, ArcWeb, WMS, and CustomArcGIS Server, ArcIMS, ArcWeb, WMS, and Custom

•• Task frameworkTask framework•• Seamless map navigationSeamless map navigation•• Client side Javascript librariesClient side Javascript libraries•• Integration with Eclipse and Creator IDEsIntegration with Eclipse and Creator IDEs

ESRI Developer Summit 2008ESRI Developer Summit 2008 44

Page 5: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

Creating Web ADF applications

1. Use ArcGIS Server Manager – Wizard to build and deploy– No prorgamming necessary– Configure tasks– Export to WAR file and modify

2. IDE integrated template – Same template used by

ArcGIS Server Manager

3. Create applications directlyusing Web controls

ESRI Developer Summit 2008ESRI Developer Summit 2008 55

Page 6: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

Web Mapping Application templateWeb Mapping Application template

•• Web pagesWeb pages•• ControlsControls•• Images/iconsImages/icons•• ThemesThemes•• JavaScript JavaScript

librarieslibraries•• Custom toolsCustom tools•• Help systemHelp system

ESRI Developer Summit 2008ESRI Developer Summit 2008 66

Page 7: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

Advantages of using the template

• Start with a complete GIS Web application

• The template provides: – Layout– Commonly used MapTools

• zoom, pan, measure, identify, full extent

– Themes– Customizable Help system– Code for docking items, closing application

ESRI Developer Summit 2008ESRI Developer Summit 2008 77

Page 8: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

DemoDemo

•• Export web application from ManagerExport web application from Manager•• Import the web application into EclipseImport the web application into Eclipse•• Run the web applicationRun the web application•• Make changes to the web applicationMake changes to the web application•• Run the web application from EclipseRun the web application from Eclipse

ESRI Developer Summit 2008ESRI Developer Summit 2008 88

Page 9: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

TopicsTopics

• Introduction to the Web ADF• Web ADF controls• Toolbars, commands and tools• Tasks• Introduction to developer APIs

– Common API– Resource Specific APIs– Library Specific APIs

• Graphics

ESRI Developer Summit 2008ESRI Developer Summit 2008 99

Page 10: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

Web ADF controlsWeb ADF controls

•• Set of custom JSF Web controls Set of custom JSF Web controls •• Expose server object functionalityExpose server object functionality

ESRI Developer Summit 2008ESRI Developer Summit 2008 1010

Page 11: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

Web ADF controlsWeb ADF controls

•• Set of custom JSF Web controls Set of custom JSF Web controls •• Expose server object functionalityExpose server object functionality•• Types of controlsTypes of controls

ESRI Developer Summit 2008ESRI Developer Summit 2008 1111

Map/Overview• Displays data

Page 12: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

Web ADF controlsWeb ADF controls

•• Set of custom JSF Web controls Set of custom JSF Web controls •• Expose server object functionalityExpose server object functionality•• Types of controlsTypes of controls

ESRI Developer Summit 2008ESRI Developer Summit 2008 1212

Table of contents (TOC)• Map contents• Serves as a legend

Map/Overview• Displays data

Page 13: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

Web ADF controlsWeb ADF controls

•• Set of custom JSF Web controls Set of custom JSF Web controls •• Expose server object functionalityExpose server object functionality•• Types of controlsTypes of controls

ESRI Developer Summit 2008ESRI Developer Summit 2008 1313

Table of contents (TOC)• Map contents• Serves as a legend

Map/Overview• Displays data

Context• Non-visual control• Manages all other controls

Page 14: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

Web ADF controlsWeb ADF controls

•• Set of custom JSF Web controls Set of custom JSF Web controls •• Expose server object functionalityExpose server object functionality•• Types of controlsTypes of controls

ESRI Developer Summit 2008ESRI Developer Summit 2008 1414

Table of contents (TOC)• Map contents• Serves as a legend

Map/Overview• Displays data

Context• Non-visual control• Manages all other controls

Task• Container for functionality

Page 15: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

Web ADF controlsWeb ADF controls

•• Set of custom JSF Web controls Set of custom JSF Web controls •• Expose server object functionalityExpose server object functionality•• Types of controlsTypes of controls

ESRI Developer Summit 2008ESRI Developer Summit 2008 1515

Table of contents (TOC)• Map contents• Serves as a legend

Map/Overview• Displays data

Context• Non-visual control• Manages all other controls

Task• Container for functionality

Toolbar• Container for tools and

commands

Page 16: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

What do the Web ADF controls do?What do the Web ADF controls do?

•• Provide a gateway to resource specific APIsProvide a gateway to resource specific APIs•• Provide an extensible framework Provide an extensible framework

–– Through event model and action listenersThrough event model and action listeners–– Ability to associate multiple renderers (e.g., HTML, WML, Ability to associate multiple renderers (e.g., HTML, WML,

DHTML)DHTML)

•• Manage state between HTTP requestsManage state between HTTP requests•• Manage relationships with other JSF componentsManage relationships with other JSF components

44--1616ESRI Developer Summit 2008ESRI Developer Summit 2008

Page 17: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

Demo

• Create a new JSP page in Eclipse• Explore the web control tags

– Intellisense, Required attributes

• Add WebControls– Context– Map– Overview– TOC

ESRI Developer Summit 2008ESRI Developer Summit 2008 1717

Page 18: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

TopicsTopics

• Introduction to the Web ADF• Web ADF controls• Toolbars, commands and tools• Tasks• Introduction to developer APIs

– Common API– Resource Specific APIs– Library Specific APIs

• Graphics

ESRI Developer Summit 2008ESRI Developer Summit 2008 1818

Page 19: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

Toolbar controlToolbar control

•• Displays a collection of toolsDisplays a collection of toolsand commands and commands

•• Associated to a Map controlAssociated to a Map control•• Contains a collection of toolbar itemsContains a collection of toolbar items

–– ToolTool–– CommandCommand–– DropDrop--down listdown list–– SeparatorsSeparators

•• Required attributesRequired attributes–– mapIdmapId

–– idid

44--1919

<a:toolbar mapId="map1" id="toolbar1"activeTool="toolZoomIn" >

<a:toolbar mapId="map1" id="toolbar1"activeTool="toolZoomIn" >

ESRI Developer Summit 2008ESRI Developer Summit 2008

Page 20: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

CommandsCommands

•• Server side action triggered by eventsServer side action triggered by events–– Example: User clicks on Example: User clicks on Full ExtentFull Extent buttonbutton

•• No interaction with Map requiredNo interaction with Map required

•• Out of the box commandsOut of the box commands–– DirectionalPanListenerDirectionalPanListener

–– ZoomFullExtentListenerZoomFullExtentListener

•• Creating commandsCreating commands–– Bind a Command control to a serverBind a Command control to a server--side action listenerside action listener–– When a command button is clicked, listener class processes When a command button is clicked, listener class processes

business logicbusiness logicESRI Developer Summit 2008ESRI Developer Summit 2008 2020

Page 21: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

ToolsTools

•• Consist of clientConsist of client--side and serverside and server--side actionsside actions

•• ClientClient--side actionside action–– Processing carried out on the browser clientProcessing carried out on the browser client–– Controlled by JavaScript functionsControlled by JavaScript functions

•• ServerServer--side actionside action–– Business logic performed on the serverBusiness logic performed on the server–– com.esri.adf.web.faces.eventcom.esri.adf.web.faces.event

•• Zoom In, Zoom Out, Pan etc..Zoom In, Zoom Out, Pan etc..

–– Custom methodCustom method

ESRI Developer Summit 2008ESRI Developer Summit 2008 2121

Page 22: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

Tool controlTool control

•• Executes a client action followed by a server actionExecutes a client action followed by a server action•• Client post backClient post back•• AttributesAttributes

–– clientActionclientAction•• JavaScript functionJavaScript function•• Performed on the clientPerformed on the client

–– serverActionserverAction•• Processes the requestProcesses the request

–– serverMethodserverMethod•• Points to custom method Points to custom method

44--2222

EsriMapRectangleEsriMapPanEsriMapContinuousPanEsriMapPointEsriMapLineEsriMapPolyEsriMapOval

ZoomInToolActionZoomOutToolActionPanToolAction

ESRI Developer Summit 2008ESRI Developer Summit 2008

myMethod(MapEvent e){ }

Page 23: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

TopicsTopics

• Introduction to the Web ADF• Web ADF controls• Toolbars, commands and tools• Tasks• Introduction to developer APIs

– Common API– Resource Specific APIs– Library Specific APIs

• Graphics

ESRI Developer Summit 2008ESRI Developer Summit 2008 2323

Page 24: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

Web ADF tasksWeb ADF tasks

•• Objects that encapsulate business logicObjects that encapsulate business logic•• OutOut--ofof--thethe--box tasks configurable using Manager or IDEbox tasks configurable using Manager or IDE

ESRI Developer Summit 2008ESRI Developer Summit 2008 2424

Page 25: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

Web ADF tasksWeb ADF tasks

•• Objects that encapsulate business logicObjects that encapsulate business logic•• OutOut--ofof--thethe--box tasks configurable using Manager or IDEbox tasks configurable using Manager or IDE•• Available tasksAvailable tasks

–– Map ToolsMap Tools

ESRI Developer Summit 2008ESRI Developer Summit 2008 2525

Page 26: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

Web ADF tasksWeb ADF tasks

•• Objects that encapsulate business logicObjects that encapsulate business logic•• OutOut--ofof--thethe--box tasks configurable using Manager or IDEbox tasks configurable using Manager or IDE•• Available tasksAvailable tasks

–– Map ToolsMap Tools–– Search AttributesSearch Attributes

ESRI Developer Summit 2008ESRI Developer Summit 2008 2626

Page 27: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

Web ADF tasksWeb ADF tasks

•• Objects that encapsulate business logicObjects that encapsulate business logic•• OutOut--ofof--thethe--box tasks configurable using Manager or IDEbox tasks configurable using Manager or IDE•• Available tasksAvailable tasks

–– Map ToolsMap Tools–– Search AttributesSearch Attributes–– GeocodingGeocoding

ESRI Developer Summit 2008ESRI Developer Summit 2008 2727

Page 28: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

Web ADF tasksWeb ADF tasks

•• Objects that encapsulate business logicObjects that encapsulate business logic•• OutOut--ofof--thethe--box tasks configurable using Manager or IDEbox tasks configurable using Manager or IDE•• Available tasksAvailable tasks

–– Map ToolsMap Tools–– Search AttributesSearch Attributes–– GeocodingGeocoding–– EditingEditing

ESRI Developer Summit 2008ESRI Developer Summit 2008 2828

Page 29: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

Web ADF tasksWeb ADF tasks

•• Objects that encapsulate business logicObjects that encapsulate business logic•• OutOut--ofof--thethe--box tasks configurable using Manager or IDEbox tasks configurable using Manager or IDE•• Available tasksAvailable tasks

–– Map ToolsMap Tools–– Search AttributesSearch Attributes–– GeocodingGeocoding–– EditingEditing–– GeoprocessingGeoprocessing

ESRI Developer Summit 2008ESRI Developer Summit 2008 2929

Page 30: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

Task frameworkTask framework

•• Exposes a way to add custom functionalityExposes a way to add custom functionality

ESRI Developer Summit 2008ESRI Developer Summit 2008 3030

Page 31: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

Task frameworkTask framework

•• Exposes a way to add custom functionalityExposes a way to add custom functionality•• Tasks can contain:Tasks can contain:

–– ParametersParameters–– Commands/actionsCommands/actions–– ToolsTools

ESRI Developer Summit 2008ESRI Developer Summit 2008 3131

Page 32: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

Task frameworkTask framework

•• Exposes a way to add custom functionalityExposes a way to add custom functionality•• Tasks can contain:Tasks can contain:

–– ParametersParameters–– Commands/actionsCommands/actions–– ToolsTools

•• Why use the Task framework?Why use the Task framework?–– Tight integration with ADFTight integration with ADF

•• User interface (UI) built for youUser interface (UI) built for you•• Event handling for commands and toolsEvent handling for commands and tools

ESRI Developer Summit 2008ESRI Developer Summit 2008 3232

Page 33: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

Task frameworkTask framework

•• Exposes a way to add custom functionalityExposes a way to add custom functionality•• Tasks can contain:Tasks can contain:

–– ParametersParameters–– Commands/actionsCommands/actions–– ToolsTools

•• Why use the Task framework?Why use the Task framework?–– Tight integration with ADFTight integration with ADF

•• User interface (UI) built for youUser interface (UI) built for you•• Event handling for commands and toolsEvent handling for commands and tools

–– Organizes related functionalityOrganizes related functionality

ESRI Developer Summit 2008ESRI Developer Summit 2008 3333

Page 34: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

Task frameworkTask framework

•• Exposes a way to add custom functionalityExposes a way to add custom functionality•• Tasks can contain:Tasks can contain:

–– ParametersParameters–– Commands/actionsCommands/actions–– ToolsTools

•• Why use the Task framework?Why use the Task framework?–– Tight integration with ADFTight integration with ADF

•• User interface (UI) built for youUser interface (UI) built for you•• Event handling for commands and toolsEvent handling for commands and tools

–– Organizes related functionalityOrganizes related functionality–– Development similar to implementing standard JavaBeanDevelopment similar to implementing standard JavaBean

ESRI Developer Summit 2008ESRI Developer Summit 2008 3434

Page 35: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

Anatomy of a taskAnatomy of a task

•• ParameterParameter–– Provides inputs to a taskProvides inputs to a task–– Examples: Layer name, zoom factorExamples: Layer name, zoom factor

ESRI Developer Summit 2008ESRI Developer Summit 2008 3535

Page 36: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

Anatomy of a taskAnatomy of a task

•• ParameterParameter–– Provides inputs to a taskProvides inputs to a task–– Examples: Layer name, zoom factorExamples: Layer name, zoom factor

•• Command (action)Command (action)–– Executes business logic without user Executes business logic without user

interaction with the mapinteraction with the map–– Example: Zoom to full extentExample: Zoom to full extent

ESRI Developer Summit 2008ESRI Developer Summit 2008 3636

Page 37: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

Anatomy of a taskAnatomy of a task

•• ParameterParameter–– Provides inputs to a taskProvides inputs to a task–– Examples: Layer name, zoom factorExamples: Layer name, zoom factor

•• Command (action)Command (action)–– Executes business logic without user Executes business logic without user

interaction with the mapinteraction with the map–– Example: Zoom to full extentExample: Zoom to full extent

•• ToolTool–– Requires user interaction with the mapRequires user interaction with the map–– Requires clientRequires client--side actionside action–– Examples: Identify, dynamic navigation (e.g., Zoom In/Out)Examples: Identify, dynamic navigation (e.g., Zoom In/Out)

ESRI Developer Summit 2008ESRI Developer Summit 2008 3737

Page 38: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

Steps to implement a custom taskSteps to implement a custom task

1.1. Create a standard Java ClassCreate a standard Java Class–– Signature of method dictatesSignature of method dictates

a command or tool a command or tool

2.2. Register the Java class as a managed beanRegister the Java class as a managed beanin the facesin the faces--configconfig

–– Makes it available in the ADFMakes it available in the ADF

3.3. Add a task tag to the jsp, with referenceAdd a task tag to the jsp, with referenceto the managed beanto the managed bean

–– Visually displays the UI to the userVisually displays the UI to the user

ESRI Developer Summit 2008ESRI Developer Summit 2008 3838

Page 39: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

Example: Implement a custom task (1)Example: 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

ESRI Developer Summit 2008ESRI Developer Summit 2008 3939

MyTask.java

faces-config.xml

package com.demo;package com.demo;public class public class MyTaskMyTask {{

}}

<managed<managed--bean>bean><managed<managed--beanbean--name>name>myTaskmyTask</managed</managed--beanbean--name>name><managed<managed--beanbean--class>class>com.demo.MyTaskcom.demo.MyTask</managed</managed--beanbean--class>class><managed<managed--beanbean--scope>session</managedscope>session</managed--beanbean--scope>scope>

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

Page 40: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

Example: Implement a custom task (2)Example: Implement a custom task (2)

Add the control to the jspAdd the control to the jsp–– Value attribute = value of managedValue attribute = value of managed--beanbean--name in facesname in faces--configconfig

ESRI Developer Summit 2008ESRI Developer Summit 2008 4040

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

map.jsp

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

faces-config.xml

Page 41: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

DemoDemo

•• Adding a custom task to the web mapping applicationAdding a custom task to the web mapping application

ESRI Developer Summit 2008ESRI Developer Summit 2008 4141

Page 42: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

TopicsTopics

• Introduction to the Web ADF• Web ADF controls• Toolbars, commands and tools• Tasks• Introduction to developer APIs

– Common API– Resource Specific APIs– Library Specific APIs

• Graphics

ESRI Developer Summit 2008ESRI Developer Summit 2008 4242

Page 43: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

The Web ADF APIThe Web ADF API

•• Web ADF can be divided into different areas:Web ADF can be divided into different areas:–– Common APICommon API

•• WebControlsWebControls

–– Resource specific APIsResource specific APIs•• ArcGIS Server, ArcIMS, ArcWeb Services, WMSArcGIS Server, ArcIMS, ArcWeb Services, WMS

•• Web ADF APIs use:Web ADF APIs use:–– Library specific APIs based on type of resourceLibrary specific APIs based on type of resource

•• ArcObjects, Java Connector etc..ArcObjects, Java Connector etc..

77--4343ESRI Developer Summit 2008ESRI Developer Summit 2008

Page 44: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

Web ADF development pathsWeb ADF development paths

99--4444

WebcontrolsCommon API

Resource specific API

AGS AIMS WSIn

tern

et

Loca

l

Library specific API

WebContext

WebMapWebxxx

SOAP API(arcgisws.jar)

ArcObjects API(arcobjects.jar)

Java Connector API

(arcims_jconnect.jar)

ArcWeb ServicesAPI

(arcgis_arcweb_stubs.jar)

ESRI Developer Summit 2008ESRI Developer Summit 2008

Page 45: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

Organization of the Developer APIsOrganization of the Developer APIs

com.esri.adf.webcom.esri.adf.webcom.esri.adf.web.datacom.esri.adf.web.datacom.esri.adf.web.data.geometrycom.esri.adf.web.data.geometrycom.esri.adf.web.data.querycom.esri.adf.web.data.querycom.esri.adf.web.data.renderercom.esri.adf.web.data.renderercom.esri.adf.web.data.resultscom.esri.adf.web.data.resultscom.esri.adf.web.data.symbolcom.esri.adf.web.data.symbolcom.esri.adf.web.data.taskscom.esri.adf.web.data.taskscom.esri.adf.web.faces.*com.esri.adf.web.faces.*com.esri.adf.web.taskscom.esri.adf.web.taskscom.esri.adf.web.utilcom.esri.adf.web.utilcom.esri.adf.web.wms.*com.esri.adf.web.wms.*com.esri.adf.web.ags.*com.esri.adf.web.ags.*com.esri.adf.web.aims.*com.esri.adf.web.aims.*com.esri.adf.web.aws.*com.esri.adf.web.aws.*com.esri.adf.web.ejb.*com.esri.adf.web.ejb.*com.esri.arcgisws.*com.esri.arcgisws.*com.esri.aims.mtier.*com.esri.aims.mtier.*com.esri.arcgis.*com.esri.arcgis.*

99--4545

Common API

Resource Specific API

Library Specific API

ESRI Developer Summit 2008ESRI Developer Summit 2008

Page 46: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

Common APICommon API

• Provides a generic way for Web controls to access functionality

• Exposes commonly used functionality – Query, QueryCriteria, Highlight, Zoom etc..

• Exposes business objects – WebMap, WebQuery, WebGraphics, WebResults

•• Gives access to other APIs Gives access to other APIs

ESRI Developer Summit 2008ESRI Developer Summit 2008 4646

Context controlContext control

WebGeocode, …WebGeocode, …

WebContextWebContext

WebGraphicsWebGraphics WebQueryWebQuery

Map controlMap control Toc controlToc control Overview controlOverview control

WebMapWebMap WebTocWebToc

WebOverviewWebOverview

Page 47: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

Advantages of the Common API

• Removes business and GIS logic from Web controls

• Support for multiple data sources using the same API

• Easy to program against different data sources

• Implement your own custom data sources

• Code is portable

• Abstracts Implementation

ESRI Developer Summit 2008ESRI Developer Summit 2008 4747

Page 48: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

Resource Specific APIs

• Each resource exposes a different set of functionality– ArcGIS Server - SOAP, ArcObjects – (HTTP , DCOM)– ArcIMS – ArcXML – (TCP, HTTP)– ArcWeb Services – SOAP (HTTP)

• What does this mean?– Many other resource specific classes available– More value objects, business/GIS logic– Different APIs use different communication protocols– Requires different programming patterns for each data source–– Available functionality depends on:Available functionality depends on:

Underlying capabilities of the server objectUnderlying capabilities of the server objectCapabilities exposed through the ADF APICapabilities exposed through the ADF API

ESRI Developer Summit 2008ESRI Developer Summit 2008 4848

Page 49: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

Library Specific APIsLibrary Specific APIs

•• Has more functionality available than common or Has more functionality available than common or Resource specific APIsResource specific APIs

•• Use it only when the higher level APIs do not provide Use it only when the higher level APIs do not provide the required functionality (Example: Buffer)the required functionality (Example: Buffer)

–– Custom tasks to execute business logicCustom tasks to execute business logic

•• Example: ArcObjects APIExample: ArcObjects API–– Gives you access to the server objectsGives you access to the server objects

•• MapServer, geocodeServer, etc.MapServer, geocodeServer, etc.

–– Gives you access to fine grained ArcObjectsGives you access to fine grained ArcObjects•• IMapServer, IMapServerInfo, IMapServerLayout etcIMapServer, IMapServerInfo, IMapServerLayout etc

ESRI Developer Summit 2008ESRI Developer Summit 2008 4949

Page 50: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

TopicsTopics

• Introduction to the Web ADF• Web ADF controls• Toolbars, commands and tools• Tasks• Introduction to developer APIs

– Common API– Resource Specific APIs– Library Specific APIs

• Graphics

ESRI Developer Summit 2008ESRI Developer Summit 2008 5050

Page 51: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

Graphics layerGraphics layer

•• Drawn on top of layers in the mapDrawn on top of layers in the map

•• Used by other tasksUsed by other tasks–– Highlighting featuresHighlighting features–– Labeling textLabeling text–– Displaying buffersDisplaying buffers–– EditingEditing–– Custom tasksCustom tasks

•• Rendering occurs independently from the mapRendering occurs independently from the map

–– Does not require a map redrawDoes not require a map redraw

ESRI Developer Summit 2008ESRI Developer Summit 2008 5151

Page 52: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

Using the graphics layerUsing the graphics layer

•• WebQueryWebQuery–– Uses a default symbol to display graphicsUses a default symbol to display graphics–– Can apply different point, line, or polygon symbols Can apply different point, line, or polygon symbols –– Provides convenient access to the graphics layerProvides convenient access to the graphics layer–– Ideal for displaying a few features in one colorIdeal for displaying a few features in one color

•• Buffer, selected features, etc.Buffer, selected features, etc.

ESRI Developer Summit 2008ESRI Developer Summit 2008 5252

Page 53: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

Using the graphics layerUsing the graphics layer

•• WebQueryWebQuery–– Uses a default symbol to display graphicsUses a default symbol to display graphics–– Can apply different point, line, or polygon symbols Can apply different point, line, or polygon symbols –– Provides convenient access to the graphics layerProvides convenient access to the graphics layer–– Ideal for displaying a few features in one colorIdeal for displaying a few features in one color

•• Buffer, selected features, etc.Buffer, selected features, etc.

•• WebGraphicsWebGraphics–– Uses a renderer to display graphicsUses a renderer to display graphics

•• More control over displayMore control over display

–– Can render based on attribute valuesCan render based on attribute values–– Ideal for displaying large number of featuresIdeal for displaying large number of features

ESRI Developer Summit 2008ESRI Developer Summit 2008 5353

Page 54: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

SummarySummary

• Introduction to the Web ADF• Web ADF controls• Toolbars, commands and tools• Tasks• Introduction to developer APIs

– Common API– Resource Specific APIs– Library Specific APIs

• Graphics

ESRI Developer Summit 2008ESRI Developer Summit 2008 5454

Page 55: Introduction to ArcGIS Server Development Java Web ADF · 2008-06-26 · Introducing the Web Application Developer Framework (ADF) • Set of controls, tasks, and Web applications

In ConclusionIn Conclusion……

•• All sessions are recorded and will be available on EDNAll sessions are recorded and will be available on EDN–– Slides and code will also be availableSlides and code will also be available

•• Please fill out session surveys!Please fill out session surveys!

•• Still have questions?Still have questions?1.1. Tech talk, Demo Theatres, Meet the TeamTech talk, Demo Theatres, Meet the Team2.2. ““Ask a DeveloperAsk a Developer”” link on web pagelink on web page

•• www.esri.com/devsummit/techquestionswww.esri.com/devsummit/techquestions

ESRI Developer Summit 2008ESRI Developer Summit 2008 5555