zevenseas


 

SharePoint and Unit Testing

I put together a solution for applying a custom masterpage and style for a customer earlier this year, and due to the massive matrix of having to test Activation, Deactivation, Re-Activation and on over 20 different site templates, I dove into Unit Testing. While I realised at the time that I had a lot to learn, I found it incredibly useful, uncovering a couple of (albeit small) issues that would otherwise have remained for some poor unfortunate end user.

I have been meaning to write a post about this for some time, as when I first looked into it there was very little information. Since then a couple of useful resources have emerged, Andrew Woodward posted about it here:

http://www.21apps.com/tdd-getting-into-sharepoint-om/

http://www.21apps.com/agile/unit-testing-sharepoint-getting-into-the-object-model/

With the documents here:

Unit Testing Sharepoint Solutions - Getting into the Object Model

Unit Testing SharePoint Solutions - Getting in the Object Model - The Code

But now, something more for me to play with, the typemock’ers have released a new version of their tool that specifically supports SharePoint, you too can get a free license:

Typemock are offering their new product for unit testing SharePoint called Isolator For SharePoint, for a special introduction price. it is the only tool that allows you to unit test SharePoint without a SharePoint server. To learn more click here.

The first 50 bloggers who blog this text in their blog and tell us about it, will get a Full Isolator license, Free. for rules and info click here.

Free Solution: Tagged Links – Social Bookmarking for SharePoint

Well, after our little experiment with offering Tagged Links for sale, we have decided that we would rather just put it in the hands of as many people as possible!

So, today, I’m very pleased to announce the release of Tagged Links V1.1 which in addition to being free, comes with some very cool new features.

Download Now

For those not familiar with Tagged Links, here is a summary from an earlier post.

What is “Tagged Links”?
It’s social bookmarking for SharePoint, taking the standard “Links List” to a new level via browser integration, one-click tagging, advanced graphical views and global tags that allow you to define tags across an entire site collection. Take a look at the new “Walkthrough”.

In short, there is no simpler way to collect and share links to interesting web site content using SharePoint.

Try it yourself: 
Tagged Links
Username: DemoUser
Password: DemoUser

Whats new?
We managed to sneak in a few important new features, these are as follows:

1. When you use a browser button to save a link to your “Tagged Links” list, you are immediately redirected back to that site after you perform a save. This minimises the disruption, returning you to exactly what you were doing!

image

Saving and sharing a link takes one-click, and just seconds of your time.

2. The new Popular Links web part. This web part will loops through all the Tagged Links lists in the current web, AND any sub webs, providing you with a summary of the most tagged links. Its a great way of working out which links people think are most useful.

image

3. The new Tag Cloud web part which you can use in any web part page in the site. This has been specially designed for use with Tagged Links and provides a cloud of tags based on any Tagged Links lists in the current web. It also supports connections, allowing you to drive the filtering of other Web Parts.

image

image

Download Now

WebPartOrder not being respected

Someone mailed me asking me to repost this one from my old Point2Share Blog, so here it is!
 
I lost a couple of hours of my life today working on a really simple problem and so I thought I would just put a little tip out there in case anyone else bangs their head against it.
 
All I wanted to do was put some web parts, on a web part page, in a particular order, via an ONET.XML file. Simple right? All you need to do is give them sequential WebPartOrder values and away you go!
 
I did this, tested, and found that while the web part went in the correct zone (one on the right) they were going in with the wrong order. No matter what I tried (and I tried everything, was it alphabetical, the order in the ONET.XML, reverse WebPartOrder, argh!) I just couldn't get them to display the way I wanted.
 
Now this sort of thing is really ONET.XML 101, so it frustrated me even more. Taking a break from the problem last night I returned today to find it was actually pretty obvious. You have to make sure you get your Web Part Zone ID correct.
 
A tip, to be 100% sure of the ZoneID, export a web part from the page which is in the Zone you are interested in then examine the .dwp (or .webpart) file, or, better still, take a look at the Layout page looking for the specific WebPartZone tag, and then grab the ID attribute.
 
I think the reason it took me so long is that the web parts were going in the correct zone, what would have been better is if they gave some sort of error, like "Web Part Zone not found", or simply didn't appear on the page. I'm not sure how SharePoint selects the zone to place web parts when it is faced with an invalid Zone ID, but it seems I was partially a victim of coincidence.

SharePoint Development with Visual Studio 2010: Notes and Screenshots

Think this will be the version of Visual Studio that finally takes SharePoint development to the top tier. I’ve made some notes below, but for the full screencast and interview, head over to Channel 9.

  • Aimed at tackling the manually tedious aspects of SharePoint Development
    • GUID Matching across multiple files
    • Solution Building and Deployment
  • Goal is to make SharePoint Development more approachable
    • Improving the ‘F5’ experience (build and run)
    • Tools to create the artefacts
    • Attaching the debugger
    • Recycling the Application Pool
image
  • Demoimage
    • New Project Templates - VB and C# (not complete)
      • Blank Site Definition
      • Content Type
      • List Definition
      • State Machine Workflow
      • WSP Import
      • Business Data Catalog
      • Deployment Module
      • Event Receiver
      • Sequential Workflow
      • Web Partimage
    • Server Explorer
      • Now Supports SharePoint Content
      • Integrates with the property grid
    • Packaging Explorer
      • Visual Representation of the artefacts to be installed
      • WYSIWYG Design Experience for Solutions
    • MSBuild Support
    • Feature Designer

  image

SharePoint Developer Box Setup: Essentials

Mark has had a busy week to be sure. He spent it building out 6 developer machines in a seriously challenging, heavily locked down environment. You know the sort, one of those where you can just never get PSCONFIG to connect to SQL Server because, unbeknownst to you, there are IPSec policies blocking your traffic, system policies meaning your admin account is not really an admin, and coffee that despite being fresh from the machine is just too cold. Anyway, you get the idea.

Anyway, after overcoming these hurdles he has put together a great list of tools, essential to every SharePoint developers desktop!

Long Time SharePoint Sage Has Cheese Moved!

Long time support guru and presenter extraordinaire Dan Winter has just taken on a new role in Redmond. While its a shame CSS will be without his developer jin-jitsu his experience there I’m sure will make a great contribution to the new CAT (no, not THAT sort of Cat) Customer Advisory Team. Congrats and Good Luck Dan!

Anatomy of a SharePoint Solution: The Blog

Things have been quiet around here as I have just gotten home from a trip back home (yes I have two, my beautiful Amsterdam, and the relaxing Adelaide). Spent 3 weeks in Australia, visiting family and friends, and then 3 more weeks catching up on everything that went on while I had been away.

Anyway, it’s time for me to get back into the series of posts I kicked off before I left:
Anatomy of a SharePoint Solution: Employee Blogging Platform
Anatomy of a SharePoint Solution: Blogs Home Screenshots

In the first post I talked about the overall solution and some of the requirements. In the second I drilled down with screenshots into the Blogs Home page, where people go to see what people are blogging about. In this post we drill down with screenshots into the individual blog itself, looking at the small but important additions we made.

The Blog

Below you will find one of the standard CKS:EBE blog themes (“Blue World” by the talented Heather Waterman) which has received a couple of small, but important customisations. In the following sections we will look at each of these in detail.

image

Search

The first thing you will notice is the addition of a “Search” box, this has been added to each blog using our CKS-EBE Search Feature (walkthrough).
image

Subscribing to the Blog

Most readers of this blog will probably have trouble remembering what life was like before RSS, and of course no blog is complete without providing support for RSS readers, however most people out there are still to grasp this amazing technology. The customer we were working with also had locked down desktops running Office 2000 (!!), and therefore a RSS reader was impossible even if they were keen to use it. Subscribing to a blog however is incredibly important, so to make this possible, and one-click easy, we built the Quick Alert Web Part

image

After clicking on Subscribe a SharePoint Alert is created which generates and email every time a new Post is added.

image

Owner Information

Our solution added support for “Contributors”, in addition to “Owners”, a feature which I’m pleased to see has made it into the next release of the CKS:EBE. We felt it was important that information about the blog, including who the owners and administrators are, is displayed right there on the home page. The information you see displayed here is automatically generated based on site permissions.

image

Tag Cloud

While a Tag Cloud is included in the CKS:EBE we opted to use the one created for the Blogs Home page for one important reason, it supports the generation of the cloud based on the values from multiple fields. The tag cloud here is generated based on both the “Categories” field, and a new field we added “Tags” (see below).

image

image

I will be looking to wrap this up in a nice reusable web part over the coming weeks, so stay tuned.

View Tracking

People love to watch their Blog Stats, and of all the stats, the one they watch most is the number of “Views”. While all SharePoint sites come with the Usage Analysis feature, for a number of reasons it didn’t quite give people the feedback they were looking for. To meet this requirement we created a very simple View Tracker, a component that simply writes away a record to a list each time someone accesses a post. We also track the number of times the blog home page is accessed using a counter in the property bag. Notice below that when an owner or contributor access the “Posts” lists they can quickly see just how many views each post has had, this is also rolled up as one of the key statistics on the “Blogs Home” page.

image

The “Views” list:

 image

Conclusion

The CKS:EBE has provided us with a great place to start building our our blog functionality, which amount to a number of small but important addition.

A big thanks to all the developers behind it, and I look forward to the next version.


 
 
 

© 2009 Community Kit For SharePoint