2 tools and techniques for productive and effective sharepoint development matt smith (mcts)zac...

40

Upload: lorena-nichols

Post on 17-Jan-2016

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 2 Tools and Techniques for Productive and Effective SharePoint Development Matt Smith (MCTS)Zac Smith (MCTS, MVP) DeveloperMOSS Consultant IntergenTrinkit
Page 2: 2 Tools and Techniques for Productive and Effective SharePoint Development Matt Smith (MCTS)Zac Smith (MCTS, MVP) DeveloperMOSS Consultant IntergenTrinkit

2

Tools and Techniques for Productive and Effective SharePoint Development

Matt Smith (MCTS) Zac Smith (MCTS, MVP)Developer MOSS ConsultantIntergen Trinkit

OFC303

Page 3: 2 Tools and Techniques for Productive and Effective SharePoint Development Matt Smith (MCTS)Zac Smith (MCTS, MVP) DeveloperMOSS Consultant IntergenTrinkit

3

The Smith & Smith Show(Not related!)

Zac SmithMOSS ConsultantTrinkit (Wellington)MCTS (WSS, MOSS)MVPMember of CKS teamwww.trinkit.co.nz/blog

Matt SmithMOSS DeveloperIntergen (Christchurch)MCTS (WSS, MOSS)Not an MVPChCh SharePoint U/Gblog.mattsmith.co.nz

Page 4: 2 Tools and Techniques for Productive and Effective SharePoint Development Matt Smith (MCTS)Zac Smith (MCTS, MVP) DeveloperMOSS Consultant IntergenTrinkit

4

Tools and Techniques for Productive and Effective SharePoint Development

OFC303

Page 5: 2 Tools and Techniques for Productive and Effective SharePoint Development Matt Smith (MCTS)Zac Smith (MCTS, MVP) DeveloperMOSS Consultant IntergenTrinkit

5

AgendaM & Z’s 8 step rehab for SharePoint developers

1. Optimize your development environment2. Get a productive build cycle3. Don’t be a tool, be a better developer through tools!4. Only code when you have to5. Use the right tool for the job6. Get friendly with PowerShell7. Make peace with SharePoint Designer8. Get help faster, and stay up to date

Page 6: 2 Tools and Techniques for Productive and Effective SharePoint Development Matt Smith (MCTS)Zac Smith (MCTS, MVP) DeveloperMOSS Consultant IntergenTrinkit

6

Assumptions

You have at least some SharePoint development experienceYou dream about CAML, 12 Hive, Features and Solutions“SharePoint” == SP == WSS or MOSS

Page 7: 2 Tools and Techniques for Productive and Effective SharePoint Development Matt Smith (MCTS)Zac Smith (MCTS, MVP) DeveloperMOSS Consultant IntergenTrinkit

7

Step #1Optimize your

development environment

Page 8: 2 Tools and Techniques for Productive and Effective SharePoint Development Matt Smith (MCTS)Zac Smith (MCTS, MVP) DeveloperMOSS Consultant IntergenTrinkit

8

1. Optimize your development environment

Tweak your Hardware

Should I virtualize?Minimal system specs:

3GB+ RAMMultiple core7200 RPM+ HD

Other optionsServer 2008 WorkstationVista and SharePoint?Dual Boot

Page 9: 2 Tools and Techniques for Productive and Effective SharePoint Development Matt Smith (MCTS)Zac Smith (MCTS, MVP) DeveloperMOSS Consultant IntergenTrinkit

9

1. Optimize your development environment

Tweak your Software

Tune your VMUse a separate (fast) physical diskUse SQL ExpressDEFRAG lots – host and guestHardware acceleration on fullTurn off unnecessary servicesLog throttling

Page 10: 2 Tools and Techniques for Productive and Effective SharePoint Development Matt Smith (MCTS)Zac Smith (MCTS, MVP) DeveloperMOSS Consultant IntergenTrinkit

10

IntelliSense for CAMLTake some shortcuts

Desktop/toolbar shortcutsBrowser shortcutsExplorer shortcutsVisual Studio shortcutsShell extensionsPath variables

1. Optimize your development environment

Tweak your Environment

Page 11: 2 Tools and Techniques for Productive and Effective SharePoint Development Matt Smith (MCTS)Zac Smith (MCTS, MVP) DeveloperMOSS Consultant IntergenTrinkit

11

Taking Shortcuts

demo

Page 12: 2 Tools and Techniques for Productive and Effective SharePoint Development Matt Smith (MCTS)Zac Smith (MCTS, MVP) DeveloperMOSS Consultant IntergenTrinkit

12

Step #2Get a productive build cycle

Page 13: 2 Tools and Techniques for Productive and Effective SharePoint Development Matt Smith (MCTS)Zac Smith (MCTS, MVP) DeveloperMOSS Consultant IntergenTrinkit

13

Biggest productivity killer is during deploymentGetting your code into SharePoint can be complex and slowVSeWSS: The “costly 7 steps”

2. Get a productive build cycle

Deployment Frustrations

Page 14: 2 Tools and Techniques for Productive and Effective SharePoint Development Matt Smith (MCTS)Zac Smith (MCTS, MVP) DeveloperMOSS Consultant IntergenTrinkit

14

Use custom Debug and Release build cyclesRelease creates a WSP and performs the 7 stepsDebug does the bare minimum to deploy to SharePoint (e.g. xcopy, gac install + reset app pool)Debug used 99% of the time for iterative build-test-fix cycle

How?Write custom post-build events (cmd files)Or, use a tool (http://www.codeplex.com/STSDEV)

2. Get a productive build cycle

Rapid, Iterative Deployment

Page 15: 2 Tools and Techniques for Productive and Effective SharePoint Development Matt Smith (MCTS)Zac Smith (MCTS, MVP) DeveloperMOSS Consultant IntergenTrinkit

15

2. Get a productive build cycle

Custom Post Build Events

Page 16: 2 Tools and Techniques for Productive and Effective SharePoint Development Matt Smith (MCTS)Zac Smith (MCTS, MVP) DeveloperMOSS Consultant IntergenTrinkit

16

Add Matt’s DebugApp trick for F5 debug and other coolness (without VSeWSS)!

2. Get a productive build cycle

Why STSDEV?

VSeWSS STSDEV WSPBuilderAndrew

Connell’s Tool

Custom Build

Scripts

Project template generation P P O O O

Productive build cycle alternatives O P O O P

Auto WSP generation ½ P P P OF5 Debug P O O O O

Page 17: 2 Tools and Techniques for Productive and Effective SharePoint Development Matt Smith (MCTS)Zac Smith (MCTS, MVP) DeveloperMOSS Consultant IntergenTrinkit

17

Productive Build Cycle

demo

Page 18: 2 Tools and Techniques for Productive and Effective SharePoint Development Matt Smith (MCTS)Zac Smith (MCTS, MVP) DeveloperMOSS Consultant IntergenTrinkit

18

Step #3Don’t be a tool, be a better developer through tools!

Page 19: 2 Tools and Techniques for Productive and Effective SharePoint Development Matt Smith (MCTS)Zac Smith (MCTS, MVP) DeveloperMOSS Consultant IntergenTrinkit

19

You owe it to yourself to spend a few hours building a Toolkit of time saversResources:

CodePlex search for “SharePoint” - goldmineTool indexes and portals (free and otherwise)

Warning:Tools don’t make you smarter, they help you work smarterStill good to understand what’s really going on

3. Don’t be a tool, be a better developer through tools!

Build Your Toolkit

Page 20: 2 Tools and Techniques for Productive and Effective SharePoint Development Matt Smith (MCTS)Zac Smith (MCTS, MVP) DeveloperMOSS Consultant IntergenTrinkit

20

3. Don’t be a tool, be a better developer through tools!

What’s in Our Toolkit (Partial)?Build and Packaging Tools

STSDEVAppPool Recycle UtilitySolution Installer

CAML/Search ToolsU2U Query BuilderYACQTSearch Service ToolCAML.NETLINQ to SharePoint

Visual Studio OptimisationsAC's CodeRush ToolsSPDevMod

Content/Config ReplicationContent Deploy WizardCMP Package ExplorerCross Site ConfiguratorSPS Tips Utility Pack

In-SharePoint ToolsSP FeaturesSmart ToolsSP Config StoreEnhanced CQWP

Testing ToolsTest Data PopulationImtech Test Content

Inspection ToolsSharePoint ManagerSharePoint InspectorSP Explorer Client (IE)

Governance/ManageabiltySP Governance ToolsReporting FrameworkMS Asset InventoryMS Monitoring KitSP Admin Toolkit

STSADM ToolsAC’s STSADMImtech STSADMGary LP’s STSADMSTSADM Win

Planning/Design ToolsMS Capacity PlanningVisio Shapes

Logging ToolsSP Logging SpySPTraceView

General ToolsSharePoint ToolboxSharePoint SUSHI

.NET EssentialsFiddlerReflectorSysinternals

Page 21: 2 Tools and Techniques for Productive and Effective SharePoint Development Matt Smith (MCTS)Zac Smith (MCTS, MVP) DeveloperMOSS Consultant IntergenTrinkit

21

Don't be a Tool

demo

Page 22: 2 Tools and Techniques for Productive and Effective SharePoint Development Matt Smith (MCTS)Zac Smith (MCTS, MVP) DeveloperMOSS Consultant IntergenTrinkit

22

Step #4Only code when you have to

Page 23: 2 Tools and Techniques for Productive and Effective SharePoint Development Matt Smith (MCTS)Zac Smith (MCTS, MVP) DeveloperMOSS Consultant IntergenTrinkit

23

Chances are that “it’s been done before”Familiarise yourself with:

CodePlex solutions: CKS, PKC, SLK, SCT etc…Third Party products (free/not) that extend or integrate with SharePointMicrosoft’s “Fantastic 40”SharePoint SDK SamplesThe full SharePoint feature set

4. Only code when you have to

Avoiding Another Wheel

Page 24: 2 Tools and Techniques for Productive and Effective SharePoint Development Matt Smith (MCTS)Zac Smith (MCTS, MVP) DeveloperMOSS Consultant IntergenTrinkit

24

Step #5Use the right tool for the job

Page 25: 2 Tools and Techniques for Productive and Effective SharePoint Development Matt Smith (MCTS)Zac Smith (MCTS, MVP) DeveloperMOSS Consultant IntergenTrinkit

25

Many ways to customise SharePointUse the most productive tool, then move into managed VS solutions as needed

e.g. build lists in the browser then extract list definitionse.g. develop/iterate master pages and page layouts in SharePoint Designer first

5. Use the right tool for the job

VS vs SP Designer vs The Browser

Page 26: 2 Tools and Techniques for Productive and Effective SharePoint Development Matt Smith (MCTS)Zac Smith (MCTS, MVP) DeveloperMOSS Consultant IntergenTrinkit

26

Generating a Web Part GUI in pure code behind is not a productive experiencethis.Controls.Add(new Label(“Sigh!”));

Use the power of the graphical designer to build re-usable User Control componentsLoad these into web parts (ala SmartPart)Page.LoadControl(“/Path/MyControl.ascx”);

Use the DebugApp to speed development

5. Use the right tool for the job

User Control Pattern for Web Parts

Page 27: 2 Tools and Techniques for Productive and Effective SharePoint Development Matt Smith (MCTS)Zac Smith (MCTS, MVP) DeveloperMOSS Consultant IntergenTrinkit

27

User Controls in Web Parts

demo

Page 29: 2 Tools and Techniques for Productive and Effective SharePoint Development Matt Smith (MCTS)Zac Smith (MCTS, MVP) DeveloperMOSS Consultant IntergenTrinkit

29

6. Get friendly with PowerShell

What is PowerShell?

Command prompt where the values piped between commands are .NET objectsLight weight text scriptsAccess and manipulate .NET objects easily without writing full “programs”Extensible (cmdlets)

Page 30: 2 Tools and Techniques for Productive and Effective SharePoint Development Matt Smith (MCTS)Zac Smith (MCTS, MVP) DeveloperMOSS Consultant IntergenTrinkit

30

6. Get friendly with PowerShell

Using PowerShell with SharePoint

Use SharePoint APIs + Web Services rapidlyQuick proof-of-conceptsInspection and extraction (e.g. SchemaXML)

Write scripts for common taskse.g. replication across your SP farme.g. bulk document uploadinge.g. backup/restore scripts

Use as part of a repeatable build process

Page 31: 2 Tools and Techniques for Productive and Effective SharePoint Development Matt Smith (MCTS)Zac Smith (MCTS, MVP) DeveloperMOSS Consultant IntergenTrinkit

31

PowerShell + SharePoint

demo

Page 32: 2 Tools and Techniques for Productive and Effective SharePoint Development Matt Smith (MCTS)Zac Smith (MCTS, MVP) DeveloperMOSS Consultant IntergenTrinkit

32

Step #7Make peace with SharePoint

Designer… it’s for developers, too!

++

Page 33: 2 Tools and Techniques for Productive and Effective SharePoint Development Matt Smith (MCTS)Zac Smith (MCTS, MVP) DeveloperMOSS Consultant IntergenTrinkit

33

7. Make peace with SharePoint Designer

Q: Anything A: Data View Web Part

“The most powerful Web Part in SharePoint”Can avoid coding custom web parts in many (not all!) scenarios -> speed developmentSome features:

Flexible data sourcesLinked data sourcesFlexible XSLT renderingConnectableTwo-way data binding

Page 34: 2 Tools and Techniques for Productive and Effective SharePoint Development Matt Smith (MCTS)Zac Smith (MCTS, MVP) DeveloperMOSS Consultant IntergenTrinkit

34

Data View Web Part

demo

Page 35: 2 Tools and Techniques for Productive and Effective SharePoint Development Matt Smith (MCTS)Zac Smith (MCTS, MVP) DeveloperMOSS Consultant IntergenTrinkit

35

Step #8Get help faster, and stay up to date

Page 36: 2 Tools and Techniques for Productive and Effective SharePoint Development Matt Smith (MCTS)Zac Smith (MCTS, MVP) DeveloperMOSS Consultant IntergenTrinkit

36

8. Get help faster, and stay up to date

Build A Library of Resources

Essential ResourcesMicrosoft: MSDN WSS Portal, MSDN MOSS Portal, TechNet WSS Portal, TechNet MOSS Portal, MSDN WSS SDK, MSDN MOSS SDK, GearUp, Office Online, Developer Intro PortalCommunity: SharePointPedia, SP Community PortalOther Portals: wssdemo.com, WSS FAQ, SPS FAQForums: SharePointU, MSDN, TechNet

Stay Up to DateAggregate Blogs: MVPs, MS Individuals, MS Teams

Page 37: 2 Tools and Techniques for Productive and Effective SharePoint Development Matt Smith (MCTS)Zac Smith (MCTS, MVP) DeveloperMOSS Consultant IntergenTrinkit

37

Resources

www.microsoft.com/teched Tech·Talks Tech·Ed BloggersLive Simulcasts Virtual Labs

http://microsoft.com/technet

Evaluation licenses, pre-released products, and MORE!

http://microsoft.com/msdn

Developer’s Kit, Licenses, and MORE!

Page 38: 2 Tools and Techniques for Productive and Effective SharePoint Development Matt Smith (MCTS)Zac Smith (MCTS, MVP) DeveloperMOSS Consultant IntergenTrinkit

38

Please complete anevaluation

Page 39: 2 Tools and Techniques for Productive and Effective SharePoint Development Matt Smith (MCTS)Zac Smith (MCTS, MVP) DeveloperMOSS Consultant IntergenTrinkit

39

Q & AZac Smith

www.trinkit.co.nz/blogMatt Smith

blog.mattsmith.co.nz

Page 40: 2 Tools and Techniques for Productive and Effective SharePoint Development Matt Smith (MCTS)Zac Smith (MCTS, MVP) DeveloperMOSS Consultant IntergenTrinkit

40

© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED

OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.