1
Using Silverlight for Conservation
Al Pascual
Redlands, CaliforniaMarch 8th – 9th, 2010
Web Mapping for Conservation Organizations Workshop
•
Web Mapping for Conservation Organizations Workshop 2
What Is Silverlight?
• Browser plug-in for creating rich interactive web applications.
• .NET-based API (subset of full .NET framework)• XAML-based UI (mostly compatible subset of WPF)• Microsoft’s response to Adobe Flex• Available on Windows, Mac OS X, and Linux• Microsoft fully supported framework for Rich Internet
Applications.
Gov 2.0 3
Why Silverlight
• Many of the same advantages as Flex– Stateless. No server-side session means less burden on server.– Client-side power means fewer server roundtrips, better scalability.– Rich Internet Application (RIA) experience with high-performance
graphics and multimedia.• For organizations with existing .NET skills it is the natural choice.• Full integration with the Microsoft stack: Visual Studio 2008 for
development, SharePoint web-part, ESRI MapIt for fast and simple integration with SQL Server 2008.
1-3
Gov 2.0 4
Why not Silverlight
5Web Mapping for Conservation Organizations Workshop
Getting started with Silverlight 3.0
• Free Tools–Visual Web Developer 2008 Express with SP1
• Professional Tools–Visual Studio 2008 SP1
orMicrosoft Silverlight 3 Tools for Visual Studio 2008 SP1 http://www.microsoft.com/downloads/details.aspx?FamilyId=9442B0F2-7465-417A-88F3-5E7B5409E9DD&displaylang=en
–Optional (but recommended!)• Silverlight Toolkit
http://www.codeplex.com/silverlight
• Microsoft Expression Blend 3
1-5
Gov 2.0 6
Features of the API
• Custom GIS Tools(OPEN Source repository at) http://esrisilverlight.codeplex.com/
– Bookmark– FeatureDataGrid– Magnifyer– MagnifyingGlass– MapProgressBar– MapTip– Navigation– OverviewMap– Toolbar
• Out of the boxTask– Find– Identify– Query– Address Locator– Geoprocessing– Routing
Gov 2.0 7
• Demos
http://serverapps.esri.com/silverlightdemos/showcase/
http://maps.esri.com/Police/Default.aspx
http://serverapps.esri.com/SilverlightDemos/PrintMapApplication.Web/
Twitter Demo
How to share geographic information?
• Simple RSS with geographic information–Points–Lines–Polygons
• Real time against KML and Shapefiles• GeoRSS is like RSS sorted by time.• GeoAtom?• GeoRSS: georss.org
Gov 2.0 8
What’s the benefits of GeoRSS?
• XML Based• You don’t need to download a complete file before using it?• Time aware• No programming tools required to generate GeoRSS using open
source tools:– http://orchard.codeplex.com/– http://graffiticms.codeplex.com/
Gov 2.0 9
Creating GeoRSS content.
Gov 2.0 10
Let’s create an application!
Gov 2.0 11
<esri:Map x:Name="MyMap" ><esri:ArcGISTiledMapServiceLayerID="StreetMapLayer" Url="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer"/> </esri:Map>
GeoRSS sample and code
• http://alpserver/georss/index.html
• Open project:– C:\Projects\GeoRSSSilverlight
Gov 2.0 12
Where to go from here?
Gov 2.0 13
Microsoft Silverlight Program Manager Tim Heuer has 7 part series of blog posts on Getting Started with Silverlight development:
http://timheuer.com/blog/articles/getting-started-with-silverlight-development.aspx
Gov 2.0 14
.WCF RIA Services Application Pattern
• Simplifies the traditional n-tier application pattern by bringing together the ASP.NET and Silverlight 3 platforms
• Provides a pattern to write application logic that runs on the mid-tier and controls access to data
1-14
Gov 2.0 16
• Silverlight code is packaged in XAP file• You publish a XAP file + web page referencing the XAP from an
HTML object tag (generated by visual studio / blend)
• Web server must support MIME type– IIS 7 yes– IIS 6 no – setup manually
application/x-silverlight-app
<object data="data:application/x-silverlight," type="application/x-silverlight-2" …<param name="source" value="myapp.xap"/>….</object>
Deploying Silverlight Applications
1-16
BrowserXAP
HTML
Web Server
Gov 2.0 17
Routing
Analyze
Tasks
Geoprocessing
Editing
Publishing Presentation
Sharing
Consuming
Navigation
Geometry
Symbolyzing
Geolocation
Geotagging
Locator