The Trials and Tribulations of Developing an In-House ... · Site Specs •Visual Studio 2010...

33
The Trials and Tribulations of Developing an In-House Customized Municipal GIS Web Site using the ArcGIS Server API 2.0 for Silverlight

Transcript of The Trials and Tribulations of Developing an In-House ... · Site Specs •Visual Studio 2010...

Page 1: The Trials and Tribulations of Developing an In-House ... · Site Specs •Visual Studio 2010 –Started at 2008 •Silverlight 4 –started at 3 •.Net 4 –started at 3.5 •ArcGIS

The Trials and Tribulations of

Developing an In-House Customized Municipal GIS Web Site using the

ArcGIS Server API 2.0 for Silverlight

Page 2: The Trials and Tribulations of Developing an In-House ... · Site Specs •Visual Studio 2010 –Started at 2008 •Silverlight 4 –started at 3 •.Net 4 –started at 3.5 •ArcGIS

Live Audience Cam . . . .

Page 3: The Trials and Tribulations of Developing an In-House ... · Site Specs •Visual Studio 2010 –Started at 2008 •Silverlight 4 –started at 3 •.Net 4 –started at 3.5 •ArcGIS

Why Silverlight?

Why Me?

Why, why me???

Page 4: The Trials and Tribulations of Developing an In-House ... · Site Specs •Visual Studio 2010 –Started at 2008 •Silverlight 4 –started at 3 •.Net 4 –started at 3.5 •ArcGIS

Site Specs

• Visual Studio 2010– Started at 2008

• Silverlight 4 – started at 3

• .Net 4 – started at 3.5

• ArcGIS Silverlight API 2.0– Started at 1.2

• WCF RIA Service 1.0– Started at beta

Page 5: The Trials and Tribulations of Developing an In-House ... · Site Specs •Visual Studio 2010 –Started at 2008 •Silverlight 4 –started at 3 •.Net 4 –started at 3.5 •ArcGIS

Who am I and who are you?

Page 6: The Trials and Tribulations of Developing an In-House ... · Site Specs •Visual Studio 2010 –Started at 2008 •Silverlight 4 –started at 3 •.Net 4 –started at 3.5 •ArcGIS

Start with Decisions

• Who builds it?

• Which API?

• Which code?

• Which template?

• Which database connection?

Page 7: The Trials and Tribulations of Developing an In-House ... · Site Specs •Visual Studio 2010 –Started at 2008 •Silverlight 4 –started at 3 •.Net 4 –started at 3.5 •ArcGIS

In-house vs. Vendor

vs.

DECISIONS

Page 8: The Trials and Tribulations of Developing an In-House ... · Site Specs •Visual Studio 2010 –Started at 2008 •Silverlight 4 –started at 3 •.Net 4 –started at 3.5 •ArcGIS

Silverlight vs. FlexDECISIONS

Page 9: The Trials and Tribulations of Developing an In-House ... · Site Specs •Visual Studio 2010 –Started at 2008 •Silverlight 4 –started at 3 •.Net 4 –started at 3.5 •ArcGIS

VB vs. C#

vs.

C# has a lot more sample code (both ESRI and others)

DECISIONS

Page 10: The Trials and Tribulations of Developing an In-House ... · Site Specs •Visual Studio 2010 –Started at 2008 •Silverlight 4 –started at 3 •.Net 4 –started at 3.5 •ArcGIS

Business vs. Navigation template

Log-in vs. no Log-in

DECISIONS

Page 11: The Trials and Tribulations of Developing an In-House ... · Site Specs •Visual Studio 2010 –Started at 2008 •Silverlight 4 –started at 3 •.Net 4 –started at 3.5 •ArcGIS

How to connect to the database

• ADO.NET (no)• LINQtoSQL• WCF RIA Services

DECISIONS

Page 12: The Trials and Tribulations of Developing an In-House ... · Site Specs •Visual Studio 2010 –Started at 2008 •Silverlight 4 –started at 3 •.Net 4 –started at 3.5 •ArcGIS

What does WCF RIA stand for and who really cares?

• WCF = Windows Communication Framework

• RIA = Rich Internet Application

• N-tier solution

– Presentation tier (Silverlight)

– Middle tier (asp.net)

– Database tier (SQL Server 2008)

• .Net RIA services sounded cooler

Page 13: The Trials and Tribulations of Developing an In-House ... · Site Specs •Visual Studio 2010 –Started at 2008 •Silverlight 4 –started at 3 •.Net 4 –started at 3.5 •ArcGIS

“Things you struggle with”

Page 14: The Trials and Tribulations of Developing an In-House ... · Site Specs •Visual Studio 2010 –Started at 2008 •Silverlight 4 –started at 3 •.Net 4 –started at 3.5 •ArcGIS

Where to put the ClientAccess.xml file

“THINGS YOU STRUGGLE WITH”

Page 15: The Trials and Tribulations of Developing an In-House ... · Site Specs •Visual Studio 2010 –Started at 2008 •Silverlight 4 –started at 3 •.Net 4 –started at 3.5 •ArcGIS

Making database changes

WCF RIA Services not great at this

“THINGS YOU STRUGGLE WITH”

Page 16: The Trials and Tribulations of Developing an In-House ... · Site Specs •Visual Studio 2010 –Started at 2008 •Silverlight 4 –started at 3 •.Net 4 –started at 3.5 •ArcGIS

Default ID button

“THINGS YOU STRUGGLE WITH”

Page 17: The Trials and Tribulations of Developing an In-House ... · Site Specs •Visual Studio 2010 –Started at 2008 •Silverlight 4 –started at 3 •.Net 4 –started at 3.5 •ArcGIS

Find Address Tool

“THINGS YOU STRUGGLE WITH”

Page 18: The Trials and Tribulations of Developing an In-House ... · Site Specs •Visual Studio 2010 –Started at 2008 •Silverlight 4 –started at 3 •.Net 4 –started at 3.5 •ArcGIS

“Moving at the speed of government. . . “

“Reduce XAP size by using application library caching”

“THINGS YOU STRUGGLE WITH”

Page 19: The Trials and Tribulations of Developing an In-House ... · Site Specs •Visual Studio 2010 –Started at 2008 •Silverlight 4 –started at 3 •.Net 4 –started at 3.5 •ArcGIS

Running Asp.net 2 and 4 on same server

Use application pools in IIS

“THINGS YOU STRUGGLE WITH”

Page 20: The Trials and Tribulations of Developing an In-House ... · Site Specs •Visual Studio 2010 –Started at 2008 •Silverlight 4 –started at 3 •.Net 4 –started at 3.5 •ArcGIS

Printing in Silverlight

“THINGS YOU STRUGGLE WITH”

Page 21: The Trials and Tribulations of Developing an In-House ... · Site Specs •Visual Studio 2010 –Started at 2008 •Silverlight 4 –started at 3 •.Net 4 –started at 3.5 •ArcGIS

What’s my server?

myHost = Application.Current.Host.Source.Host;

“THINGS YOU STRUGGLE WITH”

Page 22: The Trials and Tribulations of Developing an In-House ... · Site Specs •Visual Studio 2010 –Started at 2008 •Silverlight 4 –started at 3 •.Net 4 –started at 3.5 •ArcGIS

Layers going to sleep

Set the maximum time an idle instance can be kept running = 0

“THINGS YOU STRUGGLE WITH”

Page 23: The Trials and Tribulations of Developing an In-House ... · Site Specs •Visual Studio 2010 –Started at 2008 •Silverlight 4 –started at 3 •.Net 4 –started at 3.5 •ArcGIS

800 x 600

“THINGS YOU STRUGGLE WITH”

string screenWidth = HtmlPage.Window.Eval("screen.width").ToString();

Page 24: The Trials and Tribulations of Developing an In-House ... · Site Specs •Visual Studio 2010 –Started at 2008 •Silverlight 4 –started at 3 •.Net 4 –started at 3.5 •ArcGIS

Mouse-less laptops

“THINGS YOU STRUGGLE WITH”

Page 25: The Trials and Tribulations of Developing an In-House ... · Site Specs •Visual Studio 2010 –Started at 2008 •Silverlight 4 –started at 3 •.Net 4 –started at 3.5 •ArcGIS

More things to struggle with

•Selection tool – arrays•Disclaimer popup window•Publishing to server

“THINGS YOU STRUGGLE WITH”

Page 26: The Trials and Tribulations of Developing an In-House ... · Site Specs •Visual Studio 2010 –Started at 2008 •Silverlight 4 –started at 3 •.Net 4 –started at 3.5 •ArcGIS

More things to struggle with

•Clear Map Cache – who knew•http://giswebsrvr/ArcGIS/rest/admin/login

•Stepping (too far) away from application•Internet solutions – quickly out-dated

“THINGS YOU STRUGGLE WITH”

Page 27: The Trials and Tribulations of Developing an In-House ... · Site Specs •Visual Studio 2010 –Started at 2008 •Silverlight 4 –started at 3 •.Net 4 –started at 3.5 •ArcGIS

Colors, buttons, and placement of tools drove

me crazy

“THINGS YOU STRUGGLE WITH”

Page 28: The Trials and Tribulations of Developing an In-House ... · Site Specs •Visual Studio 2010 –Started at 2008 •Silverlight 4 –started at 3 •.Net 4 –started at 3.5 •ArcGIS

Forums are friends not food

foreach (vtforester.GIS.Silverlight.MapService service in this.TOC.Services){

switch (service.Label){

case "Parcels":service.IsChecked = true;break;

case "Buildings":service.IsChecked = true;break;

case "Relief Map":service.IsChecked = true;break;

}}

Page 29: The Trials and Tribulations of Developing an In-House ... · Site Specs •Visual Studio 2010 –Started at 2008 •Silverlight 4 –started at 3 •.Net 4 –started at 3.5 •ArcGIS

Punch list

•Layers on/layers off code behind•Measure Tool•Sales Comparables•Street Name dropdown list•As of Friday, Intellisense stopped working (Darn that Bill Gates!)

Page 30: The Trials and Tribulations of Developing an In-House ... · Site Specs •Visual Studio 2010 –Started at 2008 •Silverlight 4 –started at 3 •.Net 4 –started at 3.5 •ArcGIS

In conclusion . . . .

• Silverlight vs. Flex

• In-house vs. Vendor

• VB vs. C#

• Password protected?

• Database connectivity

• Printing in Silverlight

• Be prepared to troubleshoot

There’s no place like 127.0.0.1

Page 31: The Trials and Tribulations of Developing an In-House ... · Site Specs •Visual Studio 2010 –Started at 2008 •Silverlight 4 –started at 3 •.Net 4 –started at 3.5 •ArcGIS
Page 32: The Trials and Tribulations of Developing an In-House ... · Site Specs •Visual Studio 2010 –Started at 2008 •Silverlight 4 –started at 3 •.Net 4 –started at 3.5 •ArcGIS
Page 33: The Trials and Tribulations of Developing an In-House ... · Site Specs •Visual Studio 2010 –Started at 2008 •Silverlight 4 –started at 3 •.Net 4 –started at 3.5 •ArcGIS