An introduction to SharePoint 2010 Development with ALM. Demonstrates Static Code Analysis with SPDisposeCheck, check-in policies and TFS 2010 Build automation.
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
Jeremy thake introducing alm to share point development implementations (apr2010)
1. Introducing SharePoint 2010 Development to ALM #ALM07 Jeremy Thake wss.made4the.net jthake@made4the.net @jthake – MCTS – MCT - vTSP
2. Jeremy Thake Microsoft Virtual Technology Specialist SharePoint Consultant Microsoft Certified Trainer (MCT) Facilitator of Perth SharePoint User Group
3. Agenda Challenges of SharePoint 2007 Development Enhancements Environment, Platform, Toolset Demos Code Analysis, Build Server
4. Keep your hand up if… You’ve developed on SharePoint You used source control You used a build server You ran SPDisposeCheck You have grey hair
5. Challenges of SharePoint 2007 dev Environment setup Platform learning curve Toolset support Team development Versioned releases
9. Development Environment Windows 7/Vista SP1 support Must be 64-bit Requires min 4Gb RAM for Foundation SharePoint 2010 must be installed locally Wizard installs and configures most things
11. Business Connectivity Services (BCS) Office Apps Client Runtime Offline Operations Cache Design Tools SharePoint Visual Studio 2010 Enterprise Search Development Platform Business Intelligence Enterprise content mgmt Collaboration social ECT Store Runtime Security Solution Packaging Out of the box UI SharePoint Designer 2010 Web 2.0 DB WCF Web Service .NET LOB
12. Overview of Data Technologies REST APIs Strongly-typed lists ClientOM Weakly-typed lists Client-side Data Platform Farm Site List Data External Lists ServerOM Server-side Weakly-typed lists LINQ New in 2010 Improved Strongly-typed lists
14. List Improvements Scalability and Performance Relationships Validation Lookup to multiple columns List Index Auto creation List Query Throttling XSLT views
16. SharePoint Tools Continuum Professional developer Business Analyst/Process Designer Designer/IW/Power User Import Create lists & libs Design Web Pages Web part hook-up Views & forms Declarative Workflows Custom Web Parts Code Workflows Event Receivers List Definitions Application Pages Design skeleton workflow processes View workflow visualizations Design data-backed business diagrams WSP Package Export
17. VS2010 improvements Source control support F5 debugging Visual Web Part Designer Server Explorer Package Designer Feature Designer Extendible
24. Natalie (Excelle),0273316688 Natalie (Excelle),0273316688 Dev PC Team Foundation Server Fix Bugs (repeat as necessary) Check In Development F5 Deploy Smoke Testing Nightly build -OR- Continuous Integration Staging Build Server Team Build Check in WSP Build SP2010 DLL’s Bugs Unit Testing Warm-blooded user testing WSP WSP Install and Activate [script] Automated testing
27. TFS 2010 64-bit Issue TFS 2010 RC (and RTM) has a bug Code Analysis isn’t installed Magic steps on SharePointDevWiki.com Thanks to: Duane Kanz, Ravs Kaur, Tom Marsh from Microsoft
Environment setupInstalling SharePointHardware requirementsTeam developmentbuilding implementationsTool supportsource control in VSeWSSprojectsDebugging trickyno out of the box build server abilityVersioned releasesFeaturesContent typesVersion 1.1 was always a scary thoughtSee also: http://wss.made4the.net/archive/2009/10/26/factors.aspxhttp://wss.made4the.net/archive/2009/07/06/how-asp-net-developers-can-leverage-sharepoint-webcast.aspx
SharePoint is now a part of the toolset out of the gates!
Windows 7/Vista SP1 supportSome manual “hacks” to get to install but is supported for developmentMust be 64-bitVirtual PC - no support…so VMWare Workstation, Sun VirtualBoxRequires min 4Gb RAM for FoundationFoundation requires 4Gb RAMServer 2010 requires 6Gb RAMWizards installs and configures most things- Seehttp://autospinstaller.codeplex.com/ for PowerShell automated install script (AWESOME!)See also:Installing SharePoint 2010 Beta 2http://sharepointdevwiki.com/display/spadmin2010/Install+SharePoint+2010+Public+Beta+on+Standalone+Windows+Server+2008Building a SharePoint 2010 Development Environmenthttp://sharepointdevwiki.com/display/sp2010/Building+a+SharePoint+2010+Development+machineMicrosoft SharePoint 2010 Demo VM Tips & Tricks (downloadable pre-built VM)http://sharepointdevwiki.com/pages/viewpage.action?pageId=23429169
LOB data becomes SharePoint List data- Leverage SharePoint Workspace 2010-Leverage Outlook 2010 integration with Contacts, Tasks, CalendarsRead/Write- Now reads and writes to Line of Business DataIncluded in SharePoint FoundationComes with Foundation Edition (so free!)Design Tools- Can use both VS2010 and SPD2010 (no code) to create BCS connections
REST ADO.NET Data ServicesClient OMSupport for:.netSilverLightJavaScriptCoding is very similar in each languageCan batch up commands and send to execute on serverLINQUse spmetal.exe to generate LINQ proxy class to use to query SharePoint Lists
Sandboxed SolutionsSite Collection Administrations can upload WSPsReduce reliance on Server AdminsMonitoring of performance of managed code in WSPsDeveloper Dashboard- Detailed performance metrics on page load to troubleshoot errorsFeature versioningcall imperative Feature Receivers and declarative Manifest XMLs per version rangeFeature upgrade query object modelAbility to check what version is installed/activated in sitesMapFile element – moving existing files that have been deployed by features
Workflow between different roles in Organisation.Can finally move workflows built by business into other tool sets easily!
Source Control supportOut of the box TFS 2010 support and team build supportDeployment StepsDeployment steps in Visual Studio 2010 allow for custom activities to occurE.g. cleaning up a list and inserting rows once a WSP has been deployed and feature activated
Demonstrate creating a Visual Web Part and then hitting F5 to deploy to environment and hit breakpoint.
Demonstrate how adding inefficient code can be flagged by Code Analysis
Backwards compatibilityVS2010 tooling does not support SharePoint 2007 development.WSPBuilder 2010 will support this..net 4.0 support Does not leverage .net 4.0, only .net 3.5.Unit Testing3rd party: xUnit.net, Pex/Moles, TypeMockhttp://wss.made4the.net/archive/2009/03/25/sharepoint-development-with-unit-testing-webcast.aspxhttp://www.sharepointdevwiki.com/pages/viewpage.action?pageId=7340352Web testingNot all of UI supported (form submissions, ribbon clicks)Accessibility- Not W3C compliant, WCAG 2.0 compliant
Devs“It works on my machine”“Can’t find the source control for this version”“Haven’t got the source control”“I’ve made changes in SharePoint Root”“I copied it to the GAC manually”Admins“We don’t know where to deploy it!”“What version is in Production?”
Automate building of WSPEnforce that all artefacts get deployed via WSP.No manual copying of files to SharePoint RootDisaster RecoveryCheck in policyBuild StampingBuild ServerSeparate serverDon’t install SharePoint on it!Get administrators to push to environments…or automate it (PowerShell 2.0 remoting)
We’ve discussed the operating system options, now let’s look at what needs to be installed. The developer’s PC will have Visual Studio and SharePoint 2010 installed. You will use unit testing, smoke testing, and leverage the capabilities of Visual Studio for F5 deployment. In a SharePoint 2007 environment, you can use a number of tools to enable this such as WSP Builder, VSeWSS 1.3, or STSDEV. In a 2010 environment, Visual Studio 2010 provides integrated development capabilities for SharePoint. (build)Once you have written and unit tested your code, you check it into a source code repository such as Visual Studio Team System’s Team Foundation Server. Team Foundation Server provides the enterprise source code repository and application lifecycle management capabilities to support an enterprise development team. (build)After the code is checked in, a nightly build or continuous integration server will create the WSP. Here, we see Visual Studio Team System’s Team Build installed on a server with only the SharePoint 2010 DLLs. The product team will be releasing guidance to show how to configure a build server with only the SharePoint 2010 DLLs deployed so that you do not need to install SharePoint on your build server. This allows you to perform unit testing and build operations in a clean environment. Further guidance will be coming from the SharePoint product team as we near RTM on how to achieve this. (build)Since the build server created the WSP, it should be checked into the source repository so that the installation can be repeated in the future and its version maintained. The next step is to install and activate the WSP. This can be achieved as part of the build process. (build)The staging environment is now ready for automated testing and warm-blooded user testing.
Demonstrate configuring builds in VS2010 and running one, demonstrating the build dropDemonstrate configuring build definition in VS2010 and running one, demonstrating the build drop.Demonstrate steps required to get builds working on Build Server.
Get:Microsoft.SharePoint.dllMicrosoft.SharePoint.Security.dllMicrosoft.SharePoint.WorkflowActions.dllFROM:C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions14ISAPIGet:Microsoft.VisualStudio.CodeAnlaysisMicrosoft.VisualStudio.CodeAnlaysis.SdkMicroosft.VisualStudio.SharePointMicrosoft.VisualStudio.SharePoint.Designers.ModelsMicrosoft.VisualStudio.SharePoint.Designers.Models.FeaturesMicrosoft.VisualStudio.SharePoint.Designers.Models.PackagesFrom:C:WindowsMicrosoft.NETassemblyGAC_MSILGet:Gacutil.exeGacutil.exe.configFrom:C:Program Files (x86)Microsoft SDKsWindowsv7.0ABinNETFX 4.0 ToolsGet:Microsoft.VisualStudio.SharePoint.targetsMicrosoft.VisualStudio.SharePoint.Tasks.dllFrom:C:Program Files (x86)MSBuildMicrosoftVisualStudiov10.0SharePointToolsrenamed PhoenixAnalysisEngine.dll to PhoenixAnalysisEngine.dll.bak in directory:C:Program Files (x86)Microsoft Visual Studio 10.0Team ToolsStatic Analysis ToolsFxCopEnginesrenamed DataflowRules.dll to DataflowRules.dll.bak in directory:C:Program Files (x86)Microsoft Visual Studio 10.0Team ToolsStatic Analysis ToolsFxCopRules