Presented by: Kirk Evans, Architect Evangelist, Microsoft, blogs.msdn.com/kaevans Chris Keyser, Best Practices Team, Microsoft, blogs.msdn.com/chriskeyser More of a focus of best practices they learned in 2007, and how it will be applicable to 2010. Packaging Basically use WSP's for all deployments. It's actually a CAB file. Has everything needed for the deployment, and allows you to add and delete it from the Config DB. This then allows the administrator to deploy and retract on all web front ends. Also when a new front end is added it automatically get's deployed. Also allows the deployment to be done separately and scheduled later in the evening. Gives the administrator a warning if something is getting installed to the GAC. Development Environment You should always develop on a stand-alone server, preferably a single developer per server. Use a build and CI server. You don't want to work in a shared environment due to IIS Resets. Debugging is also an issue, if someone hits a breakpoint, then that will stop everyone else on the machine. Metal install Virtualization Boot to VHD Application Lifecycle Management WSP doesn't get checked into TFS. There is a build definition for the project, and under the process tab there will be a section called 3. Advanced there's an option called /p:IsPackaging=true. This will cause it to generate the WSP. The nightly build is what creates the WSP and puts it in a drop folder with date labeled folders. More information http://msdn.microsoft.com/dd552992.aspx this is the SharePoint application lifecycle management resource center Testing Unit Testing Do More of it. They release code every two weeks, and then gather feedback. Unit Testing can be done in any development process, it's not unique to Agile or Extreme development. Unit Testing – The Code is doing what the developer intended it to do. Should run against a substitute for the real system. Acceptance Test – The Code meets the business users requirements. Effeciencies come later in the cycle, there is a cost up front, but during integration both at the end and during development you have fewer problems. Integration Testing – Operates against an actual real system. Patterns help isolate code to improve testability. By isolating the code you can test it successfully without a lot of extra effort. MVC is a good example of a pattern that facilitates testing. Need to look at the presentation video, at this point he demonstrates how to do a unit test with TypeMock. It's a very good example, he takes code that's monolithic and shows how to refactor it to the MVC pattern. He used XUnit to perform write the tests. Nice new refactoring tools in VS 2010. Load Testing What: Allows you to identify performance bottlenecks and memory leaks. How: Use Visual Studio and Team System Web Test. Watch the video for the next part. Defensive Coding Avoid long debugging sessions by coding defensively. Examples: Important point, if you do dispose something that does not need to be disposed, it can cause stability issues with the site. Use SPDisposeCheck to be sure. The code analyzer in Visual Studio is FXCop. SPDisposeCheck will catch things that the code analyzer will not catch. Oooh, there's an add-in for SPDisposeCheck!!!
SharePoint Development Best Practices
Dev Machine
Build Server
Staging