web appbuilder for arcgis creating custom widgets and …...controller widget functional widget...

34
Julian Kissling Web AppBuilder for ArcGIS: Creating Custom Widgets and Themes

Upload: others

Post on 24-Sep-2020

15 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Web AppBuilder for ArcGIS Creating Custom Widgets and …...Controller Widget Functional Widget Purpose • Displays app information • Defines app behaviors, interactions, workflows,

Julian Kissling

Web AppBuilder for ArcGIS:

Creating Custom Widgets and

Themes

Page 2: Web AppBuilder for ArcGIS Creating Custom Widgets and …...Controller Widget Functional Widget Purpose • Displays app information • Defines app behaviors, interactions, workflows,

Introduction

Create a Widget

WAB Communities

Create a Theme

Q&A

Page 3: Web AppBuilder for ArcGIS Creating Custom Widgets and …...Controller Widget Functional Widget Purpose • Displays app information • Defines app behaviors, interactions, workflows,

Web AppBuilder for ArcGIS

Introduction

Page 4: Web AppBuilder for ArcGIS Creating Custom Widgets and …...Controller Widget Functional Widget Purpose • Displays app information • Defines app behaviors, interactions, workflows,

Samples Configurable Apps & Builders Widgets

Building Web Apps for Your OrganizationUsing the ArcGIS API for JavaScript

Page 5: Web AppBuilder for ArcGIS Creating Custom Widgets and …...Controller Widget Functional Widget Purpose • Displays app information • Defines app behaviors, interactions, workflows,

GUIBuilder

widgets

Themes

Stem App

config

An App

Building an App

Page 6: Web AppBuilder for ArcGIS Creating Custom Widgets and …...Controller Widget Functional Widget Purpose • Displays app information • Defines app behaviors, interactions, workflows,

Access Type

518,364Total AppBuilder Apps

16%Shared

13%Account

33%Public

38%Private

Page 7: Web AppBuilder for ArcGIS Creating Custom Widgets and …...Controller Widget Functional Widget Purpose • Displays app information • Defines app behaviors, interactions, workflows,

Web AppBuilder (Developer Edition)

Page 8: Web AppBuilder for ArcGIS Creating Custom Widgets and …...Controller Widget Functional Widget Purpose • Displays app information • Defines app behaviors, interactions, workflows,

Widget Theme

• Execution at run time

• Configure-in, not cut/paste

• Self sufficient and

distributable

• Need container, no coding

block

• Has programing framework

of container

• Applied at run time

• Configure-in, not modify css

• Need container

• Self sufficient and

distributable

• Has programing framework

of container

Page 9: Web AppBuilder for ArcGIS Creating Custom Widgets and …...Controller Widget Functional Widget Purpose • Displays app information • Defines app behaviors, interactions, workflows,

Building blocks of apps

Widgets

Page 10: Web AppBuilder for ArcGIS Creating Custom Widgets and …...Controller Widget Functional Widget Purpose • Displays app information • Defines app behaviors, interactions, workflows,

It’s really just a web app

MyWidget.js

MyWidget.css

MyWidget.html

Page 11: Web AppBuilder for ArcGIS Creating Custom Widgets and …...Controller Widget Functional Widget Purpose • Displays app information • Defines app behaviors, interactions, workflows,

Inheriting from BaseWidget

A widget derived from the BaseWidget class

Page 12: Web AppBuilder for ArcGIS Creating Custom Widgets and …...Controller Widget Functional Widget Purpose • Displays app information • Defines app behaviors, interactions, workflows,

Dijit lifecycle Widget events

• postCreate

• startup

• …

• onOpen, onActive

• onClose, onDeActive

Page 13: Web AppBuilder for ArcGIS Creating Custom Widgets and …...Controller Widget Functional Widget Purpose • Displays app information • Defines app behaviors, interactions, workflows,

BaseWidget Your job?

• App properties (name, icon,

localization)

• App config data

• Widget's config data

• Map object

• Widget state (open, closed,

active…)

• Events (open/signIn)

• Widget communication

• Widget UI (HTML/template)

• Widget config file (JSON)

• Widget styles (CSS)

• Localization

• Your unique business logic

(JavaScript)

Page 14: Web AppBuilder for ArcGIS Creating Custom Widgets and …...Controller Widget Functional Widget Purpose • Displays app information • Defines app behaviors, interactions, workflows,

Conventions and Structure

MyWidget

Widget.js

css/

images/

nls/

setting/

manifest.json

styles.css

es-es/

icon.png

strings.js

config.json

Widget.html

Page 15: Web AppBuilder for ArcGIS Creating Custom Widgets and …...Controller Widget Functional Widget Purpose • Displays app information • Defines app behaviors, interactions, workflows,

Getting Started

1. Download developer edition

2. Connect to organization or portal

3. Copy widget template

4. Run the builder

5. Create an app with your widget

6. Build your widget in the app

Page 16: Web AppBuilder for ArcGIS Creating Custom Widgets and …...Controller Widget Functional Widget Purpose • Displays app information • Defines app behaviors, interactions, workflows,

Configure your custom widget inside the builder

• Building a UI for the user:

- Setting.js

- Config info

- getConfig, setConfig

- Setting.html

- Usual localization pattern

- css

Page 17: Web AppBuilder for ArcGIS Creating Custom Widgets and …...Controller Widget Functional Widget Purpose • Displays app information • Defines app behaviors, interactions, workflows,

Create a New Widget

Page 18: Web AppBuilder for ArcGIS Creating Custom Widgets and …...Controller Widget Functional Widget Purpose • Displays app information • Defines app behaviors, interactions, workflows,

App in style with personality

Theme

Page 19: Web AppBuilder for ArcGIS Creating Custom Widgets and …...Controller Widget Functional Widget Purpose • Displays app information • Defines app behaviors, interactions, workflows,

Theme is you

Page 20: Web AppBuilder for ArcGIS Creating Custom Widgets and …...Controller Widget Functional Widget Purpose • Displays app information • Defines app behaviors, interactions, workflows,

Major Components in a Theme

• Layout

• Panel

• Style

• Controller

Page 21: Web AppBuilder for ArcGIS Creating Custom Widgets and …...Controller Widget Functional Widget Purpose • Displays app information • Defines app behaviors, interactions, workflows,

What Composes a Theme?

• Layout

• Panel

• Style

• Controler

+

-

Page 22: Web AppBuilder for ArcGIS Creating Custom Widgets and …...Controller Widget Functional Widget Purpose • Displays app information • Defines app behaviors, interactions, workflows,

What Composes a Theme?

• Layout

• Panel

• Style

• Controller

+

-widget

widget

Page 23: Web AppBuilder for ArcGIS Creating Custom Widgets and …...Controller Widget Functional Widget Purpose • Displays app information • Defines app behaviors, interactions, workflows,

What Composes a Theme?

• Layout

• Panel

• Style

• Controller

+

-

widget

widget

Page 24: Web AppBuilder for ArcGIS Creating Custom Widgets and …...Controller Widget Functional Widget Purpose • Displays app information • Defines app behaviors, interactions, workflows,

What Composes a Theme?

• Layout

• Panel

• Style

• Controller

+

-

widget

widget

Page 25: Web AppBuilder for ArcGIS Creating Custom Widgets and …...Controller Widget Functional Widget Purpose • Displays app information • Defines app behaviors, interactions, workflows,

What Makes Up The WAB UI?

Dojo dijits ArcGIS API widgets

Jimu

widgets

WAB UI

Page 26: Web AppBuilder for ArcGIS Creating Custom Widgets and …...Controller Widget Functional Widget Purpose • Displays app information • Defines app behaviors, interactions, workflows,

How UI Libraries Work In WAB:

Dojo dijits: claro.css

ArcGIS API for JavaScript: esri.css

Jimu: jimu.css, jimu-override.css, etc.

Theme: common.css, style.css

Page 27: Web AppBuilder for ArcGIS Creating Custom Widgets and …...Controller Widget Functional Widget Purpose • Displays app information • Defines app behaviors, interactions, workflows,

Compare to a Functional Widget

Controller Widget Functional Widget

Purpose

• Displays app information

• Defines app behaviors,

interactions, workflows, etc.

Provides one specific

functionality to the app

Folder Structure Very similar

Manifest

isController True False

isThemeWidget True False

inPanel Always false May vary

Others Very similar

\

Page 28: Web AppBuilder for ArcGIS Creating Custom Widgets and …...Controller Widget Functional Widget Purpose • Displays app information • Defines app behaviors, interactions, workflows,

Let’s Create a New Theme

Page 29: Web AppBuilder for ArcGIS Creating Custom Widgets and …...Controller Widget Functional Widget Purpose • Displays app information • Defines app behaviors, interactions, workflows,

For you and by you

Community

Page 30: Web AppBuilder for ArcGIS Creating Custom Widgets and …...Controller Widget Functional Widget Purpose • Displays app information • Defines app behaviors, interactions, workflows,

Online help documentationhttp://doc.arcgis.com/en/web-appbuilder

Developer Edition help documentationhttp://developers.arcgis.com/web-appbuilder

Web AppBuilder for ArcGIS Geonethttps://community.esri.com/community/gis/web-gis/web-appbuilder

Helpful Resources

Page 31: Web AppBuilder for ArcGIS Creating Custom Widgets and …...Controller Widget Functional Widget Purpose • Displays app information • Defines app behaviors, interactions, workflows,

Other Online Resources

• Esri Solutions Widgets:

- https://github.com/Esri/solutions-webappbuilder-widgets

• Lists of Widgets:

- http://codesharing.arcgis.com/

- http://esri-es.github.io/Web-AppBuilder-Custom-Widgets/

• Example widgets and theme shown today: (need to update)

Page 32: Web AppBuilder for ArcGIS Creating Custom Widgets and …...Controller Widget Functional Widget Purpose • Displays app information • Defines app behaviors, interactions, workflows,

Questions?

Page 33: Web AppBuilder for ArcGIS Creating Custom Widgets and …...Controller Widget Functional Widget Purpose • Displays app information • Defines app behaviors, interactions, workflows,

Please Take Survey on the App

Page 34: Web AppBuilder for ArcGIS Creating Custom Widgets and …...Controller Widget Functional Widget Purpose • Displays app information • Defines app behaviors, interactions, workflows,