Chris O'Brien
skip to main | skip to sidebar
Chris O'Brien
Fun and games with the nuts and bolts of SharePoint.
Wednesday, 16 November 2011
Slide deck from Customizing the SharePoint ribbon talk (SPC11 and SPSUK)
Id previously published the code samples, but so far hadnt published the slide deck for the Deep Dive on SharePoint Ribbon Development & Extensibility talk I gave recently. This is a session I initially gave with Andrew Connell at the SharePoint Conference 2011 (Anaheim), and also as an amended version at SharePoint Saturday UK a few days ago (12th November 2011). Certainly part of the credit here needs to go to my co-speaker, this is not just my work.
What Im publishing here is a slightly amended version of the deck I used at SharePoint Saturday UK. It has all of the goodness with a couple of simplifications, but also many screenshots which try to convey what was in the demos.
I should mention we aimed for this deck and set of code samples to be THE definitive starter pack for SharePoint ribbon development right now - hopefully it helps some folks. You can view this version of the slide deck at:
http://bit.ly/tql2Bx
..and here are some screenshots which illustrate the contents:
Posted by Chris O'Brien at 00:43 0 comments Links to this post
Tuesday, 11 October 2011
My ribbon samples from SPC11 (session with AC) + revisions to my ribbon articles
I had an awesome time at the SharePoint Conference 2011 C all the clichs about catching up with friends and meeting new ones were true, and it was a privilege to be on stage speaking to people. Both my sessions were huge fun! Here I want to focus on the level 400 session Andrew Connell and I co-presented, Deep Dive on SharePoint Ribbon Development & Extensibility C between us we had some great samples and information, and were both pleased with how the session turned out. I should mention here that as part of this work, I revisited my original ribbon articles and fixed up some samples and added additional info. These articles were written way back in January 2010 during SharePoint 2010 beta, and Microsoft changed a couple of things after these were published. So if you ever used these articles and hit an issue, it is now resolved C apologies. Anyway, here are some things AC and I covered:
Ribbon architecture/how it works
Fundamental ribbon tasks C adding a tab/group/button
Contextual ribbon tabs (e.g. tied to a web part)
How to respond to ribbon commands (including analysis of CommandHandler vs. page components)
Working with dialogs
Sandbox considerations
Cool ribbon controls C SplitButton, ToggleButton, Spinner, FlyoutAnchor etc.
ACs tips and tricks
COBs tips and tricks
AC has already published his samples, and for convenience here are both links:
ACs ribbon samples (contextual tabs, commands explained, async processing, dialogs)
COBs ribbon samples (adding a tab/group/button, cool controls [SplitButton, ToggleButton, Spinner], static/dynamic FlyoutAnchor samples)
Im biased no doubt, but I personally think that together they make an awesome starter pack for SharePoint ribbon development. In case youre wondering what the hell a FlyoutAnchor is by the way, its basically a dropdown on steroids, with grouping etc. C heres the example I used:
The talk has given me a revived enthusiasm for the ribbon, and Ill post some more articles about things Ive learnt since my original articles soon. To be quite honest, I also learnt a number of things from AC during our prep C our Lync calls before the conference had quite a lot of No way, I didnt know that! from my end, and so he may well write more in the future too.
Oh by the way - if you were at the session, you will have seen Andrews Help ribbon button which (unexpectedly) popped a dialog with a somewhat comical photo of me with a beer in hand. What a nice surprise, and how kind to choose such a flattering photo! Ha! Anyway if you see him, be sure to remind him Ive got a long memory, OK? :)
That download link again was:
COBs ribbon samples
Posted by Chris O'Brien at 00:54 0 comments Links to this post
Friday, 23 September 2011
SP2010 Continuous IntegrationCpt 4: Assembly versioning
The 4th article in our CI with SharePoint 2010 and TFS series is now live on the official SharePoint Developer blog. This post is a quick overview, but the actual article can be found here - Configuring Versioning of Assemblies in SharePoint Automated Build. In this episode we cover how to introduce assembly versioning to your automated build process. The benefits of versioning code are widely documented, but in my simple mind I think of it like this C if you dont have versioned assemblies, how can you easily tell which version of code is running in a given environment/customer/product? The answer is you cant C at least, not without resorting to Reflector or some other decompilation tool and literally scanning code. And thats really not efficient nor effective C far better to put something in place once, and forever be able to determine the version by looking at the file in Windows Explorer. Id argue that most pure .Net development shops tend to have adopted assembly versioning a long time ago, but again its one of those things which is somewhat behind in the SharePoint world due to the other complexities which come with it.
Additionally, versioning in SharePoint can be a very bad idea if not done appropriately (no doubt a few people tried and got bitten by this). Version numbers are stored in many places inside SharePoint, and using typical versioning approaches will result in a broken application. Instead, I always recommend that a secondary version number such as AssemblyFileVersion is incremented with SharePoint.
So if were agreed that its worthwhile, how do we adopt it? It would be nice if TFS had some simple switch, but thats not the case up to and including TFS 2010 (personally Ive no idea about future versions). Implementing versioning requires some customization of the build process (which we introduced in the last article, Creating your first TFS Build Process for SharePoint projects), and essentially we need to drop in a custom workflow activity which takes care of the versioning step. Ive written such an activity and published it on Codeplex at http://tfssimpleversioning.codeplex.com (others exist too). The article explains how to implement the sample to perform versioning in the right way.
That link again is Configuring Versioning of Assemblies in SharePoint Automated Build.
The next article will be Deploying WSPs as part of an automated build.
Posted by Chris O'Brien at 00:40 0 comments Links to this post
Thursday, 15 September 2011
My SharePoint Conference 2011 talksCribbon development and CI
Unless youve been under a rock youll know that this years big event in the SharePoint world is the official SharePoint Conference 2011, held in Anaheim near Los Angeles. Were now just over 2 weeks to go, and since many are starting to build their conference schedule I thought Id mention my talks. Im presenting 2 sessions and, somewhat weirdly, both of them are co-presents with other speakers. I was looking forward to speaking already, but this aspect makes me even more excited C both my co-speakers rock and I think these are gonna be fun sessions!
Both talks are on the Wednesday C one in the morning, one in the afternoon:
Application Lifecycle Management : Automated builds and testing for SharePoint projects C SPC319, Weds 10:30am
With Mike Morton, Visual Studio Senior Program Manager (Microsoft)
Whether small or large, experienced or novice, any SharePoint development team can improve their process! This demo-heavy session will show you how Visual Studio Ultimate and Team Foundation Server can be used to automatically build your SharePoint solutions, deploy the resulting WSPs to a remote SharePoint environment, and leverage automated Visual Studio UI testing (which can have a lower barrier to entry than unit testing) to help you find issues faster. Come hear some great, real world information that will help you create higher quality code; as a bonus you will get to admire Chris good looks and enjoy Mikes crazy humour!
Deep Dive on SharePoint Ribbon Development & Extensibility C SPC402, Weds 5pm
With Andrew Connell (MVP, Critical Path Training)
Take advantage of the Ribbon in your SharePoint applications for a tightly integrated and great user experience! Developers can customize and extend the ribbon for custom solutions. In this session we'll examine the different components of the ribbon as well as how to create page components, asynchronous callbacks and prompt the user with intuitive dialogs. Best of all you can do all this from the sandbox and avoid getting admins involved in deploying farm solutions!
Hopefully see you there!
Posted by Chris O'Brien at 21:50 0 comments Links to this post
Labels: speaking
Friday, 26 August 2011
SP2010 Continuous Integration - pt 3: Creating your first TFS Build Process for SharePoint projects
The 3rd article on Continuous Integration for SharePoint 2010 is now live on the official SharePoint Developer blog C Creating your first TFS Build Process for SharePoint projects. As before I will post an overview here, but the content itself is on the MSDN blog. This one is another lengthy article (by me this time), and should be good information for those looking to get automated builds running or those just curious.
The article picks up where the last one (Configuring a TFS Environment with Test Controller, Test Agent, and Build Server) left off - you have a TFS build server running (and can build a plain .Net app), but so far it is not able to build SharePoint projects since it does not have the assemblies installed. This article answers questions such as:
What setup do I need to do to build SharePoint projects?
How do I get my WSPs to build automatically? (e.g. on each check-in/as part of a nightly build etc.)
How do I create my first build definition?
The build process is now a .NET 4 workflow instead of MSBuild C how do I make a change to the process?
How should I deal with dependencies between projects?
That link again is Creating your first TFS Build Process for SharePoint projects.
The next article will be Implementing assembly versioning for SharePoint projects. This should be published on September 8th.
Posted by Chris O'Brien at 10:08 0 comments Links to this post
Labels: Continuous Integration
Thursday, 18 August 2011
SP2010 Continuous Integration C Installing TFS2010 (inc. Build and Test agents)
Its been a while since I posted here, but my collaborators and I are actually well into writing our article series on Continuous Integration for SharePoint 2010. As Mike Morton posted a few weeks back on the official SharePoint Developer blog, the rest of the series will now be published there. When each article is published Ill post a quick summary here and update links in my kick-off post.
Anyway, the main news is that the 2nd article in the series has been live there for few days C C see Configuring a TFS Environment with Test Controller, Test Agent, and Build Server (Kirk Evans).
Kirk (a Microsoft Principal PFE) did a great job. MSDN is referenced throughout (in case you need more detail), but the article is easy to digest and makes the ideal starting point for initial installation and configuration (we think). The article shows you how to:
Create appropriate service accounts for TFS
Create a distributed TFS 2010 environment, where the build server(s) are separate from other services such as source control (recommended topology)
N.B. If you already have TFS 2010 for source control and just want to get started with automated builds, you can skip to the Install the Build Service on the TFSBuild Machine section and pick up there
Install and configure the TFS build service (build controller/build agent)
Install and configure Visual Studio 2010 test infrastructure (test controller/test agent)
Configure optional TFS functionality such as SQL Reporting Services and SharePoint site/dashboard for tracking velocity and issues
Verify configuration by creating a test build
That link again is Configuring a TFS Environment with Test Controller, Test Agent, and Build Server (Kirk Evans).
The next article will be Creating your first TFS Build Process for SharePoint projects. This should be published on August 25th, and discusses creating a build definition to build WSP files (and more).
Posted by Chris O'Brien at 20:56 3 comments Links to this post
Labels: Continuous Integration
Wednesday, 15 June 2011
SP2010 Continuous IntegrationCpt 1: Benefits
On the back of my talk at the SharePoint Best Practices Conference, this is the first article in a series on implementing automated builds (aka Continuous Integration) in SharePoint development projects C specifically using Team Foundation Server 2010. In actual fact, the rest of the series may appear on a Microsoft blog (or a whitepaper) rather than this one, but some Microsoft folks and I are still working through the detail on that and I wanted to at least discuss the contents and get the thing kicked off here. With this particular topic, I could imagine that some folks will dismiss it as being irrelevant to them (and not read anything in this series), when in fact there may be pieces which would work for them and can be implemented fairly easily. Lets be clear though C Continuous Integration (CI) is probably best suited to projects with the following characteristics:
Development-oriented C perhaps with more than, say, 3 Visual Studio projects
Multiple developers
Fairly long-running (e.g. > 2-3 months; to give the team a chance to implement CI alongside the actual deliverables)
The original plan for this blog series/whitepaper (which may change as myself, Kirk Evans and Mike Morton evolve it) looks something like this:
CI benefits - why do it? (this post)
TFS 2010 Build installation/config
Customizing the build workflow for SharePoint builds
Implementing assembly versioning
Using PowerShell to deploy WSPs from build output
Running coded UI tests as part of a build
Running other tests as part of a build
Other tools in the build C code profiling, code analysis, IntelliTrace, SPDisposeCheck etc.
Analyzing the build report
Conclusion
Benefits of Continuous Integration
Although CI has become a fairly standard approach in the plain .Net world, its fair to say that SharePoint brings some additional considerations (as usual) and things are slightly more involved. Consider that in .Net the output is often either an executable or a website which can often be deployed with XCOPY. Yet SharePoint has Solutions and Features, all the logical constructs such as web applications and site collections, and is often heavily state-based (e.g. activate a Feature, then create a site, then create a list and so on). So CI is more involved in many cases, but all the feedback I hear tells me more and more people want to adopt it, and rightly so. Here are some of the benefits as I see them:
Consistent builds
E.g. no human error leading to debug (not release) build assemblies
Automatically versioned assemblies
Ability to track code versions in production back to release labels in source control
Less time spent by developers keeping their environments up-to-date (this alone can be huge)
Team cohesion through build notifications
Upon each build (e.g. after every check-in), everyone on the team sees a pop-up in the system tray letting them know if the build is currently passing/failing
Automated testing
Once WSPs have been deployed, run a series of tests (e.g. unit tests/UI tests/load tests) to check what would be deployed to the customer
Also run checks on the code (e.g. code analysis, SPDisposeCheck) to keep on top of any code smells from that day
What it looks like
Different styles of CI
Once you have the capability to use TFS Build (remember well talk about topologies/install next post), one of the first steps is to establish what youre trying to achieve with CI. In my mind, there are two broad styles of Continuous Integration:
Style:
Best suited for:
Rebuild everything
Pre-live
Build current sprint against production state
Post-live (or frequent delivery)
The former is typically simpler than the latter, so conveniently thats the style Im focusing on this series (though Im really discussing the core mechanics which apply to both styles). That said, lets discuss the more complex building against the current state type for a moment. This model is probably the best choice if your solution is in production but still evolving C after all, would you really want to focus all your effort on testing the build everything from scratch process when you might only do that in a disaster recovery situation? Probably not. In this model clearly the idea of state is very important and, unsurprisingly, the best way of dealing with this is to use virtual machine snapshots. The idea is that step 1 of the build process rolls the target machine back to a snapshot which is a reflection of the current state of production (same code versions, solutions/features etc.) - from there, your build process deploys the resulting WSPs to this target and you get to see whether your current work will deploy to/run in production successfully.
Microsoft recognize this as an important scenario and the Lab Management capability in TFS Build is designed to help. It provides special activities for the build workflow to rollback/take snapshots C these can be dropped into the workflow (N.B. well discuss the build workflow in article 3) and theres also a wizard UI to help you select available snapshots etc. Now, there is a catch C obviously theres a wide range of virtualization platforms out there these days, and Microsoft only go the extra mile to make it easy with their own; specifically this requires Hyper-V with System Center Virtual Machine Manager. The good news is that it shouldnt be too difficult to achieve the same result with another platform C less slick perhaps, but use of an InvokeProcess activity which calls out to the command-line (e.g. something like vmrum revertToSnapshot C:\VMs\MyVM.vmx MySnapshotName for VMWare) should do the trick just fine.
Configuring the build (quick overview)
To get started, you create a new build definition in Visual Studio Team Explorer, and configure which Visual Studio projects/solutions should be built. Many other settings live here too, such as whether code analysis should be performed during the build:
From there, we need to select when builds happen C manually, on every check-in, every night and so on:
In TFS 2010 Build, the actual steps which happen during a build (e.g. retrieving files from source control, compiling, deploying, testing etc.) are configured as a .Net 4.0 workflow. For SharePoint builds, we need to make some modifications to the sample builds which come with TFS C this can take some figuring out but Ill post mine as a potential starting point in article 3 Customizing the build workflow for SharePoint builds:
By this point, each build will compile assemblies from the latest code, generate WSP packages and copy them to a remote SharePoint box (assuming youre not using an all-in-one topology). We now need something to actually deploy/upgrade the WSPs in SharePoint, and perhaps do some other steps such as creating a test site C the build workflow will hand-off to a PowerShell script to do this. Ill supply my PowerShell script later in the series and discuss the mechanisms of passing data from the workflow to the script, and collecting the success/failure return value C for now its just important to realize that a big part of automated builds is just standard PowerShell which you might already be using, and that every implementation will vary somewhat here depending on what youre building for your client.
So by now, we would have a working build C WSPs are being built and deployed automatically, and any test site is being recreated to check the validity of the build. Now we can think about some automated tests to help us verify this. After all, we might be able to get a WSP deployed but is the actual functionality working or would a user see an error somewhere? Is there any way we can establish this without a tester manually checking each time a build completes?
Running automated tests (e.g. UI tests) as part of build
Now, its not that Im against unit testing or anything.heck we even have some in our current project! But it definitely feels like this area is still challenging enough with SharePoint that most projects dont do it, e.g. due to the reliance on mocking frameworks. Im thinking more and more that the UI testing capabilities in Visual Studio 2010 offer a great alternative C coded UI tests can simulate a user on the website by using the controls on the page (e.g. navigation, buttons, a form, whatever) in exactly the same way. Sure, its not a unit test, and ideally youd have both, but it does seem to have a much lower barrier to entry that unit testing C and with a few tests you could get good real-life test coverage pretty quickly. Heres what it looks like C first the test gets recorded in the browser (a special widget appears):
After pressing some buttons to imitate a specific user action (something I want to test), I then add an assertion to check that something is present on the page. In this case, Ive pressed a ribbon button which has done something, and the assertion is testing that the green status bar is visible with a specific message, meaning the action was successful. If the action wasnt successful, the green status message would not be present and the test would fail. Whats interesting about this is whats behind the ribbon button C its some functionality developed for our current client around the social features of SharePoint, and lot is happening there. The button calls into some jQuery which calls a HTTP handler, which invokes a custom service application which talks to the data access layer, which then writes a record to a custom SQL database. You see what I mean about integration tests rather than unit tests?
But it does mean I can test a lot of code with minimal effort. There are some things I need to guard against C like the fact that the UI could return a positive when something underneath failed, but one thing which can mitigate this (in addition to simply recording many tests) is the fact that the tests generate .Net code, meaning I can supplement it with other checks if required. The cool part, of course, is that its very easy to integrate these tests into the automated build C if tests like these are automatically running every night/every few hours, you get to find regression bugs very quickly.
Getting the payback - finding the cause of a failed build
So if we had automated builds in place, what happens when a bug is checked in? How do we find out? Well that might depend upon the specifics of the bug and the tests you have in place, but lets work through an example. Lets say theres an issue in the DAL in the example used above Cwe could imagine that theres a mismatch of stored procedure parameters for example, but for simplicity Im just going to add a dummy exception to the method which is behind the ribbon button:
throw new ApplicationException(Dev did something silly);
The developer checks in because everything builds/packages fine, and yknow, because he/she has been testing throughout and that little last change couldnt possibly have broke anything! So the build runs - if youre in the office at this time (you might not be if its configured to run nightly), then team members have the option of seeing a system tray notification pop-up whenever a build succeeds or fails:
The main entry point is the build report C this gives us a view onto any build warnings/errors and a summary of test results:
There is also a more detailed log, and if UI tests are included then youll see the result of these C note the Error Message section below shows that one of our asserts failed in a test:
Thats useful, but we kinda need more detail to understand why we have a bug. Depending on how the build is configured, we should see links to some files at the bottom of the build report.
Lets walk through these files in turn:
A .png file C this is a screenshot of what the UI looked like at the time of the failing test. This is incredibly useful, and we can see that the UI did not show the green success bar C so we get an understanding of how the bug manifested itself in the UI:
An XML file C this is data collected from the Windows event log at the time of the failing test. In many cases, this is how youll find the actual bug C we can clearly see the class/method and stack trace of where the problem occurred:
Note that this does require that in your code youre reporting exceptions to the event log C were using the SharePoint Patterns & Practices libraries to do this. You might extrapolate that what the SharePoint world probably needs is a ULS data collector C Ive mentioned this to Microsoft, and folks seemed to agree that could be a good idea. In any case, we now have a screenshot of the failed test and event log data which should locate our bug, woohoo! But it doesnt stop there C other files captured include
An iTrace file C this is Visual Studio 2010s incredible IntelliTrace feature. IntelliTrace is a historical debugger, which allows a developer to step into a debugging session even if he/she wasnt there at the start of it. In this context, its used from a test result C the image below doesnt quite show it, but I can select an exception which occurred during a UI test (or any other kind of test for that matter) and then press a Start debugging button. This will take me into a live debugging session where all variables will have the values they did during the test, and I can step through line-by-line. And this is despite the fact that the test ran at 3am from an overnight build C so no worries that a dev will not be able to reproduce an issue the build encountered:
A .vsp file C this is the results of a code profiling session, where the code which executed during the tests was evaluated for performance. The first image below shows me hot paths in the codebase i.e. where we spent a lot of time, and therefore could consider optimizing:
This tells me that our WeatherWebPart class and some code in our ActivityFeedSubscription namespace might benefit from some attention. Drilling down, we can see some graphical representations of individual methods:
Going further still C possible things to include in the build
The last area, code profiling, wasnt so much about identifying the bug as perhaps a daily check on any new alarm bells in our codebase. Expanding that theme further, consider the following as things we could fairly easily include in an automated build:
Unit tests (of course)
SPDisposeCheck
Code analysis (FxCop)
Documentation builds
Creating TFS work items from build/test failures
Etc.
Really, the skys the limit given that you can shell out to PowerShell or the command-line during the build.
Summary
Although fairly common in the .Net world, SharePoint projects which do automated builds are fairly rare - arguably due to other complexities that come with developing with SharePoint. Team Foundation Server 2010 makes build automation easier to achieve than previously with the Microsoft stack, and has superb integration with related Visual Studio capabilities such as testing. Implementing these techniques can make a big difference on SharePoint development projects. Although this post presents an overview of the end result, a couple of Microsoft folks and I are working on detailed content (roughly following the article series listed at the beginning) C when I know the final home for this content (blog/whitepaper), Ill keep you updated and will amend this post with appropriate links.
Posted by Chris O'Brien at 00:28 8 comments Links to this post
Thursday, 26 May 2011
My jQuery, AJAX and SharePoint 2010 slide deck (SUGUK)
I attended a great SharePoint User Group UK meeting last night C compared to the London event it was notable how many people had travelled significant distances to be there, great dedication! The first session was me (doing the first dev-focused session at this event) and the second was a panel Q & A discussion with some excellent conversations. The topic for my talk was SharePoint, jQuery and AJAX - a beginner's survival guide, and although Ive given this talk before I want to publish the deck and code samples again as I made some updates since the last time. In fact, its worth calling out one of these in particular here I think:
If using jQuery with SharePoint 2010, ALWAYS put jQuery into no conflict mode via jQuery.noConflict(). This is necessary because SharePoints internal JavaScript uses the $ symbol as a variable name in a couple of places, and this causes clashes since its the alias used by jQuery
The deck has information on my 3 core techniques for jQuery/AJAX apps with SharePoint, and also tips and tricks like how to get Intellisense for jQuery and the SP2010 Client Object Model, tools for debugging AJAX apps etc. The code samples cover a fairly wide range of things:
jQuery
Showing/hiding elements
Setting the HTML of an element
Cascading dropdowns
AJAX requests
Client Object Model
Fetching simple data
Implementing a type-ahead filtering sample against the documents in a document library
Creating data e.g. a new list item
Techniques for reducing the data going over the wire (by 95% in my example!)
jQuery + HTTP handlers
Why/how
Returning simple data
Returning complex data as JSON
You can download my slide deck and code samples from:
http://dl.dropbox.com/u/11342240/ChrisOBrien_jQueryAJAXSP2010_SamplesAndDeck.zip
Big thanks to Mark Stokes for hosting the event and inviting me to speak.
Posted by Chris O'Brien at 00:29 6 comments Links to this post
Tuesday, 10 May 2011
Speaking at SUGUK (Manchester) on jQuery, AJAX and SP2010C24th May
In a couple of weeks (24th May) I head north to speak at the North West branch of the UK SharePoint user group C Im looking forward to it for several reasons, not least because I come from Manchester originally. As usual Im talking about SharePoint development matters, but hopefully the evening will have fairly broad SharePoint appeal as the 2nd session will be an open Q&A session with myself, Brett Lonsdale, Mark Stokes, Sam Dolan and Alex Pearce on the panel. This means well be strong on topics such as development, architecture, BCS, tools, branding/design, governance, end-user adoption, education and Office 365 etc., but there should also be enough combined expertise to answer an even wider range of questions. It should be an interesting discussion.
My talk is aimed at devs, but Im also hoping its interesting in user experience terms to a wider audience. Heres the summary:
SharePoint, jQuery and AJAX - a beginner's survival guide
It takes a different approach to build SharePoint apps with a slick AJAX experience - getting rid of those nasty postbacks involves declining some help from .Net and learning new techniques. Whilst the answers often lie with the Client Object Model and jQuery, both are hefty topics so the barrier can be intimidating. This talk aims to boil things down to "3 core techniques to survive by", with step by step demos to show the development process. Tips and tricks such as enabling jQuery intellisense, debugging JavaScript and using JSON will be covered. To pull the concepts together, the session will round off with a demo migration of an existing mini-application from postbacks to AJAX. Building custom SharePoint experiences that users love is simpler than you think!
Ive given this talk before (at SharePoint Saturday UK), but its taken on another dimension for me since then as Ive spent the last 6 months using these techniques day in, day out for my current project. Im extremely glad I spent time getting to grips with jQuery and AJAX, my career would probably be in the toilet otherwise. Hopefully my talk will be useful information to novices and experienced devs alike.
The event is free and on Tuesday 24th May, at the Palace Hotel Manchester. Sign up here - http://suguk.org/forums/26548/ShowThread.aspx
Posted by Chris O'Brien at 23:24 2 comments Links to this post
Wednesday, 20 April 2011
Automated SharePoint builds/UI testingCslide deck
It took a few days as I wanted to add screenshots from the demos, but Ive now published my deck from my talk at the SharePoint Best Practices Conference. I had a great time presenting, and although the prep for this talk was harder than others Ive done I was happy with how it turned out. I think this subject is starting to get a lot more attention, and you know theres interest in the topic when you end up giving a repeat demo in the speaker room to fellow speakers who couldnt attend the talk. The talk is oriented around Team Foundation Server 2010 for the build platform. Heres a summary of one of the demos:
Developer checks in (a breaking change to the data access layer in my demo) and an automated build is triggered
Assemblies and WSPs are built (in release mode) and deployed to remote SharePoint server
Once deployment is complete, the app pool is warmed up and we start hitting the site with automated UI tests (a feature of Visual Studio 2010 Premium and above)
If a test fails, the build is a failure and all developers are notified (via the TFS build notification tool)
Build manager/developer checks build report and sees:
Screenshot of failing UI test
Critical entries from the event log at the time
>> Build manager/developer now understands why latest code change broke the build
Added value bonus demo
Same process but with the following data also captured:
Code profiling (see which bits of code should be optimized)
IntelliTrace (start a debugging session at the exception hit during the test)
Video recording of UI tests (not just screenshot)
The idea of course, is that if this information is being surfaced every 24 hours (or perhaps even more frequently from builds throughout the day), then its easy to quickly identify problems as code is written. This can lead to a greater chance of success since bugs and other issues are driven out sooner, reducing the cost to fix.
Download/view the slide deck
http://slidesha.re/gSQnyD
The future
I got a lot of positive feedback on the talk and it convinced me to do a blog series on this subject. Whilst I know some folks will instantly dismiss this as not being relevant to them, my take is that any SharePoint 2010 project which has some custom code (say above 3 Visual Studio projects) and has Team Foundation Server should at least do the first level of automating the build (building assemblies and WSPs) C the build itself takes minutes to configure (though a build server is a prerequisite), and can bring significant benefits.
Also, it looks like Ill be working with Microsoft (Kirk Evans in particular) on an MSDN whitepaper on the topic. This will be a more formal treatment of many of the principles/techniques I plan to outline in my blog series, and will hopefully become a valuable resource to those looking to implement automated builds.
Posted by Chris O'Brien at 00:27 3 comments Links to this post
Older Posts Home
Subscribe to: Posts (Atom)
Contact me
My LinkedIn profile
Subscribers (click to subscribe)
Most popular articles (updated!)
SharePoint 2010 AJAX/jQuery/Client OM series
SharePoint 2010 Feature upgrade series
SharePoint 2010 Ribbon Customization series
SharePoint 2010 Managed Metadata
My checklist for optimizing SharePoint sites
SP2010 developer preparation
My favorite SP2007 development techniques
Introducing the SharePoint Content Deployment Wizard
Using the SharePoint Content Deployment Wizard
Extending the web part framework - part 1
Slide deck from my deployment talk at Best Practices Conference
My top 5 WCM tips presentation
Simple data access pattern for SharePoint lists
Introducing the SharePoint Config Store for developers
Resources from my workflow deep-dive presentation
Blending publishing/collaboration functionality in SharePoint
STSADM export, Content Deployment, Content Migration API - deployment options compared
RSS feed
Subscribe in a reader
Previous articles
 2011 (17)
 November (1)
Slide deck from Customizing the SharePoint ribbon...
? October (1)
My ribbon samples from SPC11 (session with AC) + r...
? September (2)
SP2010 Continuous IntegrationCpt 4: Assembly versi...
My SharePoint Conference 2011 talksCribbon develop...
? August (2)
SP2010 Continuous Integration - pt 3: Creating you...
SP2010 Continuous Integration C Installing TFS2010...
? June (1)
SP2010 Continuous IntegrationCpt 1: Benefits
? May (2)
My jQuery, AJAX and SharePoint 2010 slide deck (SU...
Speaking at SUGUK (Manchester) on jQuery, AJAX and...
? April (1)
Automated SharePoint builds/UI testingCslide deck
? March (2)
Speaking on nightly SharePoint builds and UI testi...
Optimizing SharePoint 2010 internet sites C slide ...
? February (2)
CAML.Net Intellisense C now with added Feature upg...
Repost - SP2010 AJAX part 8: Migrating existing ap...
? January (3)
Eliminating large JS files to optimize SharePoint ...
SP2010 AJAX part 8: Migrating existing apps to jQu...
SP2010 AJAX part 7: Useful tools when building AJA...
? 2010 (26)
? December (2)
SP2010 AJAX part 6: Debugging jQuery/JavaScript
SP2010 AJAX part 5 - Enable Intellisense for Clien...
? November (2)
SP2010 AJAX part 4 C returning JSON from a HTTP ha...
SP2010 AJAX part 3C using jQuery AJAX with a HTTP ...
? October (3)
SP2010 AJAXCPart 2: Using the JavaScript Client OM...
SP2010 AJAX - Part 1: Boiling jQuery down to the e...
My SP2010, AJAX and jQuery code samples and slide ...
? September (2)
Set object caching user accounts with PowerShell
Speaking on SP2010, jQuery and AJAX at the 1st UK ...
? August (2)
Feature upgrade (part 5) C using PowerShell to upg...
Feature upgrade (part 4) C advanced scenarios
? July (3)
Feature upgrade (part 3) C introducing SPFeatureUp...
Renewed again as SharePoint MVP
Feature upgrade (part 2) C a sample to play with
? June (2)
Feature upgrade (part 1) - fundamentals
Upgrading sandboxed solutions
? May (2)
Tips for building SharePoint 2010 base VM images
SharePoint 2010 ALM C my slide decks from SPEvo
? April (1)
SP2010 support and fixes for SharePoint Content De...
? March (2)
Im speaking at the SharePoint Evolutions conferen...
Beyond F5 deployment - my top 5 benefits of Visual...
? February (2)
Customize the ribbon programmatically from web par...
Ribbon customizations - dropdown controls, Client ...
? January (3)
Adding ribbon items into existing tabs/groups (rib...
Customizing the ribbon (part 1) C creating tabs, g...
Editing .cmp files to fix lookup field issues
? 2009 (24)
? December (4)
ECM platform enhancements - Content Organizer, Lis...
Common compilation error for SharePoint 2010 VS pr...
Managed Metadata in SharePoint 2010 - some notes o...
Managed Metadata in SharePoint 2010 C a key ECM en...
? November (1)
Speaking on SP 2010 at UK user group C ECM Enhance...
? October (2)
SP2010 C developer skills preparation
My favorite SharePoint 2007 development techniques...
? September (2)
? August (1)
? July (1)
? June (1)
? May (3)
? April (2)
? March (2)
? February (2)
? January (3)
? 2008 (31)
? December (2)
? November (2)
? October (3)
? September (2)
? August (2)
? July (3)
? June (3)
? May (2)
? April (4)
? March (2)
? February (3)
? January (3)
? 2007 (38)
? December (3)
? November (3)
? October (2)
? September (3)
? August (4)
? July (6)
? June (6)
? May (3)
? April (4)
? March (3)
? February (1)
About Me
Chris O'Brien
I'm an independent SharePoint/.Net consultant in London, UK. I have worked with Microsoft technologies for around 10 years and am MCSD.Net and SharePoint certified. My blog focuses on the architecture/development aspects of working with SharePoint. View my complete profile
