developing gis webparts in sharepoint
DESCRIPTION
Developing GIS WebParts in SharePoint. Presented by: Marianne Cardwell, Woolpert, Inc. Cheryl Spencer, City of Indianapolis February 17, 2009. Overview. Introduction to WebParts WebParts in SharePoint SharePoint development environment ESRI options Microsoft Virtual Earth. - PowerPoint PPT PresentationTRANSCRIPT
Developing GIS WebParts in SharePointDeveloping GIS WebParts in SharePoint
Presented by:Marianne Cardwell, Woolpert, Inc.Cheryl Spencer, City of IndianapolisFebruary 17, 2009
–W O
O L P
E R
T F I R
M W
I D E
S E
R V
I C E
S
OverviewOverview
•Introduction to WebParts•WebParts in SharePoint•SharePoint development environment•ESRI options•Microsoft Virtual Earth
–W O
O L P
E R
T F I R
M W
I D E
S E
R V
I C E
SINTRODUCTION TO WEBPARTSINTRODUCTION TO WEBPARTS
–W O
O L P
E R
T F I R
M W
I D E
S E
R V
I C E
S
What is a Web Part?What is a Web Part?
•According to Microsoft, ASP.NET Web Parts controls are an integrated set of controls for creating Web sites that enable end users to modify the content, appearance, and behavior of Web pages directly in a browser.
•Why use a Web Part?– Consistent look and feel– Ease of use and reuse
–W O
O L P
E R
T F I R
M W
I D E
S E
R V
I C E
S
From a Developer’s Perspective:What is a Web Part?From a Developer’s Perspective:What is a Web Part?
• Server-side control running inside context of Web Part pages within ASP.NET application or Windows SharePoint Services site.
• 2 types of Web Parts:• ASP.NET 2.0:
• Built on top of the ASP.NET Web Part infrastructure
• Have a dependency on System.Web.dll• Can be used in SharePoint and other
types of web sites, making them much more flexible
• SharePoint:• Older and have a dependency on
Microsoft.SharePoint.dll• Can only be used in SharePoint web
sites
–W O
O L P
E R
T F I R
M W
I D E
S E
R V
I C E
S
Web Part AttributesWeb Part Attributes
•A Web Part-based page allows users to:– Add/remove Web Parts from page.– Move Web Parts on page.
•Personalization requires database. Default is SQL Server Express 2005, but a different database can be specified in configuration file.
–W O
O L P
E R
T F I R
M W
I D E
S E
R V
I C E
S
Web Part DemosWeb Part Demos
•Web Parts in ASP.NET web site•Web Parts in SharePoint
–W O
O L P
E R
T F I R
M W
I D E
S E
R V
I C E
SWEB PARTS INSHAREPOINTWEB PARTS INSHAREPOINT
–W O
O L P
E R
T F I R
M W
I D E
S E
R V
I C E
S
SharePoint WebPartsSharePoint WebParts
• In WSS3.0, Web Parts based on ASP.NET 2.0 Web Part infrastructure.
• In most cases, should develop Web Parts inheriting from System.Web.UI.WebControls.WebParts.WebPart.
•Microsoft.SharePoint.WebPartPages.WebPart provides the following features:– Cross page connections– Connections between Web Parts outside of a zone.– Client-side connections (Web Part Page Services
Component)– Data caching infrastructure, including ability to cache
database
–W O
O L P
E R
T F I R
M W
I D E
S E
R V
I C E
SSHAREPOINTDEVELOPMENT ENVIRONMENT
SHAREPOINTDEVELOPMENT ENVIRONMENT
–W O
O L P
E R
T F I R
M W
I D E
S E
R V
I C E
S
Operating SystemOperating System
•No easy way to develop on Windows XP.•Free Virtual Hard Drive downloadable
from Microsoft at http://tinyurl.com/8dpwm4.
•Includes WSS 3.0 SP1 and VS 2008.•Expires Sept 20, 2009.•About 1.8GB.
–W O
O L P
E R
T F I R
M W
I D E
S E
R V
I C E
S
WSS 3.0 Tools – VS 2008 ExtensionsWSS 3.0 Tools – VS 2008 Extensions
•Contains VS project templates for Web Parts, site definitions, and SP solution.
•Available for download from http://tinyurl.com/5tj6er.
•F5 builds and deploys solution, then opens IE.
•Provides ability to debug code.
–W O
O L P
E R
T F I R
M W
I D E
S E
R V
I C E
S
SharePoint Project TemplatesSharePoint Project Templates
–W O
O L P
E R
T F I R
M W
I D E
S E
R V
I C E
S
SharePoint Item TemplatesSharePoint Item Templates
–W O
O L P
E R
T F I R
M W
I D E
S E
R V
I C E
SESRI OPTIONSESRI OPTIONS
–W O
O L P
E R
T F I R
M W
I D E
S E
R V
I C E
S
WebADFWebADF
•Possible to create WebADF Web Parts.•ArcGIS Server blog provides samples for
both 9.2 (http://tinyurl.com/baaajs) and 9.3 (http://tinyurl.com/djj3oa).
•Limitations:– 64-bit MOSS 2007 requires IIS application pools
to run in pure 64-bit mode, which means that 32-bit applications, including the WebADF, will not work. (Rex Hansen, ESRI, http://tinyurl.com/bfcnwf)
– Potential for additional ArcGIS Server license depending on network set-up.
–W O
O L P
E R
T F I R
M W
I D E
S E
R V
I C E
S
WebAdf Web PartWebAdf Web Part
ESRI 9.3 sample from http://tinyurl.com/djj3oa
–W O
O L P
E R
T F I R
M W
I D E
S E
R V
I C E
S
ArcGIS Server JS APIArcGIS Server JS API
•Surprisingly powerful and relatively easy to use in SharePoint.
•Keep in mind:– Potential for multiple web parts, including
identical web parts, on a single web page. Affects element names.
– Use the _spBodyOnLoadFunctionNames array to add JS functions to the window.onload event.
_spBodyOnLoadFunctionNames.push('Indy.WebControls.JSAPI.init()');";
– JS & CSS can be added in different ways. Make sure you test to see if files already exist.
–W O
O L P
E R
T F I R
M W
I D E
S E
R V
I C E
S
Web Part DemosWeb Part Demos
•JS API SharePoint Web Part
–W O
O L P
E R
T F I R
M W
I D E
S E
R V
I C E
SVIRTUAL EARTHVIRTUAL EARTH
–W O
O L P
E R
T F I R
M W
I D E
S E
R V
I C E
S
Virtual Earth APIVirtual Earth API
•Similar logic to using the ArcGIS Server JS API.
•Can use the ArcGIS JavaScript™ Extension for Microsoft Virtual Earth™.
–W O
O L P
E R
T F I R
M W
I D E
S E
R V
I C E
S
Web Part DemosWeb Part Demos
•Virtual Earth SharePoint Web Part– Shows the use of a Web Control within a Web
Part
–W O
O L P
E R
T F I R
M W
I D E
S E
R V
I C E
SQUESTIONS?QUESTIONS?