Two Hackathons in a week

What a week. Two hackathons (‘hack’+marathon) in a row. That was exhausting. A three day hackathon with my colleges from Arvato Systems and a customer. We’ve used Cognitive services with 8 different programming languages and created great PoCs.         The second hackathon was about Azure Stack with Microsoft. Thanks to all participants, the organisation. It has been fun and a great experience.

Softwareentwicklung in der Cloud. Was ändert sich?

Vielen Unternehmen ist der Start in die Cloud bereits geglückt – oder es wird intensiv daran gearbeitet. Spätestens jetzt wird klar: Die Cloud ändert so einiges. Ein guter Zeitpunkt also, um darüber nachzudenken, wie wir mit Cloud-Technologien eigentlich umgehen wollen. Den Artikel habe ich auf dem Arvato Systems Cloud-Blog veröffentlicht.

Widgets instead of Add-Ins/Apps?

The concept of Add-Ins (formally knows as Apps) in SharePoint puts logic as HTML and CSS to another page. This page is then rendered as iFrame to another SharePoint page. This approach has advantages and disadvantages. You have to decide yourself. A very promising way to put stuff (or WebParts) onto a SharePoint page is the Widget Wrangler. More information can be found on Conceptually Widget Wrangler implementation is based on similar thinking as PnP App Script Part implementation, which was released few years back as part of the PnP patterns (or at the time it was call App Model Samples).

ReSharper plugin “reSP”

I won’t discuss the advantages of ReSharper (R#) in this post. But I’d like to point to a great plugin. reSP. It will inspect SharePoint specific details. It knows e.g. the SPBuildInFieldId class and hints you to use it. Great stuff 🙂  

Custom field and UpdateFieldValueInItem()

Recently I was developing a custom field. To store modified values, the UpdateFieldValueInItem method has to be overwritten. In a normal way of clicking the submit/save button, the method is called and I can adjust the value for the field within the current item. The changes are submitted to the database later. But what if you want to modify items outside of the current item? Sure, you can do so would you think.

What is Dependency Injection?

This post will help you understand what DI (Dependency Injection) is, and how easy you can adopt the design patterns to create flexible and testable code. For a definition take a look at this Wikipedia article. From the three types of Dependency Injection constructor injection setter injection interface injection this post covers the interface type. The example will deal with a SharePoint list. This list can either be the posts list of a blog, or the comments list.

Migrate SharePoint Blog to WordPress

As promised here, this is a follow-up post with the tool I developed for the SharePoint to WordPress migration. First, a screenshot: What is it, that we have to cover with a migration? Copying the posts is not enough. So I came up with this features: Features Copy posts Copy comments Copy resources like images and downloads Create needed tags and categories Modify links to local resource deal with https, if links are absolute on the source blog and mixed with http Using web services to connect to source and destination URL rewriting (covered by a WordPress Plugin) Delete all content from the destination blog (for migration testing) Replace strings (with Regex) a nice (WPF) GUI Description Originally I’ve build a plain console application.

Using TLS with SmtpClient

A rather small change to your code can increase security by sending E-Mails via an encrypted connection. Recently I stumbled across code, that send E-Mails with the System.Net.Mail.SmtpClient class. That piece of code did not try to communicated encrypted with the receiving SMTP server. So I changed that, to enable a TLS connection. try { var message = new MailMessage(); _smtpClient.EnableSsl = true; _smtpClient.Send(message); } catch (SmtpException ex) { // if the recpient mailserver does not support SSL, send without encryption _smtpClient.

The solution for warming up SharePoint

Most SharePoint Farms will have a solution for the long loading time after an Application Pool recycle or iisreset running. There are many different ways to preload websites, so your users have faster load times. So why another solution? There are some questions, that I think have not been dealt with before: Most solutions require some sort of Timer to be started (e.g. a Scheduled Task) When should the warmup occur?

SharePoint 2013 SDK

How could I miss the release of the SharePoint 2013 SDK in November? Anyway. Finally the non-preview version has been released 🙂

Building a Visual Studio project for SP2010/SP2013 (.NET 3.5/4.0)

In this post I will show you how you can use MSBuild to target your project for .NET 3.5 or .NET 4.0 and use a separate app.config file for each. My Warmup Tool is supposed to work with SP2010 and SP2013. To achieve that compatibility, I have to change the TargetFramework of the project to be able to compile, as well as the app.config so the application uses the desired Framework.

SQL Access to Configuration DB required

In many cases you pass an URL string to connect to SharePoint. In my case I wanted to verify the URL by using this code: 1: Uri requestUri; 2: if (!Uri.TryCreate(absoluteUrl, UriKind.Absolute, out requestUri)) 3: throw new ArgumentException(absoluteUrl + "is no a valid URL."); 4: 5: SPWebApplication webApplication = SPWebApplication.Lookup(requestUri); And here comes the “but”. I did not know that the account, which is executing the code, needs permissions to the Configuration Database!

When a Feature gets installed

Have you ever thought about the Features folder and when a folder will be created for one of you features? Well, I did 🙂 Why is this relevant, anyway? To be able to activate a feature on a given scope, it has to be installed first. That’s why. Action <td valign="top"> <strong>Result</strong> </td> </tr> <tr> <td valign="top"> stsadm -o addsolution </td> <td valign="top"> The solution is added to the farm.

Activating Features after Solution Deployment via VS

Visual Studio allow a F5 Deployment. I guess you all know that. The part where you have to think carefully is, when you add Features to your project. Should you activate “Activate On Default”? Well, it depends (as always). Usually I don’t enable that setting, because features tend to be activated on scopes you won’t expect. The problem Take a WebApplication scoped feature for example. It might create SafeControl entries for your controls.

SPQuery for my tasks

Developing solution with multiple languages (or a language which is not English) sometimes can be a bit painful. To configure a Webpart to display only my tasks, I would filter for [Me] or [Ich]. To achieve the same via code / CAML, you can filter by UserID and not the string “Me”. 1: <Where> 2: <Eq> 3: <FieldRef Name="AssignedTo" /> 4: <Value Type="Integer"> 5: <UserID /> 6: </Value> 7: </Eq> 8: </Where> 9: <OrderBy> 10: <FieldRef Name="