STOP using SPDisposeCheck (or MSOCAF) with SharePoint 2013!

SharePoint apps and farm solutions require all sorts of system resources. These resources could involve memory, system handles or even database connections. Not dealing correctly with them can introduce nasty bugs and performance issues. The .NET CLR supports automatic memory management, using the garbage collector. But other resources need to be dealt with using bespoke code. To help with this many developers and administrators are using SPDisposeCheck.

But beware – that tool is broken and continuing to use it is dangerous!

Curious why? Then read the entire article at www.spcaf.com

How to: Using Azure Analytics to track usage of your Office 365 portal

Are you looking for answers to questions like:

  • How are people using my Intranet?
  • How many people are visiting which pages?
  • How long do they stay on each section?

Then head over to my blog at SPCAF.com to learn How to use Azure Analytics to track usage of your Office 365 portal

11

 

I am on the road again! Watch out!

One of the advantages of being your own boss is, that you can mostly decide yourself what to do with your time. Even better if it is also for the benefit of your company.

For those who know me personally probably know that I just love to speak! (and talk, but that is a different story ;))

So this first half year of 2015 I am stepping up my game!

As it would become quite boring on my blog if I announce every single one of my speaking engagements in a separate post, I am summarizing here where you will be able to hear and meet me in the next couple of months.

It started already this year with organizing and speaking at SharePoint Saturday Stockholm on 14th of February. If you like you can read my little recap here and take a look at some pictures on our Flickr account.

15933637123_fb2b79f14a_z On stage with fellow co-organizer Erwin van Hunen at SPS Stockholm 2015

Next up was basta.net in Darmstadt, Germany two weeks ago where I gave two sessions. Basta is a pure .NET developer conference with a single SharePoint track. It was very interesting to meet and talk to people who are usually not attending SharePoint-only events and aren’t so deep into it to hear about the challenges they are facing. For example the app model is still a fantasy from the far future for many as some of them still run SharePoint 2007… Not kidding! They also still run Office2003 and just started to upgrade Windows XP to Windows7. Amazing, isn’t it?

Today I am on my way to Erding (close to Munich, Germany), where I am having crazy three sessions in two days at the “SharePoint konferenz” before I will fly to Finland for the weekend to the inaugural SharePoint Saturday Helsinki.

April will be even more fun. I have the pleasure to hold the keynote at the Metalogix roadshow “SharePoint & Office365 Roadmap to the Cloud” in Cologne, Germany on April 16th directly followed by speaking at SharePoint Saturday Antwerp in Belgium on April 18th, before I head to London to probably the best SharePoint conference on the planet I know of: The SharePoint Evolution Conference happening from April 20th – 23nd! Unfortunately I am not speaking there, so this will be the only event so far, that I am just attending. But this will be also a lot of fun! :)

May is going to be a little bit more relaxed, again with speaking the keynote at the Metalogix roadshow on May 21st, this time in Copenhagen followed by the inaugural SharePoint Saturday Paris on 30th of May.

Less than two weeks after I am going to have a session at the ShareConf in Düsseldorf, Germany on June 8th – 11th.

That’s about it for now. We will see what else comes along.
If you happen to be around at one of those events then I am looking forward to meet you!

I want to thank all the event organizers who still not seem to be fed up by me and last but not least my wonderful and understanding family who let me go on such a tour!

See you around!

SharePoint Online Client Object Model and PowerShell: Three tips

PowerShellOver the years, SharePoint has evolved a lot and the powerful tool we know today has undergone some serious developments. SharePoint developers working on configuration of the platform for specific needs have seen solutions to their design needs improve too. However, it’s not always clear exactly which to use and when, so this post will look at some of the solutions out there and explore how they can be implemented.

A gradual evolution

Back in SharePoint 2003 the only way to change all SharePoint configuration options was using the command-line tool “stsadm”. It came with the inherent drawback that it did not support object oriented programming, the options were quite limited and it only worked when run from the SharePoint server itself.

The server side object model to configure the farm was introduced in SharePoint 2007, but PowerShell integration was quite limited. Furthermore, the server side object model still required the code to be run on the SharePoint servers.

This changed in SharePoint 2010 with the introduction of the client side object model. Using this new model it is possible to run code against the SharePoint object model straight from the client. Under water the code was transformed into web service calls, but from the developer’s point of view he could write code similar to server side code.

When SharePoint Online / Office 365 was released, only a small subset of the server side object model was available in the client object model (as Chris O’Brien described in his article 774 vs 30 Cmdlets). Over time Microsoft has fixed this and added a lot of new functions to the client API’s, and now it is a good replacement for the server side object model.

As useful as these updates are, it can be somewhat difficult to understand how they all work. To clear this up, we’ll be looking at three top tips for using the SharePoint Online client object model with PowerShell.

1. TechNet: Start here when you are looking for documentation

The most experienced SharePoint developers will remember the days when there was absolutely no official documentation on the SharePoint 2007 Object Model. Things are very different now: Microsoft has released a lot of documentation about their API’s, including a dedicated area on TechNet about Windows PowerShell for SharePoint Online. It is a great starting point to read about this topic, and it includes the entire list of available cmdlets.

Of course you can also just use the built in help and intellisense of the PowerShell ISE to explore all the available cmdlets after you have set up your environment.

Another great starting point to turn to when looking for documentation is the Office Dev Center. It provides links to tutorials, training videos, upcoming events, code samples and so on. The link to the Office 365 roadmap is also promoted on the front page – have a look there to see upcoming changes for Office 365. Microsoft is implementing new changes very rapidly, so don’t let these new changes come as a surprise!

2. Office 365 Developer Patterns and Practices

OfficepnpAlthough many open source libraries are available on the internet, there is only one that has the official blessing from Microsoft:The Office 365 Developer Patterns and Practices which I already talked about previously.

A popular example is branding. There is a lot of discussion about how to apply branding in Office 365, as custom master pages and page layouts are discouraged. The library contains many examples of how to apply custom branding without having to change master pages and/or page layouts.

A component worth a special mention: The OfficeDev PnP PowerShell Cmdlets authored by Erwin van Hunen. Erwin extended the existing SharePoint Online PowerShell cmdlets extensively to fill the gaps and ease the process of managing your SharePoint Online tenant through PowerShell with plenty of helper and provisioning cmdlets.

In general OfficeDev PnP helps to make sure that developers and administrators do the correct things and build reliable future proof solutions. On top, it also improves efficiency. Code examples enable developers to build solutions much faster without having to reinvent the wheel.

3. Blogs: A lot of people have solved problems you will encounter

Trust us, you will encounter problems when you start using the Client Object Model. You are not alone! For example, authentication with OAuth 2.0 can be quite complicated. Every implementation of OAuth 2.0 can be different as it has not quite been standardized yet. This blog post by Matthias Leibman gives a good overview of using OAuth 2.0 with the Office 365 API.

A lot of other blog posts have been written on common issues while using the Office 365 API. So let me give you a head start by pointing out some interesting reads: Soeren Nielsen, Chris O’Brien and Vadim Gremyachev are worth reading!

CSOM and PowerShell do not guarantee better Code Quality

Although all of this is great help, even with the greatest examples, libraries and advice things can go wrong. With the trend moving code of SharePoint and execute the tasks with CSOM the risk of bad code harming your SharePoint environment is not going away. It is just moving to a different place. Hence I am happy to share with you that SPCAF will soon also fully support the analysis of PowerShell client side object model code as well as .NET CSOM and JavaScript CSOM to assure your code quality no matter where you run your code.

Get Started Now

I hope all of this gives you enough confidence to start using PowerShell and the Client Object Model to write code against SharePoint Online. It can be a little intimidating at first, given the complexity of the work required. However, spare a thought for developers back in 2003 – in the beginning it was no fun at all with only a couple of cmdlets available. Nonetheless, we’ve seen things improve a lot since then and the tools available now really do make the work a lot easier. And, of course, the API is still evolving and new functionality is added regularly, so we expect that it will become better and better!

SPS Stockholm – Recap

Wow, what an experience!

SPSSTHLM_ValentinesBannerEvent if you ever had the chance to attend a SharePoint Saturday or a similar free community event,  you probably don’t know what it means to organize such an event for 300 people in your free time. So in this post I just want to give you a glimpse on what is involved if you ever play with the thought to do it yourself :)

SharePoint Saturday Stockholm 2015 on 14th of February in the Stockholm World Trade Center was the second run that Erwin van Hunen and I organized, and even though we thought we had done most of the required preparations already the first time and can just copy & paste the event, there was still a lot to prepare.

Sponsors, Speakers, Attendees

Organizing this event started about 8 months before and the first step (after fixing the date and venue) is always to find and convince the sponsors to fund the event. Luckily this was much easier this time due to the success of SPSSTHLM2014 and we got the first 5 sponsors signed up within the first week after we announced the event. Still, you have to chase up all your contacts regularly, come up with ideas that might make the event or a special sponsorship level more attractive and finally hope that you will get enough to sign up in order to make your budget. In my personal opinion, finding sponsors is probably the most nerve wrecking task in the entire organization process. You can make that easier if you find someone who provides their premises for the event e.g. Microsoft, but that often comes with the downside that you have to take care of the catering, insurance, security and cleanup yourself and that the location is maybe harder to reach for the attendees (which may result in more no-shows).

Next up is calling for and selecting the speakers and sessions. There are so many great, well-known speakers out there who are eager to come at their own expenses to the event (!), that getting sessions was no problem at all. Although unfortunately the Swedes seem not like to speak that much which meant at the end that we only had Wictor Wilén as the only real Swede speaking at the event. The tough part (and I didn’t envy Erwin for that) was to select the sessions for the 21 slots out of the 120 submissions. Erwin made a great job selecting mostly technical session because much like in 2014 about 65% of the attendees were developers, 20% IT-Pros and only 15% interested mainly in business topics.

When you have the sponsors, speakers and sessions in place then it is time to make some noise and get attendees. Last year our tickets were sold out in 2 hours and we heard from many people that they learned about the event the first time after all seats were already gone. Hence we decided this time to release the tickets in two batches to give the word some time to spread around in between. To be honest I am not entirely sure if this made any difference. Both batches were gone again each within 2 hours and we had still over 100 people on the waiting list on the event day.

What else needs to be done?

Here is an incomplete list: plan the catering, speakers dinner, agenda, sponsor perks, exhibition area layout, room equipment, attendee bags, SharePint, attendee registration, volunteer allocation, design signage, badges, raffle tickets, slide decks, communicate with sponsors, speakers, attendees, venue and much much more.

All of the time you always have to think of the budget, how many attendees you can allow, amount of no-shows to plan with (sadly this year we had about 17,5% with over 100 people on the waiting list), if you can have better/more/different food, coffee breaks, nicer speaker presents and so on.

Because of all these variables and the lack of experience, our first event in 2014 went unfortunately about 10% over budget. Our goal this time was to do better and cover for last years loss. I am glad to say that this mission was accomplished and thanks to our generous sponsors we were still able to make the event bigger this year (300 instead of 250 participants, 5 instead of 4 tracks, 25 instead of 20 speakers).

The Reward

Both Erwin and I knew very well what challenge we were up to and even though it requires a lot of work, it is also lot of fun. When you finally see what was accomplished and feel the appreciation from all the people who participated it is just a awesome.

So rest assured, we will do it again! (just don’t tell our wives :).

To stay informed, please signup on one of our 3 mailing lists for attendees, speakers and sponsors and follow us on twitter.

Thank you!

To finish of, I want to shout a big thank you to everyone involved:

  • The sponsors, for making all of this financially possible, providing awesome raffle prizes and being on-site to give the whole event a professional feeling :)
  • The speakers, for coming on their own expenses to Stockholm to share knowledge and expertise with the local community,
  • The volunteers, for helping to prepare the event the day before, registering the attendees and supporting speakers and attendees in the session rooms,
  • The venue staff, for being a big help, flexible and professional,
  • The attendees, for coming  to this great community event, on a Saturday!, on Valentine’s! and mingle with all others to share their experiences with SharePoint and the surrounding technologies and
  • Erwin, for holding out until the end with the annoying, perfectionist German that I am ;)

Last but not least, I just want to say: Hats off to anyone who takes up the challenge organizing a free community event!
If you need help, then just let me know and I share whatever I can.

Pictures

All pictures of the event can be found on our Flickr account

16366231890_c6cafa77cb_z