Tech Days 2013 NL – Day 2

I started the 2nd day of the Microsoft Tech Days with a level 400 session.

Hugo Kornelis – T-SQL User-defined functions

Hugo showed us why T-SQL User defined functions can be catastrophic for our database performance by demonstration it with live examples (he had 7 slides in his presentation deck!). With the statement:


You can see how many read/writes each table receives and how the SQL optimizer does clever things behind the scenes. Example: removing joined tables from the execution when it isn’t part/effects of the result.

Facts that I remembered
  • Query plan must be read from right to left (already knew that, but not everybody does).
  • User-defined functions are a black box for the SQL optimizer. This can affect the actual query plan.
  • Estimated query plan doesn’t show the actual reads/writes when UDF is involved
  • Table valued user defined function returns a table are better for the optimizer (no scalar value), but doesn’t solve the duplicate code issue.
  • Inline table valued user defined functions delivers statistics to the SQL optimizer. From a conceptional point of view this is actually a parameterized view (=macro). This delivers the performance you need, but can be hard to write. You need statements with CROSS APPLY.
  • Not actually part of the topic: COALESCE(..expression..) is the better version of the ISNULL(..expression...) function.
Relevant links

Mads Kristensen – Creating Visual Studio Extensions

Bart de Smet session was cancelled, so this session was a last-minute addition to the conference. There were a few reasons to go here:

  1. There are not a lot of session about this topic (and thorough documentation is not available).
  2. Mads is the founding father of the Web Essentials extension, this session should be interesting.
Developing extensions

He showed that almost everything is possible to extend. It’s only sometimes difficult to find out ‘how’. Creating extensions is mostly done by ‘Search Driven Development’. So use Google to find the info you need to complete your code. One of the reasons is the use of magic strings that are used for hooks in VS.

For extensions you need the Microsoft Visual Studio 2012 SDK. After you installed the VS2012 SDK you get extra extensibility project templates. Most of the times the ‘package’ template is best.

Testing and debugging

To test and debug your extension you just can press F5 then the Experimental Instance of Visual Studio will be launched as a testing container. This special version of VS has it’s own registry settings, so it doesn’t conflict with your normal version.

The VSIX package

A .vsix is just a zip file, so you can rename it and view the contents. Strangest thing is that VS doesn’t compress the package. So if you like to release a smaller package you best can: 

  1. Rename to .ZIP
  2. Extract the files
  3. Rezip the files
  4. Rename to .VSIX

Note to self: try this stuff at home!

Relevant links


Alan Smith – Web Site Authentication with Social Indentity Providers

The session from Alan Smith was mainly about ACS: Azure Control Service. Microsoft is supporting multiple identity providers: Google, Yahoo, Facebook and LiveID accounts. All providers supports only the name identifier claim (which is unique and immutable). Only Google and Yahoo also deliver the name and email address as extra claims.

Steps within the ACS portal:

  1. Register the application (should match the realm)
  2. Define the rule and claims
  3. Add federation to the project (think about setting the certificate validation to Off in the web.config of you development environment).
  4. Protect the resources with security settings in the web.config
Small notes

- Security token = set of claims + encryption (optional) + signed

- Within ACS it’s possible to define extra Role Claims.

- Relying party should trust the identity provider

Blog of the Alan Smiths

Cross Platform Mobile Application Development met Xamarin and T4

Presentation was given by three developers of Avanade. There were no real demo’s, only some code on slides. This is a bit disappointing, it’s a developer conference!

Things that I remembered
  • Targets on iOS, Android, WinRT (all phone and tablets). See screenshot example application.
  • Mvvm Cross goal = 80% reusable .NET code for all platforms
  • Makes use of Portable Class Library (1 assembly per platform)
  • Mvvm Cross delivers IoC, plugins, converters and more..
  • Uses T4 for generating code based on Views in XML
  • Mvvm Cross – Views are platform specific
  • Still need account for all stores (Windows Marketplace = 99 USD per year, Android Play Store = 25 USD per app, Apple iStore = 99 USD per year).
  • Xamarin is a commercial product. Single developer is 299 USD. See pricing for more.
  • Avanade created their on layer on top of Mvvm cross, called Tea Light.
  • Visual Studio has no coding assistence for T4. Avanade developers recommended Tangible T4 Editor. This is also a commercial product.

Tip: for testing on mobile devices can be done in the cloud by using


Jeff Prosise – HTML 5: The Good, the bad, and everything in between

HTML5small Jeff presentation was covering misc. HTML5 features with a lot of demo’s. He provided each HTML5 feature with a Grade (A to F) and explained us why with Pro’s and Con’s which was nice!

See the video, it says it all..

Relevant links
Comments are closed