ndc magazine

41
FOR SOFTWARE DEVELOPERS AND LEADERS MAGAZINE CREATING YOUR OWN SKUNK WORKS NIALL MERRIGAN FLUENT API’S KEVIN DOCKX SPECIAL NDC ISSUE ACCELERATING WINDOWS STORE APP DEVELOPMENT DAVID BRITCH Add new dimensions to your algorithms using F# TYPE INFERENCE VAGIF ABILOV 5 AUDIO TRICKS you didn't know browsers could do JORY PRUM N O 2/2014 NORWEGIAN DEVELOPERS CONFERENCE Oslo Spektrum, 4-6 June Pre-workshops, 2-3 June

Upload: ndc-the-developer

Post on 24-Mar-2016

255 views

Category:

Documents


7 download

DESCRIPTION

The 2nd issue of NDC Magazine 2014. Featuring articles written by speakers attending NDC Oslo 2014 in June.

TRANSCRIPT

Page 1: NDC Magazine

F O R S O F T WA R E D E V E L O P E R S A N D L E A D E R S

M A G A Z I N E

CREATING YOUR OWN SKUNK WORKS

NIALL MERRIGAN

FLUENT API’S

KEVIN DOCKX

SPECIAL NDC ISSUE

ACCELERATING WINDOWS

STORE APP DEVELOPMENT

DAVID BRITCH

Add new dimensions

to your algorithms

using

F# TYPE INFERENCE

VAGIF ABILOV

5 AUDIO TRICKSyou didn't knowbrowsers could do JORY PRUM

NO

2/2

014

NORWEGIAN DEVELOPERS CONFERENCEOslo Spektrum, 4-6 JunePre-workshops, 2-3 June

Page 2: NDC Magazine

3

The worlds first software engineering conference was h e l d 4 6 ye a r s a g o i n Garmisch, Germany. At this conference the term "soft-ware crisis" was fi rst used. Software projects were run-ning over-budget and over-time, and in general did not meet expectations on qual-ity and functionality.

That conference represents a turning point in our history. We wanted to run larger software projects, but their fail-ing seemed unavoidable. This started the search for ways to manage projects, smarter ways to structure code, bet-ter ways to do programming. Our outlook is better now, but our technology and expec-tations keep changing, and the problem identifi ed in 1968 will never completely be solved. Every time we start a new software project we take on the risk of failure. This is why conferences like NDC is so important. At NDC we bring together diverse experience from software pro-jects using many different methodologies and technolo-gies. Smart people get to present their view of what's working, and the community get to react and respond. As a developer you get to review years of experience in the course of just a few days - stuff you can take home to im-prove your own chance of implementing successful soft-ware projects.

NDC 2014 will cover many different and vital topics. One I fi nd especially important is functional programming. The industry is fi nally admitting the value of FP, and this year you will have the opportunity to dig deep into two FP-technologies: The fi rst is F#, which has grown up and gives us a very powerful functional language on the .NET plat-form. The second is Erlang, which has proven its unique strengths in projects like CouchDB, RabbitMQ, WhatsApp, and Facebook's chat. There are other areas where we see a lot of change, like JavaScript. And NDC will bring you a lot of content and opinions about how to run successful JavaScript-based projects. There will be many talks related to DevOps, and emerging topics like "the Internet of things" are also cov-ered. However, the most important criteria for success in soft-ware engineering is not the technology. It's the people! Software is usually a team effort. That is why NDC also focus on how we communicate, how we collaborate, and how we motivate. I hope NDC 2014 will motivate you to improve your skills, and make it more likely that your pro-jects become a success!

Best regards,

Torbjørn Marøaboutme.kjempekjekt.com

NDC MAGAZINE 2-2014

and meet your target group!For more information about advertisement, please contact Charlotte Lyng at +47 93 41 03 57 or [email protected]

Advertise in the NDC MagazineF O R S O F T WA R E D E V E L O P E R S A N D L E A D E R S

M A G A Z I N E

THE DEVELOPER REBRANDED AS NDC MAGAZINENO 1/2014

TEACHING DEVELOPERS NEW TRICKS

KAROLINE KLEVER

FUNCTIONAL REACTIVE

PROGRAMMINGMIKAEL BREVIK AND

STIAN MØLLERSEN

SPECIAL FUNCTIONAL

PROGRAMMING ISSUE

THE POWER OF PARTIAL

APPLICATIONSCOTT

WLASCHIN

CREATING RESPONSIVE UIS WITH F#RACHEL REESE

WorkshopsPage 70

COURSESSee descriptions

Page 56

F O R S O F T WA R E D E V E L O P E R S A N D L E A D E R S

M A G A Z I N E

CREATING

From Crisis to Success

NO

RDIC ECOLABEL

241 Printing company

672

Member of Den Norske Fagpresses Forening

Design: Ole H. StørksenUncredited images are from Shutterstock, except portraits.

Print run: 11,000 Print: Merkur Trykk AS

Editor: Kjersti Sandberg

Marketing Manager: Charlotte Lyng

Publisher: Norwegian Developers Conference AS. By Programutvikling AS. Organisation no.: 996 162 060Address: Martin Linges vei 17-25, 1367 Snarøya, Norway. Phone: +47 67 10 65 65. E-mail: [email protected]

Contents

© K

rist

offe

r Sun

nset

ARTICLES5 Audio Tricks ...................................................................................................... p. 4Creating your own Skunk Works ................................................. p. 8SonarQube as an Educational Platform ........................ p. 12Modern Web Front-End Architecture .............................. p. 18Accelerating Windows Store app development using Prism for the Windows Runtime ............................ p. 22Let’s get physical ........................................................................................ p. 26FsCheck: smarter validation withProperty-based testing .................................................................... p. 30A Few Words on Fluent API’s ....................................................... p. 34The technical depth and breadth ofan Architect ........................................................................................................ p. 40Add new dimensions to your algorithmsusing F# type inference .................................................................. p. 42Code Club for Juniors ............................................................................ p. 48OpenID Connect: Unifying Authenticationand Delegated API Access .............................................................. p. 50

COURSESCourse overview .......................................................................................... p. 54

NDC 2014The NDC Agenda Committee ...................................................... p. 58Entertainment and food .................................................................... p. 62Oslo - the capital of Norway ......................................................... p. 66Meet the user groups at NDC community .................. p. 70Pre-conference workshops ........................................................... p. 74Program Wednesday - Friday ....................................................... p. 76

Page 3: NDC Magazine

4

A lot has changed since the days of NCSA Mosaic. Color, good design, separating style from structure, and appli-cations have come to the web over the past two decades. Developers have seen the era of plugins come and go, bring-ing with them the ability to animate, to provide rich expe-riences with modern typography, and leaving us enriched with radically improved user experiences. Only two years ago, however, one major aspect was almost completely left behind: audio.

Sure, HTML5 brought with it the <audio> element for play-back and some control over how playback worked and looked. But too many aspects of <audio> were left up to browsers to determine. For example, iOS will only play a single <audio> channel at a time and will not play any sound until the user taps on something, making it impossible to use <audio> to create user interface or other sound effects for applications and games.

Fortunately, the Web Audio API began to gain momentum in mid-2012 and is now supported in most browsers today. Web Audio API gives developers considerable capabilities with playback, manipulation, and even synthesis of sound. With support in Chrome, Safari 6+, iOS 6 and newer, Fire-fox, Opera, Chrome for Android, and more, Web Audio API is here to stay and provides powerful abilities most develop-ers aren't aware of yet. So without further delay, here are fi ve audio abilities you probably didn't know your browser could do!

I began in web development way back in February 1995. That's long enough to remember the days when web pages could only be grey, links were blue or purple, pictures as links always had a border around them, and there was no video or audio on a page. Oh, and all code had to be hand-written... from scratch!

5

© A

vesu

n /S

hutt

erst

ock

By Jory K. Prum

5 Audio Tricks You Didn't Know Browsers Could Do

Page 4: NDC Magazine

76

1. VISUALIZING AUDIOAudio is a mystery to most people. It's something that just happens around them without their awareness; they only know of its existence if something is out of place. One way people become more aware of sound is if it is translated into something visual. One of iTunes' most popular fea-tures has always been the visualizer, and there's nothing more useful to an audio professional than audio meters and spectral analysis. Using the Web Audio API, it is possibile to create all kinds of interesting visualizations of sound, from an oscilloscope representation to complex spectral drawings, all in realtime! Two outstanding examples of audio visualization are provided by Stuart Memo and Jos Dirksen. Memo has a library called Wavy Jones that uses <canvas> to create an oscilloscope and is incredibly simple to include in a project. [ https://github.com/stuartmemo/wavy-jones ] Dirksen's example goes much further, provid-ing multiple styles of visualization, including realtime peak meters, multi-frequency meters, and spectral graphing. [ http://www.smartjava.org/content/exploring-html5-web-audio-visualizing-sound ]

2. SURROUND PLAYBACKDid you know you can play 5.1 audio from a browser? Not many do! Chrome for Desktop has supported this for a while, both in the <audio> element and using Web Audio API. Radio France even broadcasts many programs in surround and bin-aural streams! [ http://nouvoson.radiofrance.fr/paysage-sonore/am-i-berlin?format=5.1 ] Implementing surround

audio output is surprisingly easy and I have a working exam-ple with code available for you to try out that plays back a 5.1 Ogg Vorbis fi le. [ http://www.html5audio.org/2013/03/surround-audio-comes-to-the-web.html ]

The question I often get about surround features relates to end users, though. How will users get to hear your sur-round stream? Fortunately, this is quite simple: connect your computer to your home theatre system using HDMI and everything should work automatically! Voila: surround on the web!

3. SYNTHESISYou might have seen Google's very popular Moog synthe-sizer doodle [ http://www.google.com/doodles/robert-moogs-78th-birthday ] back in May 2012. It was the fi rst use of the Web Audio API on a large scale, working in the Chrome browser and falling back to Flash for all others. Today, there are tons of great synthesizer examples. Some even include interoperability between them and there's even initial support for the upcoming Web MIDI API, allow-ing hardware controllers to be utilized. One of the best ways to get your hands dirty in this realm is by jumping into Stuart Memo's very nice example. [ https://github.com/stuart-memo/sympathetic-synth ] What Memo has put together is a very straightforward implementation of how to make a synthesizer with various controls. It even makes use of his Qwerty-Hancock keyboard controller to let you play the synth using your computer keyboard!

4. MICROPHONE INPUTOne of the most interesting abilities that's arrived with the Web Audio API and getUserMedia is the ability to capture audio input from the user via their device's built-in micro-phone. Not only can sound be captured, it's possible to save that audio data as a WAV audio fi le to the user's hard drive! It's defi nitely worth checking out Thibault Imbert's fantastic example, which walks through how each portion of the code works. [ http://typedarray.org/from-microphone-to-wav-with-getusermedia-and-web-audio/ ]

5. EVENT-DRIVEN PLAYBACKProbably the most useful single thing the Web Audio API can do is enable developers to play sounds when other events occur, such as fi ring a weapon in a game, clicking on a button, or a fading between ambience sounds or music as a page is scrolled. Being able to call individual sound events wasn't impossible with the <audio> element, but as mentioned before, the limitations were drastic and based on which platform the users was using. But with the Web Audio API, it's quite easy to setup events and simply fi re them off as needed. I've assembled several examples of how this can be implemented. [ https://github.com/html5audio/interactive-audio ]

There is so much more you can do with the new Web Audio API, and getting your hands dirty is quite easy and pain-less. Please check out the http://html5audio.org for more examples and inspiration!

7

Jory K. Prum is principal engineer and owner of studio.jory.org, a game audio production facility located in San Francisco, California. With 20 years of audio production expe-rience, Jory has focused primarily on video game sound since 1999 and has been responsible for sound, voice, and music in many award-winning games, such as "The Walking Dead".

© s

cyth

er5/

Shut

ters

tock

Page 5: NDC Magazine

8

Back in the early 50s, the Lockheed Company had a super secretive R&D division called Advanced Development Projects, although it was more com-monly known by its then unofficial alias “The Skunk Works”. Founded by the legendary inventor and aircraft designer Kelly Johnson, it was the place where magic happened and the weird and wonderful were normal every day occurrences.

9

© Ji

m B

arbe

r/Sh

utte

rsto

ck

By Niall Merrigan

Creating your own Skunk Works using the Cloud

Unhampered by bureaucracy and cloaked in secrecy, The Skunk Works created amongst other things the designs for the SR-71 Blackbird, the F-117 Nighthawk and the F-22 Rap-tor. In many cases, development of a project started months before an official contract was even received. Most of the work performed there was rapid prototyping and design.

The Have Blue project in 1976, which turned out to the prototype for the F-117 Nighthawk stealth fighter, was completed in just 18 months, which is remarkable considerable how far from a traditional aircraft the stealth fighter is.

So what does this have to with devel-opment? The name Skunk Works

in business and engineering terms means any place where you conduct R&D projects that are hidden from general view and where, well anything goes. It can also mean development projects that are not officially recog-nised or supported by management or in some cases are done in a way that is outside the normal working environ-ment. It is where a developer plays

Page 6: NDC Magazine

10

with when they have a bit of down time or have a flash of inspiration for something.

Nearly every developer has an off the books project that they tinker with. A project where they try out new technologies and ideas. It could be something as simple as a proof of concept for an application that they are working on in their real world job or something that they have seen that they would like to play with. My own downtime project is the Swiss cheese website which is a sample web appli-cation with security holes built in to show developers how easy these mis-takes are to make and how to look for them in their own code. To build this site I need a copy of different server systems to test it on.

Now some of us, yours truly included have gotten around this need for addi-tional machinery by having an under the desk server, some old machine often acquired by not delivering a retired device back and hoping that IT will forget about it. Unfortunately, these semi servers often cannot handle the demands of the new operating systems and can be painfully slow to work with, stifling the creative juice that are needed for these types of projects.

There is where the cloud comes in. You can spin up a VM in the cloud, running the latest and greatest bits, a VM which you fully control and that you can remote in from anywhere in the world and develop to your heart’s con-tent. If you do not need a VM, you can run your web application in the cloud. If your proof of concept code suddenly becomes a production ready system, you can quickly and effortless scale out to production quality in a couple of minutes. All this for a low price.

Many cloud providers offer either free or pay as you go subscriptions. In the Microsoft world, Microsoft Azure (recently rebranded from Windows Azure) offers free trials and pay as you go. For those of you with MSDN subscriptions, Microsoft offers a cer-tain amount of credits every month on its Azure platform for you to try out the full range of services. Amazon offers on its AWS platform the free usage tier.

So go create your own Skunk Works in the cloud, a place where you can cre-ate wonderful and magical applica-tions without the overhead of having to buy new computers.

Niall is the Head of Custom Software Development in Capgemini Stavanger,He is also a Microsoft ASP.NET MVP, and general rugby nut (which means he shouts a lot). He has a passion for web technologies, security and whiskey which can lead to some interesting discussions. He can be found on twitter as @nmerrigan and hosts a blog at http://www.certsandprogs.com

BESTILL DIREKTE PÅ DUSTIN.NO ELLER RING 21 04 40 40 SÅ HJELPER VI DEG.

Hvorfor er vi 1000 dedikerte IT-eksperter på Dustin? Kanskje fordi vi har et av Nordens største sortimenter av IT-produkter og IT-tjenester. Og når det finnes så mye å velge mellom er det bra å ha noen å snakke med.

Hvordan kan vi hjelpe deg å finne rett?

DEN MENNESKELIGE FAKTOREN.

Page 7: NDC Magazine

12

Many things changed over the next years. SonarQube today is considered a mature software eco-system (in my humble opninion the best) that provides a set of fea-tures for successfully applying the process of continous inspection to any development methodology.

In this article I'm not going to discuss about SonarQube's star features that help you manage and control your Techinical Debt. I will give a different point of view and explain how you can use it as an educational platform.

TEACHING DEVELOPERS WITH CODING RULESSince release 4.0, integration of external tools has been gradually dropped off and several of the coding rules pro-vided by these tools have been replaced by rules, writ-ten using an in-house developed (but still open-sourced) language parsing library which is called SonarSource2 Language Recognizer (SSLR)3. One of the great benefits of this rule re-writing is that they include a very explana-tory description about the purpose of the rule as well as several code examples – if applicable – that present the right and wrong way of writing code.

13© a

rgus

/Shu

tter

stoc

k

By Patroklos Papapetrou

SonarQubeas an Educational Platform

I've been using SonarQube[1] platform for more than four years. I remember the time when it was making its first baby steps as a code quality management tool. It looked more like a system that was integrated with various third-party static analysis tools (like PMD, FindBugs etc.) and provided a few but important code quality metrics.

Page 8: NDC Magazine

15

approach. Most of you, are probably familiar with code reviews or at least know the basics and the benefi ts of applying such a practice. SonarQube provides a built-in tool that facilitates the code review process.

In a few words, each issue can be assigned to a developer and can be also planned in an action plan. Code reviewers are able to confirm the issue, can mark it as a false-positive case by providing some additional reasoning for that, or just comment on it with some suggestions or possible solutions to fi x the problematic code.

All this issue-interactivity can be viewed as a way to teach people, especially young developers. Like the previous section, you can ask devel-opers to read comments or study the raised issues. A nice way of doing this, without needing to cut time from your development tasks, would be the fol-lowing. First prioritize SonarQube issues and plan them using action plans. For instance, you might have an action plan that includes all issues that should be fi xed during the current iteration and another one for future iterations. Then try to hold short meetings during the iteration where

you review all SonarQube issues and prioritize them. As soon as you fi nish and plan the required issues , let's say for the current iteration, you can ask the developers to work as a team and come to a solution, especially

for those issues that an one-line fi x is not enough. Finally document the solution by commenting the relevant issues so that everyone can see it. The benefi t of this approach is that devel-opers are required to understand the underlying broken coding rules for all issues (not only for the ones that they created) and then fi gure out the fi x.

CONCLUSIONEducating developers should be constant and continuous. But this is something that most companies forget, intentionally (lack of budget) or not (lack of time). If we try not to regard it as a necessary evil, but something that can take place during every day development tasks, then we might have a better chance. Sonar-Qube's coding rules and the easy-to-use coding review mechanism come to the rescue and can be put-upon to teach developers how to write better code and eventually make them better professionals.

REFERENCES1 http://www.sonarqube.org2 http://www.sonarsource.com3 http://docs.codehaus.org/display/ SONAR/SSLR 4 http://docs.codehaus.org/display/ SONAR/Issues5 http://docs.codehaus.org/display/ SONAR/Confi guring+Rules#Confi g- uringRules-TaggingRules

15

Let's take a look at the following image which is a snapshot of a java coding rule that checks if Object.equals is overridden when Object.compareTo is overridden. As you see, the rule is not only backed-up by a very detailed and well-argued explanation but it also contains two code snippets: a compliant and a not-compliant one.

Developers are able to read all this information when they are looking at an issue4 that violated this rule. They are supposed to understand what they did wrong, fi x it and hopefully don't make the same mistake again in the future. But hey!! You don't have to sit down and wait for SonarQube to raise an issue so that developers read

about the correct way of writing code. You can send the developers to study the rules anytime they want. In other words, educate them before a quality fl aw appears.

In the company I work with, we have filtered out the rules that are not aligned with our coding style and then we grouped them by using the tagging mechanism provided by SonarQube5. Then, we organized training sessions where we walked through every rule of a specifi c tag(group) and we dis-cussed the details of each rule and the suggested way of coding. That's all! We noticed that the developers started writing better code from the very next day and SonarQube's issues were very limited for the coding rules we have already discussed.

LEARNING FROM CODE REVIEWSIf you don't have enough time to allo-cate for the previous suggestion then you might consider an alternative

Patroklos Papapetrou is a Java architect, addicted to software quality and an agile team leader with more than 15 years of expe-rience in software de-velopment. He believes and invests in people and team spirit seeking quality excellence. He’s co-authoring “SonarQube in action” book, he is an active SonarQube community member and plugin contributor. He treats software systems as fl owers that’s why he prefers calling himself a software gardener.

Ticket types Price

All Access Pass (Workshops + Conference) NOK 18500 3 Day Conference Pass NOK 11500 2 Day Conference Pass NOK 10000 1 Day Conference Pass NOK 8500 2 Day Pre-Conference Workshop Pass NOK 9800 1 Day Pre-Conference Workshop Pass NOK 6800 2 Day Pre-Conf. Workshop + 1 Day Conf. Pass NOK 13000 2 Day Pre-Conf. Workshop + 2 Day Conf. Pass NOK 16000 Pre-Conference Workshops 2-3 June 25% VAT will be added to all ticket types.

Get all access to a whole week of inspiration or mix and match as you like

ndcoslo.com

Java 8

Core Spring

19. November in Oslo with Venkat Subramaniam

24. June, 16. September and 04 November in Oslo With Mårten Haglind

With the introduction of lambda expressions and method references in Java 8, we can now make use of functional style of programming. This course is designed, by author of the fi rst book on Java 8 to hit the market, to help you make a quick and effective transition to Java 8 and its functional capabilities.

In this four–day bootcamp you learn how to use the Spring Framework to create well–designed, testable business applications in an agile manner. Students build a Spring–powered JEE application that demonstrates the Spring Framework and other Spring technologies in an intensely productive, hands–on setting.and its functional capabilities.

For complete course descriptions, time and place, visit www.programutvikling.no

Page 9: NDC Magazine

ndcoslo.com@NDC_conferences #ndcoslo

We are proud to present the seventh NDC. Thanks to our inspiring partners who make it happen!

For information about partnership deals, please contact:[email protected] tel.: +47 93 41 03 57

Inspiring Developers

SINCE 2008

Become a partner today!

Page 10: NDC Magazine

18 19

MODULAR JAVASCRIPTThe starting point in building a maintainable front-end is to modularize your JavaScript code. Modules help to sep-arate the concerns in the app you build. As a side effect of JavaScript modules creation, your code will be more testable and more reusable and of course smaller. You can create modules using native JavaScript patterns such as module and the revealing module patterns. Another option to create modules is using a library such as RequireJS or Almond. ECMAScript 6, the next version of JavaScript, will include a module keyword and will enable the creation of modules easily. Up until that is going to happen, you should use JavaScript patterns.

THE MODULE PATTERNThe module pattern is very straight forward. It uses the fact that JavaScript has function scopes to encapsulate the internals of the module. Lisiting 1 shows a code snippet for the module pattern structure.

Listing 1 – Module Pattern Structure

var Module = function () { // private members // private functions

return { // public members };}

As you can see in Listing 1, each module has private mem-bers and functions and you return a JavaScript literal object which is the façade to the module internals. You can create a lot of module instances from the module template that you’ve created. Listing 2 shows a code snippet of a more specifi c example that uses the module pattern:

Listing 2 – Creating a Car Module Using the Module Pattern

var Car = function (elmId) { // private members var elm = document.getElementById(elmId), speed = 0;

return { // public members drive: function (newSpeed) { speed = newSpeed; elm.innerHTML = 'current speed: ' + speed; } };}

// later in codevar car = new Car('carElement');car.drive(100);

In the Listing 2 you can see that we are creating a module called Car. The Car module includes two private members – elm and speed. The module itself exposes a function called drive that is used to change the speed of the car and to write to a HTML element the current speed.

THE REVEALING MODULE PATTERNThe revealing module pattern resembles the module pattern but with a small change. In the revealing module pattern you use an immediate function execution expression (IFEE) to create only one module instance. Listing 3 shows a code snippet of the revealing module pattern structure.

Listing 3 – Revealing Module Pattern Structure

var module = function () { // private members // private functions

return { // public members };}();

In the last few years, web development has shifted from working mostly in the backend for rendering and operations toward front-end development. Today, most of the web apps that we are building will have a rich front-end that is implemented by proven design patterns like modules and MVW. This article will explain some of the modern web app architecture building blocks.

By Gil Fink

© W

inM

aste

r/Sh

utte

rsto

ck

Overview of Modern Web Front-End Architecture

Page 11: NDC Magazine

20 21

MODERN WEB APP ARCHITECTUREWhen building web apps, you will combine both modular JavaScript and a MVW framework. In Figure 3 you can see how MVW framework is used in the front-end as a tool to separate concerns:

Figure 3. Modern Web Architecture

Note: The diagram includes also a backend implemented by ASP.NET which is non-relevant to the discussion in the article.

In the browser area what you see is how a logical module in the app will look like in modern web architecture. The module has view/s, controller/ViewModel, and model and if needed a data service to interact with the server. Each module interacts with the application core that is built upon core JavaScript libraries such as jQuery and AngularJS. App architecture is constructed with a lot of modules, applica-tion core and a mediator/event aggregator, which decouples the modules from each other. Figure 4 shows a high level diagram of a front-end architecture from another aspect.

Figure 4. Modern Web Architecture from the Point of Modules

In Figure 4 you can see how the logical modules are sepa-rated. Each module has its own implementation and the way modules communicate is through a mediator/event aggre-gator. The application core exposes the core libraries like jQuery or Backbone.js through the façade to each module. Using this separation will help you to manage your code and your modules easier.

SUMMARYModern web applications use JavaScript heavily. In order to create a more robust solution, you will have to use modules and MVW framework as part of your architecture. Building a web application is not an easy task but with today’s tools and patterns it is becoming easier.

Note: Some of the content in this article was taken from Pro Single Page Application Development book.

As you can see from Listing 3, you run the module creation code inside an IFEE and that will create a singleton module. Listing 4 is an example of how to use the revealing module pattern with a car module.

Listing 4 – Using Revealing Module Pattern to Create a Car Module

var car = function (elmId) { // private members and functions var elm = document.getElementById(elmId), speed = 0, doDrive = function (newSpeed) { speed = newSpeed; elm.innerHTML = 'current speed: ' + speed; };

return { // public members drive: doDrive };}('elmId');

// later in the codecar.drive(100);

In the code, you can see that the car module includes two private variables, elm and speed, and one private function, doDrive. Later on, you return the façade for the module that might not look like the inner implementation (doDrive is exposed as drive).

There are more module patterns that you can use such as prototype pattern or revealing prototype pattern. You can use these patterns to create JavaScript modules or you can use a library such as RequireJS or Almond to manage and create modules.

MVWIn most of the web apps that you are going to build, you will probably use some sort of MVW framework such as Angu-larJS or Ember. The MVW acronym stands for Model/View/Whatever where most of the framework/libraries use the model and view and add more components. MVW frame-works are mainly based on MVC and MVVM patterns. The frameworks help us to separate the app concerns in the front-end and help to structure your JavaScript code.

MVC MVC is one of the famous UI patterns which is wide spread in web development. The acronym stands for Model/View/Controller. Each of the MVC parts has its own purpose:

1. The model represents the application core and mostly is used as a data structure.

2. The view is the display of the model.

3. The controller handles input and is responsible to pass the model to the view.

Figure 1 shows the MVC parts and how they communicate with each other:

Figure 1. MVC Pattern

MVC helps to separate different concerns like handling inputs, UI and data. AngularJS uses the MVC pattern in its architecture.

MVVMMVVM is another known UI pattern. The acronym stands for Model/View/ViewModel. Each of the MVVM parts has its own purpose:

1. The model represents the application core and mostly is used as data structure.

2. The view is the display of the model.

3. The ViewModel handles UI input and is responsible for one/two way binding between the view and the model.

The difference between MVC and MVVM is the ViewModel responsibility. While controllers can serve more than one view, the ViewModel is bounded only to one view. Moreover, the ViewModel is used as a container for data and com-mands that the view can use and not as an orchestrator like controllers in MVC. Figure 2 shows the MVVM parts:

Figure 2 – MVVM Pattern

MVVM helps to separate different concerns like handling inputs, UI and data. KnockoutJS is an example of a JavaS-cript library that implements the MVVM pattern.

Gil Fink is a web development expert and Micrsoft ASP.Net MVP. He is currently consulting for various companies, where he helps to develop Web solutions. He is also co-author of several Microsoft Official Courses (MOCs) and training kits, co-author of "Pro Single Page Application Develop-ment" book (Apress) and the founder of Front-End.IL Meetup.

Page 12: NDC Magazine

The documentation provided guidance on how to imple-ment MVVM with navigation and app lifecycle manage-ment, validation, manage application data, implement controls, accessible and localizable pages, touch, search, tiles, and tile notifications. It also provided guidance on testing an app and tuning its performance.

In January 2014 the guide was updated for Windows 8.1 and Visual Studio 2013 and can be found on the Windows Developer Center2.

WHAT IS PRISM FOR THE WINDOWS RUNTIME?Developers of Windows Store business apps face sev-eral challenges. App requirements can change over time. New business opportunities and challenges may present themselves. Ongoing customer feedback during develop-ment may significantly affect the requirements of the app. Therefore it's important to build an app that it is flexible and can be easily modified or extended over time.

Prism for the Windows Runtime provides an architecture that helps to do just that. It is designed to help developers create apps that need to accomplish the following:

• Address the common Windows Store app development scenarios.

• Separate the concerns of presentation, presentation logic, and model through support for Model-View-View-Model (MVVM).

• Use an architectural infrastructure to produce a consist-ent and high quality app.

The logical architecture of a typical Windows Store app that uses Prism is shown in the following diagram.

This architecture helps to produce flexible, maintainable, and testable apps. It includes components that help to accelerate development of your app by providing sup-port for MVVM, loosely coupled communication, and the core services required in Windows Store apps, allow-ing you to focus on developing the user experiences for your app. For more info see Getting started using Prism for the Windows Runtime3, and Using Prism to create a Windows Store app4.

Many of you will be familiar with Prism, a patterns & practices1 release that helps you to design and build composite applications. In May 2013 the patterns & practices team released a new guide for Windows 8 about creating Windows Store apps using C# and XAML. The guide came with source code for Prism for the Windows Runtime, source code for the AdventureWorks Shopper product catalog and shopping cart reference implementation, and documentation.

23© P

ete

Salo

utos

/Shu

tter

stoc

k

By David Britch

Accelerating Windows Store app development using Prism for the Windows Runtime

Page 13: NDC Magazine

24 25

an attached property, AutoWireViewModel, which is used to manage the instantiation of view models and their associa-tion to views. In the view's XAML this attached property is set to true to indicate that the view model class should be automatically instantiated from the view class.

XAML

prism:ViewModelLocator.AutoWireViewModel="true"

The ViewModelLocator object uses this convention-based approach to resolve the correct view model type. The view model factory, set by the MvvmAppBase class, uses the dependency injection container to construct view model instances whose dependencies are injected by the con-tainer. When the view model instances are constructed, dependencies specified by the constructor parameters are resolved by the container and then passed into the view model. This approach removes the need for an object to locate its dependencies or manage their lifetimes, allows swapping of implemented dependencies without affecting the object, and facilitates testability by allowing depend-encies to be mocked.

If you run the app and navigate to the PhotoPage, and then suspend and terminate the app, on reactivating the app the previously loaded photo will be displayed. This is because the path to the photo is passed to PhotoPage as a naviga-tion parameter, which is automatically serialized to disk by the Prism.StoreApps library when the app suspends. In addition, if you have view model properties whose values you want to survive termination, you should mark them with the custom [RestorableState] attribute.

C#

[RestorableState]public bool IsGreyscale { get; set; }

When the page is navigated away from the data contained in any properties marked with the custom [Restorable State] attribute is serialized to disk. Then when the app

is reactivated, any properties that are marked with the custom [RestorableState] attribute will have their values restored from disk. All this work is performed by the Prism.StoreApps library. For details of how Prism undertakes this operation see Handling suspend, resume, and activa-tion12.

SUMMARYPrism for the Windows Runtime can accelerate the devel-opment of Windows Store apps by providing support for MVVM and the core services required in Windows Store apps. For a bigger app that demonstrates all of the fea-tures of Prism for the Windows Runtime see Developing a Windows Store business app using C#, XAML, and Prism for the Windows Runtime2.

HOW DOES PRISM FOR THE WINDOWS RUNTIME SHIP?Prism for the Windows Runtime ships as two libraries that help developers create managed Windows Store apps:

• The Microsoft.Practices.Prism.StoreApps5 library provides support for bootstrapping MVVM apps, state management, validation of user input, navigation, data binding, commands, and settings.

• The Microsoft.Practices.Prism.PubSubEvents6 Portable Class Library allows communication between loosely cou-pled components in an app, thus helping to reduce depend-encies between assemblies in a Visual Studio solution.

In addition, the libraries are also available as NuGet pack-ages, and their source code can be downloaded as part of the AdventureWorks Shopper7 product catalog and shop-ping cart reference implementation.

USING PRISM FOR THE WINDOWS RUNTIMEIn order to demonstrate using Prism for the Windows Runt-ime, I've written a sample photo viewing app, which can be downloaded here8. In the app, there are two pages. The first page presents a thumbnail gallery view of photos in the users Pictures library. Clicking on a thumbnail takes the user to the second page which displays the full image and allows it to be converted to greyscale. In the app, sup-port for MVVM, navigation, and state management are all provided by Prism for the Windows Runtime.

The first step in using Prism for the Windows Runtime is to add a reference to the Microsoft.Practices.Prism.StoreApps5 library to your project, in order to use the services provided by the library. The MvvmAppBase class provides core startup behaviour for an MVVM app, with its constructor being the entry point for the app. Your App class should then derive from the MvvmAppBase class, and add app specific startup behaviour such as the page to navigate to when the app starts.

There are two view classes in the app, MainPage and PhotoP-age, that bind to the MainPageViewModel and PhotoPageView-Model classes respectively. Each view class derives from the VisualStateAwarePage class, provided by the Prism.StoreApps library, that provides view management and navigation support. Each view model class derives from the ViewModel class, provided by the Prism.StoreApps library, that provides support for property change noti-fication, navigation, and suspend/resume functionality. A static ViewModelLocator object, provided by the Prism.StoreApps library, is used to manage the instantiation of view models and their association to views.

A required override in the App class is the OnLaunchApplica-tion method, from where you will typically perform your initial navigation to a launch page.

C#

This method uses the NavigationService, provided by the Prism.StoreApps library, to navigate to the MainPage in the app when it launches. "Main" is specified as the logi-cal name of the view that will be navigated to. The default convention specified in the MvvmAppBase class is to append "Page" to the name and look for that page in a .Views child namespace in the project. Alternatively, another conven-tion can be specified by overriding the GetPageType method in the MvvmAppBase class. Please note that the OnLaunchAp-plication method returns a Task in order to allow it to launch a long running operation. If you don't have a long running operation to launch you should return an empty Task.

App specific initialization behaviour is specified in the OnInitialize method in the App class. In the case of the sample app this involves registering types and instances that will be used in the view model constructors with the Unity9 dependency injection container. However, Prism for the Windows Runtime is not dependent on Unity. Instead you can register a factory with the ViewModelLocator object that will create a view model instance that will be associ-ated with a view. For more info see Using Prism for the Windows Runtime4.

C#

This method registers the FileSystemRepository type with the container, as a singleton, based on its interface, so that the view model classes can take a dependency on it.

Because the sample app uses Unity, the Resolve method from the MvvmAppBase class is overridden in the App class to return a constructed view model instance.

C#

protected override object Resolve(Type type){ return _container.Resolve(type);}

This method override is used by the ViewModelLocator object to set a factory for the ViewModelLocator to use the container to construct view models so that their depend-encies are injected.

The ViewModelLocator object, provided by the Prism.Store-Apps library, uses a convention-based approach to locate and instantiate view models from views. This convention assumes that view models are in the same assembly as the view types, that view models are in a .ViewModels child namespace, that views are in a .Views namespace, and that view model names correspond with view names and end with "ViewModel". The ViewModelLocator object has

David Britch is a Principal Technologist at CM Group Ltd., and for the past two and a half years has been working on a number of projects with the patterns & practices group at Microsoft. David has authored and contributed to a range of recent software development publications including books, guidance documen-tation, and reference implementations.

protected override void OnInitialize(IActivatedEventArgs args){ _container.RegisterType<IRepository, FileSystemRepository> (new ContainerControlledLifetimeManager());}

protected override Task OnLaunchApplication(LaunchActivatedEventArgs args){ NavigationService.Navigate("Main", null); return Task.FromResult<object>(null);}

REFERENCES 1 http://pnp.azurewebsites.net/en-us/ 2 http://msdn.microsoft.com/en-us/library/windows/apps/xx130643.aspx3http://msdn.microsoft.com/en-us/library/windows/apps/xx130645.aspx4 http://msdn.microsoft.com/en-us/library/windows/apps/xx130642.aspx5 http://www.nuget.org/packages/Prism.StoreApps/6https://www.nuget.org/packages/Prism.PubSubEvents/7 http://code.msdn.microsoft.com/windowsapps/Prism-for-the-Windows-86b8fb728 https://onedrive.live.com/?cid=1b98b9a3cc9eb1aa&id=1B98B9A3CC9EB1AA%21198&ithint=file,. zip&authkey=!AAfxN7ip13lJtWA9 http://msdn.microsoft.com/en-us/library/ff647202.aspx10 http://msdn.microsoft.com/en-us/library/windows/apps/xx130647.aspx

Page 14: NDC Magazine

26

On an average day you probably don’t notice the laws of physics, but you would if they went missing or changed suddenly. The world around you would stop feeling real. This is how a game can feel when the maker ignores physics or gets the rules wrong.

27

By Richard Garside

LET’S GET PHYSICALwith MonoGame and the Farseer Physics Engine

Implementing these rules right can be tricky, which is why it’s often a good idea to stand on the shoulders of giants and use an existing physics engine. One such engine is the Farseer Physics Engine.

The Farseer Physics Engine (FPE) is based on a well-known physics engine called Box2D originally written in C++. Although FPE was written for XNA, it also works with MonoGame. In this article we’re only really going to scratch the surface of what you can do with FPE. Although simple and easy to implement, the effects will be fantas-tic and newtonianally beautiful.

LET’S GET STARTEDSo, I’ve had a completely original idea for a physics based Windows 8 game. It’s called Angry Nerds. In this game you can pick up a nerd and throw him at a pile of other nerds. All the nerds will bounce and interact in a physically

realistic way. They will probably also become angry.

After you’ve installed the latest version of MonoGame from www.monogame.net you can use the new MonoGame Windows 8 XAML pro-ject template in Visual Studio. Next, use nugget to install the MonoGame Windows 8 Farseer Physics Engine. You now have everything you need to get going. You can find the complete source code at:www.bitbucket.org/NogginBox/mono-game-farseer-physics-engine-demo

THE WORLDThe FPE World is an object manager. It keeps track of all the physical bodies you create, how they interact over time and it also knows about gravity.

In the main game class Initialise method; set up your world as a class field like so:

© K

osto

v/Sh

utte

rsto

ck

protected override void Initialize(){ // Setup world with downwards gravity and add a border to stop us // loosing objects _world = new World(new Vector2(0, 1f)); var border = new SpriteBorder(_world, Window.ClientBounds); // Setup touch and enable make mouse visible IsMouseVisible = true; base.Initialize();}

Page 15: NDC Magazine

28 29

This gives the world normal downwards gravity. You can play with both the direction and the force of gravity. If you were making a table air hockey game you’d want to have zero gravity.

I’ve also created a SpriteBorder to stop our Angry Nerds escaping the confi nes of the game. SpriteBorder is a class of my own creation that you can check out in the source code. It creates a loop shape body that our nerd bodies are inside and will bounce off. We’ll learn about bodies shortly.In MonoGame the game loop repeatedly updates the posi-tions of all objects in the Update method. Our FPE World now takes care of most of this when we call step on it. We do this in the Update method in our main game class:

Now we just need to add some bodies into this world and also touch controls that will introduce external forces to these bodies.

SPRITE BODIESIn a 2D MonoGame game we typically draw 2D textures to the screen as sprites. FPE lets us create bodies that we add to the world. A body has a position, a shape and prop-erties like friction. In our example we will create a simple one, but you can create more complicated composite and jointed objects.

We’ll create a new class called SpriteBody. This class will contain a FPE body that will deal with how our sprite physi-cally behaves and it will contain a texture that we’ll draw to screen. FPE has a BodyFactory which makes the process of creating a number of common body types really easy. Our nerds are going to be circular so we need to create a circular body. I do this in the SpriteBody constructor:

The BodyFactory can make several different types of bod-ies such as rectangles, loops, breakable bodies and many more. For us a circle will do just fi ne.

29

While using FPE it is easy to get confused about units. As many games will zoom in and out pixels are not always con-stant. So FPE uses sim units and when we get units in pixels from things like textures or from touch input we need to con-vert them to sim units. When we draw bodies to screen we need to convert the FPE sim units back to pixels which are display units.

Her are three FPE static methods that deal with sim and dis-play units:

You only really need to set ratio if you change the zoom level on your game. In Angry Nerds it stays the same so we can ignore that for now.

In this constructor we also store a texture and work out an offset for it because the origin in FPE is the centre of our object, but for drawing textures it is the top left corner.

DRAWING OUR SPRITEBODYThe draw method for SpriteBody is very simple:

Our FPE body knows its Position, so all we need to do is con-vert that to display units to show on the screen.

UPDATING OUR SPRITEBODYThe FPE world will keep track of any internal forces and the movement of our bodies, but if we want to introduce external forces then we need to apply these. In Angry Nerds a player can touch and drag a nerd. They are effectively applying a force to the nerd. If a nerd is dragged we apply a force using this method:

The force is a vector containing the x and y component of the delta of the drag motion in pixels. I’ve multiplied this by 5 to give the drag action some welly.

The drag action input is collected in the main game class. You can see how this works by downloading the source for this sample.

ALL DONESo, hopefully you can see that using FPE in your game is really simple. All you need to do is create your physical bodies, apply forces to them and then call Step on the World to update everything. FPE then does all the hard work keeping track of your bodies’ movement and interactions with each other. It’s very easy and the results are very impressive.

Richard Garside is a freelance mobile/web developer who likes to make games in his free time. You can fi nd out more about him at his website www.nogginbox.co.uk and you can fi nd out about his latest Mono-Game game at www.towerblocks.net

28

// Variable time step but never less than 30 Hz _world.Step(Math.Min((fl oat)gameTime.ElapsedGameTime.TotalSeconds, (1f / 30f)));

public SpriteBody(World world, Texture2D texture, Vector2 positionInPixels){ _body = BodyFactory.CreateCircle(world, radius: ConvertUnits.ToSimUnits(texture.Width) / 2f, density: 10f, position: ConvertUnits.ToSimUnits(positionInPixels)); _body.BodyType = BodyType.Dynamic; _body.Restitution = 0.8f; _body.Friction = 1f; _texture = texture; // The texture is drawn using top left coords, so work out offset to use _textureOffset = new Vector2(texture.Width / 2f, texture.Height / 2f); }

ConvertUnits.SetDisplayUnitToSimUnitRatio(displayUnitsPerSimUnit);ConvertUnits.ToDisplayUnits(simUnits);ConvertUnits.ToSimUnits(displayUnits);

public void Draw(SpriteBatch spriteBatch){ spriteBatch.Draw(_texture, ConvertUnits.ToDisplayUnits(_body.Position) - _textureOffset);}

public void UpdateApplyForce(Vector2 forceInPixels){ _body.ApplyForce(forceInPixels * 5);}

Page 16: NDC Magazine

30

Oscar knows that requirements have a way of changing over time, and proceeds to write an extensible validator:

Oscar is a serious engineer, and wouldn’t ship anything untested, so he also adds some tests, using his favorite language, F#:

Monday, 9 am. Oscar, developer at Initech, has been given the following task: implement a password-strength validator for the website. The current requirements are minimal: a password shorter than 8 characters should not be valid.

31© b

loom

ua/S

hutt

erst

ock

By Mathias Brandewinder

FsCheck: smarter validation withProperty-based testing

public interface IRule{ bool IsSatisfi ed(string password);}

public class MinLength : IRule{ public bool IsSatisfi ed(string password) { return password.Length >= 8; }}

public class Validator{ private readonly IEnumerable<IRule> rules;

public Validator(IEnumerable<IRule> rules) { this.rules = rules; }

public bool IsValid(string pwd) { return this.rules.All(x => x.IsSatisfi ed(pwd)); }}

[<Fact>]member test.``When length is < 8 rule is not satisfi ed`` () = let pwd = "1234567" let rule = MinLength() Assert.False(rule.IsSatisfi ed(pwd))

[<Fact>]member test.``When length is >= 8 rule is satisfi ed`` () = let pwd = "12345678" let condition = MinLength() Assert.True(condition.IsSatisfi ed(pwd))

[<Fact>]member test.``When a rule fails, password is not valid`` () = let rule = { new IRule with member this.IsSatisfi ed(pwd) = false } let validator = Validator([rule]) Assert.False(validator.IsValid("anything"))

This is all fairly typical code: a couple of unit tests, checking for positive and negative cases on concrete implementations, and stubs to validate against interfaces. This works great in most

Page 17: NDC Magazine

32

Mathias Brandewinder has been developing software on .NET for about 10 years, and loving every minute of it, except maybe for a few release days. His language of choice was C#, until he discovered F# and fell in love with it. He enjoys arguing about code and how to make it better, and gets very excited when discuss-ing TDD or F#. His other professional interests include math, forecasting, machine learning and probability. Mathias is a Microsoft F# MVP and the founder of Clear Lines Consulting.let ``check Validator`` (pwd:string) =

let minLength = MinLength() let maxLength = MaxLength() let validator = Validator([minLength;maxLength]) (minLength.IsSatisfi ed(pwd) && maxLength.IsSatisfi ed(pwd)) ==> validator.IsValid(pwd)

situations, but one could make the following comment: the tests don’t do exactly what they say they do. If I were to tell you “I saw one black dog, therefore I validated that all dogs are black”, you would probably point out that my logic is fl awed. And yet, this is precisely what we do here: to prove that all passwords of length greater than 8 are valid, we simply check one arbitrary example, and leave it at that. Of course, we cannot really prove the general statement, but verifying it on a wider range of cases rather than this particular one would reinforce our confi dence. The reason we don’t is that it would be painful to manually generate more cases.

But then, we are software engineers, and what software engineers do is automate anything that can be automated. This is where FsCheck, an F# testing library inspired by Haskell’s QuickCheck, comes in. Instead of relying on individual test cases, you supply FsCheck with general properties that should be true about your code, and let the library try to prove you wrong by generating test cases and validating them. As an example, here is how you could rewrite the fi rst test:

The fi rst part defi nes a property that you expect to be true. The funky ==> operator represents a logical implication: if the premise on the left is true, then the conclusion on the

right should also hold. Once that property is defi ned, it can be passed to Check.Quick, which will attempt to fi nd counter-examples. In this particular case, the result will be “Ok, passed 100 tests.”; FsCheck cannot disprove your assertion. If we introduced a bug, for instance by changing the code to pwd.Length < 9, FsCheck would come back with the following: “Falsifi able, after 14 tests […]: "aaaaaaaa"”. Not only did it prove the existence of a bug, it even gave you a failing case. Pretty nifty!

One of the interesting benefi ts of this approach is that it can simplify integration tests, and improve tests main-tainability. While we validated the Validator (so to speak) using stubs, at some point, we might want to check that it actually works with the “real” rules. Imagine for a minute that we added requirements such as “should contain at least one digit, one upper-case character,…” and the like. Generating test cases for all the possible combinations is an incredibly tedious and error-prone activity. It is also fragile: any change in the requirements (“we actually need at least 3 digits”) will require a rewrite of all test cases. By contrast, you could let FsCheck do all the heavy lifting, by directly expressing your requirements:

let ``Password length < 8 is invalid`` (pwd:string) = let rule = MinLength() pwd.Length < 8 ==> not (rule.IsSatisfi ed(pwd))

Check.Quick ``Password length < 8 is invalid``

For the sake of simplicity, I only added 2 rules, constraining the password to be at least 8, and at most 12 characters long – and omitted the reverse test. Instead of manually creating test cases covering all combinations, I can now simply feed the property to FsCheck, with the following result: “Arguments exhausted after 56 tests”. FsCheck generated 100 test cases, 56 of which satisfi ed the pre-condition, and passed the test. The beauty here is that if the requirements were to change (an unrealistic scenario, of course), and the maximum length were to become 16 characters, I wouldn’t have to recreate test cases or change anything.

As a parting thought, consider now the following: imag-ine that I forced the minimum and maximum length to be, say, 8 and 6. What would happen? FsCheck produces the following result: “Arguments exhausted after 0 tests”. FsCheck generated 100 test cases, and couldn’t fi nd a single one to validate against. Of course, this is an absurd requirement: no password can be simultaneously longer than 8 and shorter than 6. But that is precisely the point: all the pieces of code are behaving correctly in isolation, but put together, they are incoherent, and the Validator would never work. No amount of mocking will catch that, but FsCheck does.

So where does this leave us? My hope is that with this short example, I managed to convey why FsCheck is a great complement to traditional unit tests. There is much more to it than what I showed here, so I hope you’ll take a look, and fi gure out how to use it to make your code even better!

33

© b

loom

ua/S

hutt

erst

ock

Page 18: NDC Magazine

34 35

var myCollection = new List<Order>(); // add orders...

// sort collectionvar myFilteredCollection = FilterCollectionByDate(myCollection);

// fi lter sorted collectionvar mySortedAndFilteredCollection = SortCollectionByName(myFilteredCollection);

If we look at that code, we immediately notice it’s not exactly concise, nor is it very readable. What if we could write it as such:

var myFilteredAndSortedCollection = myCollection.Where(...).OrderBy(...)

Let’s start out with a little bit of code. Imagine you have a collection of orders, and you want to fi lter that collection, and then sort it. To achieve that, you could write (pseudo) code like this, having different methods to sort and fi lter the collection that return the sorted, respectively fi ltered collection:

That should look quite familiar to most: we’ve just rewritten the fi rst code sample as a fl uent API. In fact, if you’ve ever used LINQ, you know what this is.

A MORE EXACT DEFINITIONNow that’s clear, we can have a look at a more exact defi nition – and where better to look than at what Martin Fowler has to say on the subject1? He describes the term “Fluent Interface” (often named fl uent API) as an API designed primarily to be readable (cfr natural language) and to fl ow. It should then result in a more concise coding experience. That said, creating a fl uent interface for objects does increase complexity (slightly), but moreover: it defi nitely requires additional effort to design something like this. Therefore, it’s best suited for a specifi c set of requirements: mocking and confi guration components2 or validation components3 are pretty good cases to consider a fl uent API for, while the typi-cal object instantiation (for example: a bunch of employees & their projects for the typical administrative application) probably isn’t the best use case to consider this for due to the added complexity & effort.

When I talk about complexity and effort, I’m not talking about the code required for this (as we’ll see later on, that part is pretty simple) – the complexity is more related to the amount of thought required to correctly design something like this. In reality, I often see these types of interfaces when designing a reusable, redistributable component.

As C# developers, we’re used to fl uent API’s, even though we might not even know we’re using them. Let’s have a look at what they are, when they make sense, and how a basic implementation of this design principle looks.

By Kevin Dockx

© n

med

ia /S

hutt

erst

ock

A Few Words on

Fluent API’s

Page 19: NDC Magazine

36 37

The method chaining is achieved by having the Sort and Filter methods return the FluentCollectionBuilder, which allows for further sorting, filtering, …

Now, we can write code to filter and sort through our newly-created fluent API:

And that’s all there is to it, from the technical POV.

Note that this is of course just one way to create a Fluent API – other implementations go a bit further and use, for example, extensions methods on IEnumerable<T> which would in turn call a method on the FluentCollectionBuilder to filter, sort, … that allows method chaining in existing collection types instead of having to create our own col-lection type.

While implementations can differ, the principle remains the same: we enable method chaining through methods that return the class instance they’re working on.

CONCLUSIONIn conclusion: fluent API’s aren’t suitable for all cases, but they do make sense for some cases like configuration, vali-dation components, … While the guidelines of what makes for a good fluent API are somewhat unclear and debatable (and, in fact, not followed by any of the fluent API’s I’ve seen, not even LINQ), the main reason for their existence is better, more natural readability & flow. From a technical point of view, it’s a pretty simple case of method chaining, the true effort and complexity lies in correctly designing an inter-face like this, and not in the code itself.

Happy coding! :)

REFERENCES1http://martinfowler.com/bliki/FluentInterface.html2https://github.com/maartenba/MvcSiteMapProvider 3http://fluentvalidation.codeplex.com/

GUIDELINESNow we know what it is & what good cases to consider it for are, we should have a look at the guidelines to consider. And this is where it gets… complicated, as there isn’t really agreement on this. In its most broad definition, a fluent API allows creating chains by returning the same type of output as it gets as input (if we’re starting from a collection, we should continue to work on that collection) and by allowing independent methods to be called on that input, in any order.

That creates problems, of course. Let’s have a look at our example again: what if we want to add a .Sum to our sorted & filtered collection? That will no longer return the collection (input != output). We just broke our chain, but from a busi-ness point of view, it makes sense. And here’s another prob-lem with that guideline: it’s easy to imagine a case where it doesn’t make sense that we can call any method in any order.

From where I’m standing, I’d say these guidelines are just that: guidelines, not requirements – but important guide-lines nevertheless. With this in the back of our heads, I think it’s quickly becoming clear that designing something like this requires quite some effort, and therefore isn’t justifi-able for all case.

TECHNICAL IMPLEMENTATIONBut so far for the principles. After all this, you’re prob-ably wondering how you can go about creating this your-self, right? From a technical point of view, this is a case of method chaining. In the following pseudo code sample (only the parts relevant to the fluent API are included!), I’ve created a custom collection type that supports method chaining for sorting and filtering through a FluentCollec-tionBuilder class:

public class MyCollection<T> : List<T>{ private readonly FluentCollectionBuilder<MyCollection<T>, T> _collectionBuilder; public FluentCollectionBuilder<MyCollection<T>, T> Set { get { return _collectionBuilder; } }

public MyCollection() { _collectionBuilder = new FluentCollectionBuilder< MyCollection<T>, T>(this); }

public class FluentCollectionBuilder<TEnum, T> where TEnum : MyCollection<T> {

private readonly MyCollection<T> _collection;

public FluentCollectionBuilder(MyCollection<T> collection) { _collection = collection; }

public FluentCollectionBuilder<TEnum, T> Sort<TKey>(Func<T, TKey> sortExpression) { // execute sort on the collection... SortCollectionByExpression(sortExpression);

// return "this" to allow method chaning return this; }

public FluentCollectionBuilder<TEnum, T> Filter(Func<T, bool> filterExpression) { // execute sort on the collection... FilterCollectionByExpression(filterExpression); // return "this" to allow method chaning return this; } }}

NOTE: this code can of course be improved upon – it’s

typed to our own collec-tion type and works on

implementations instead of interfaces, but it’s

the most basic way to show how to implement method chaining, which

is the purpose of this paragraph.

var myCollection = new MyCollection<Order>();myCollection.Set.Filter(order => order.Name == "Laptop").Sort(order => order.OrderDate);

Kevin Dockx lives in Ant-werp (Belgium) and works at RealDolmen where he is a 32-year old Solution Architect, focussed on mobile in general & .NET/XAML in particular.

He's a Microsoft MVP (Client Dev), a Pluralsight, best-selling book & article author, board member of the RD MS Community, and a regular speaker at various (inter)national events.

Page 20: NDC Magazine

One of the talks was the relation between technical depth and breadth of an architect and why it so important to know the difference between them. In this article I will summarize this topic, which is relevant for not only architects but also for developers.

A good architect is an architect who knows the pros and cons about many topics – not an architect who is an expert on everything or a single technology. The knowledge that an architect have has to be maintained, while at the same time investigating and identifying topics the architect don’t know anything about. The rela-tion between what you do know and what you don’t know can be illustrated with the following triangle:

The figure shows the relationship between technical depth (things you know a lot about and your expertise) and technical breadth (things you know about but are not expert on). On top of the triangular, which is also the smallest of size, is your technical expertise. Knowledge in this area is typically things you work on a daily basis or information you have gath-ered through the years and you can easily explain and learn it to others.

In the middle of the triangle, which is a part of your technical breadth, is the area where you have information about everything else. This is typically things you have analyzed and identi-fi ed without have an in-depth knowl-edge. The latter, could for instance be pros and cons of some certain technology or platform. At the bot-tom of the triangle is a huge area of knowledge that you don’t know you don’t know.

In theirs talks, Neal Ford and Mark Richards recommended that an architect should investigate, stay updated and identify knowledge with-out becoming an expert on every bits and details of that technology. Doing that, you will be able to lift unknown

unknowns to the middle of the trian-gle and hence expand your technical breadth. With time and experience you might one day lift that knowledge to the top of the triangle and make it become a part of your technical depth.

The illustration also shows that tech-nical breadth in fact is the sum of your expertise and the information that you only have some knowledge about. A good technical breadth makes you

stronger in architectural discussions and also makes you a better leader. The overall advantages of this is that you become a better problem solver and makes you able to discuss tech-nologies by showing examples and differences without actually being an expert on those technologies. Therefore, focus on the middle part of the triangle – that is – information you know about and lift more knowl-edge from the unknown unknowns to the known unknowns, Mark Richards explained.

Finally, I want to cite Neal Ford’s com-ment about an architect’s knowledge: An architect should understand why things work, not the mechanics of how they work.

20. Mars this year, ProgramUtvikling successfully organized the “Archi-tecture Day” event, with Neal Ford, Mark Richards and Venkat Subrama-niam as the main speakers. The Architecture Day event was a full day focused on topics such as the journey from developer to architect, expec-tations for and the roles of an architect, software design architecture and principles and much more.

39© to

tally

Pic/

Shu

tter

stoc

k

By Dervis Mansuroglu

The technical depth

Dervis is senior Java developer, a technology and community enthusi-ast, active member of JavaBin, blogger, open source coder. He works for Inmeta Consulting in Oslo Norway and has almost fi ve years of experience with front and backend development from sectors such as banking, health-care, energy and media.

and breadth of

an Architect

Page 21: NDC Magazine

Ticket types Price

All Access Pass (Workshops + Conference) NOK 18500 3 Day Conference Pass NOK 11500 2 Day Conference Pass NOK 10000 1 Day Conference Pass NOK 8500 2 Day Pre-Conference Workshop Pass NOK 9800 1 Day Pre-Conference Workshop Pass NOK 6800 2 Day Pre-Conf. Workshop + 1 Day Conf. Pass NOK 13000 2 Day Pre-Conf. Workshop + 2 Day Conf. Pass NOK 16000 25% VAT will be added to all ticket types.

mix and match

be inspiredsign up now!

Get all access to a whole week of inspirationor mix and match as you like

Inspiring Developers

SINCE 2008

Keynote: Luke Wroblewski (US)

2 DAYS OF WORKSHOPS3 DAYS OF CONFERENCE TALKS

Oslo Spektrum

Developers

Oslo SpektrumOslo Spektrum

ndcoslo.com@NDC_conferences #ndcoslo

Page 22: NDC Magazine

42

Type inference has also been available for local variables in C# since the version 3.0, as shown in this statement:

var n = 42;

It works in a similar way in F#:

let n = 42

But in F# type inference goes far longer than that. You can infer function arguments in the same way:

let sum x y = x + y

Execute the above line in F# Interactive, and it will show how it resolved parameter types for the function “sum”:

val sum : x:int -> y:int -> int

In this case the arithmetic operator “+” gave F# Interac-tive a hint that it’s dealing with numbers, and it chose “int” type for them. If the code doesn’t provide any hint about parameter data types, then the arguments stay generic and the function can be used with any type:

let make_tuple x y = (x, y)

Response from F# Interactive:

val make_tuple : x:'a -> y:'b -> 'a * 'b

So far it looks like a code typing convenience: when defin-ing F# functions, we don’t need to be explicit about its parameter types (unless we want to override default behavior), so we will end up with more compact code which is a well-known advantage of most functional languages. But there’s much more power in type inference than pos-sibility to omit type definitions. Unlike object oriented languages where generic algorithms and data structures require writing code in a certain way, type inference in functional languages allows generics happen implicitly, without special effort or attention. And this may lead to interesting discoveries.

Let’s look at an F# implementation of the Conway’s Game of Life – a zero player game that models evolution of life within a two-dimensional board. The game is played according to the following rules (taken from Wikipedia):

1. Any live cell with fewer than two live neighbours dies, as if caused by under-population.

2. Any live cell with two or three live neighbours lives on to the next generation.

3. Any live cell with more than three live neighbours dies, as if by overcrowding.

4. Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.

The articles and presentations about functional programming usually list such FP advantages as high order functions, data immutability by default, pattern matching and terse syntax. Some functional languages are also capable of implicit type declaration, known as type inference.

43© N

ikol

ay S

olid

crea

ture

/Shu

tter

stoc

k

ADD NEW DIMENSIONS TO YOUR ALGORITHMS

USING F# TYPE INFERENCEBy Vagif Abilov

Page 23: NDC Magazine

44 45

Note what’s changed: only the “neighbours” function! The rest is identical. But can we rewrite the algorithm to sup-port multiple board dimensions at the same time? Yes we can. Enter F# discriminated unions and pattern matching:

Below is a possible F# implementation of the game:

Now to test the implementation we need to define a test pattern:

let pattern = [(1,1);(1,2);(2,3);(2,4)]

So if we now execute nextGeneration function:

nextGeneration pattern

we will receive the following output:

Have a closer look at the implementation. Can you spot a place where it says that it’s an implementation for a two-dimensional board? When I talk about Conway’s Game of Life at a live presentation, I usually ask this question after scrolling down the page a little to hide the “neighbours” function. And it takes some time before somebody from the audience says “but you hid the “neighbours”! That is the only function which exposes number of board dimensions.”

Yes it is. There is no other place in the algorithm that says anything about whether we are implementing the Conway’s Game of Life for two-dimensional board, three-dimensional board or maybe even the space without geo-metrical dimensions. The algorithm can be used for any space abstraction as long as we define the meaning of a neighbour. Here’s how it will look for three-dimensional board:

let neighbours (x, y, z) = [ for i in x-1..x+1 do for j in y-1..y+1 do for k in z-1..z+1 do if not (i = x && j = y && k = z) then yield (i,j,k) ]let isAlive pattern cell = pattern |> List.exists ((=) cell)let aliveNeighbours pattern cell = neighbours cell |> List.filter (isAlive pattern)let survives pattern cell = aliveNeighbours pattern cell |> List.length |> fun x -> x >= 2 && x <= 3let reproducible pattern cell = aliveNeighbours pattern cell |> List.length = 3let allDeadNeighbours pattern = pattern |> List.collect neighbours |> Set.ofList |> Set.toList |> List.filter (not << isAlive pattern)let nextGeneration pattern = List.append (pattern |> List.filter (survives pattern)) (allDeadNeighbours pattern |> List.filter (reproducible pattern))

type Cell = | Line of int | Surface of int * int | Space of int * int * int | Spacetime of int * int * int * intlet neighbours cell = match cell with | Line(a) -> [ for i in a-1..a+1 do if not (i = a) then yield Line(i) ] | Surface(a,b) -> [ for i in a-1..a+1 do for j in b-1..b+1 do if not (i = a && j = b) then yield Surface(i,j) ] | Space(a,b,c) -> [ for i in a-1..a+1 do for j in b-1..b+1 do for k in c-1..c+1 do if not (i = a && j = b && k = c) then yield Space(i,j,k) ] | Spacetime(a,b,c,d) -> [ for i in a-1..a+1 do for j in b-1..b+1 do for k in c-1..c+1 do for l in d-1..d+1 do if not (i = a && j = b && k = c && l = d) then yield Spacetime(i,j,k,l) ]

let neighbours (x, y) = [ for i in x-1..x+1 do for j in y-1..y+1 do if not (i = x && j = y) then yield (i,j) ]let isAlive pattern cell = pattern |> List.exists ((=) cell)let aliveNeighbours pattern cell = neighbours cell |> List.filter (isAlive pattern)let survives pattern cell = aliveNeighbours pattern cell |> List.length |> fun x -> x >= 2 && x <= 3let reproducible pattern cell = aliveNeighbours pattern cell |> List.length = 3let allDeadNeighbours pattern = pattern |> List.collect neighbours |> Set.ofList |> Set.toList |> List.filter (not << isAlive pattern)let nextGeneration pattern = List.append (pattern |> List.filter (survives pattern)) (allDeadNeighbours pattern |> List.filter (reproducible pattern))

val it : (int * int) list = [(1, 2); (2, 3); (1, 3); (2, 2)]

Page 24: NDC Magazine

46

While you have support for generics in C#, you don’t have the same implementation transparency due to lack of type interference. Specialized implementations in C# are more straightforward (and smaller in size) than generic ones, so developers usually begin with specialized algorithms and data structures and only convert them to generic implementations once they have needs for that. In F# it’s opposite: the functions are initially generic with type constraints applied only where they refer to functions with arguments or return values of specifi c types. And as we saw in examples above, such language capability leads to very high level of code reuse, including applicability to data types that we haven’t originally thought of.

Vagif Abilov is a Russian/Norwegian software developer and architect working for Miles. He has more than twenty years of programming experience that includes various programming languages, currently using mostly C# and F#. Vagif writes articles and speaks at user group sessions and conferences. He is a contributor to several open source projects and maintainer of a few ones, such as Simple.Data OData adapter, Simple.OData.Client and MongOData.

I skipped the rest of the algorithm – it’s identical to previ-ous implementations. Now we can write unit tests for our multi-dimensional implementation that will verify behavior for both 2D and 3D boards:

But wait – we don’t need to restrict us to geometrical dis-tances between cells. We can implement Conway’s Game of Life for colors! We just need to throw a defi nition of neigbouring colors:

Again, the remaining part of the algorithm is a verbatim copy of our original defi nition, so I skipped that. To test the implementation, we’ll defi ne a test pattern:

let pattern = [Red;Green;Orange;Black]

… and execute the “nextGeneration” function:

nextGeneration pattern

Here’s the result of the execution:

val it : Color list = [Red; Orange]

type Color = Red | Green | Blue | White | Gray | Black | Orange | Yellow | Brownlet neighbours color = match color with | Red -> [Red;Orange;Brown] | Green -> [Green;Blue;Yellow] | Blue -> [Blue;Green] | White -> [White;Gray] | Black -> [Black;Gray] | Gray -> [Gray;Black;White] | Orange -> [Orange;Red;Yellow] | Yellow -> [Yellow;Orange;Green] | Brown -> [Brown;Red]

[<Test>] member this.``Square in 3d should not change``() = let pattern = [Space(1,1,0); Space(1,2,0); Space(2,1,0); Space(2,2,0)] pattern |> nextGeneration |> should equal pattern[<Test>] member this.``Cube in 3d should die``() = let pattern = [Space(1,1,1); Space(1,2,1); Space(2,1,1); Space(2,2,1); Space(1,1,2);Space(1,2,2)Space(2,1,2); Space(2,2,2)] pattern |> nextGeneration |> should equal List.empty

Schlumberger is a knowledge based company in the energy sector, with world class centers for Software Development located here in Norway.

We have offices in Oslo, Kjeller, Bergen and Stavanger, responsible for delivering market leading software platforms for the oil-and gas industry. With more than 200 software engineers, we are a leading employer and competency center for software development in Norway. Our activities cover a wide range of activities, from softwarearchitecture, design, engineering to customer support, from technical documentation to quality assurance. We take great pride in our internationally diverse environment and our ability to consistently build innovative and integrated products with high quality.

Schlumberger closely collaborates with Universities and Research Centers in Norway and throughout the rest of the world. All employees benefit from tailored and continuous training programs, state-of-the-art communication technologies and a global organi-zation that supports knowledge sharing and team work. We encourage patent appli-cations, conference participation and journal publications.

For job opportunities, please contact [email protected]

Software DevelopmentOslo, Kjeller, Stavanger, Bergen

Schlumberger_210x148_2014.indd 1 05.05.14 13:35

Page 25: NDC Magazine

Code Club for Juniors“You don’t have to be a genius to code – do you have to be a genius to read?”

Bronwen Grimes, Technical Artist @ Valve

I still recall the feeling of pure fas-cination that what we wrote in text resulted in a fun game we could inter-act with (we made a bull race where the animations ran across the screen with random speed that was modified based on how well we answered differ-ent math riddles). I didn’t understand much of how it all worked, but I remem-ber that it was really, really cool!

There is a growing trend among pro-grammers to pass their knowledge on to the children - for free, and on their own spare time. They are opening pos-sibilities for the new generation to bypass us all in the future and become the technological wizards capable of spells we never dreamed of. As my uncle once taught me, so are many other uncles, parents, grandparents, friends, neighbours, friends of friends teaching kids they know and even kids they don’t know.

The code club movement code.org started in England, followed up by Norwegian enthusiasts in 2013. It spread like fire in just a few weeks after the initial “launch”, and local groups are continuously popping up

all across Norway. A colleague of mine asked me once to help out at Oslo Makers Faire with a Raspberry Pi workshop for kids. I didn’t really know how to talk to kids, let alone teach them something, but I had heard of the movement and was curious. Surpris-ingly, it went very well, the children were busy creating turtles and coding Minecraft, and were mostly explaining things to each other, only occasion-ally raising a hand for help. I think my favourite memory from that day is a group of 12 year olds who were so happy about every accomplished new task that they called for me each time and proudly demonstrated the results on the screen.

Kids love to play, and have enormous amount of energy and imagination. When they catch the concept, they immediately start spinning on it, creating more and more advanced solutions. During one of the code club workshops in Nesodden, the teacher demonstrated a simple example of how to create lines of different col-ours by using a turtle from Python Turtle library. The kids listened, absorbed, and produced this:

Oslo Makers Faire is one of the arenas where kids can explore technology in Norway. Another upcoming big event is NDC Junior. This is the second year in a row that “Kodeklubben” - the Norwegian adaptation of U.K’s code club - is invited by NDC to arrange a special conference for kids. Last year we were 150 participants. This year we are expecting 300. Juniors from 8 to 18 years old will gather on top of Oslo Plaza to learn crafts of comput-ing from code club volunteers - pro-grammers, teachers, students, but most importantly - from each other. (www.ndcoslo.com/codingforkids)

It’s important that juniors are not only the consumers of technology, but also its’ creators! We can all make a differ-ence for the generation to come; we can introduce them to programming and how incredibly cool it can be. If you are still not convinced to start your own local code club, visit www.kidsakoder.no. There you can get start-up help and advice. It’s simple, easy and fun. All you need is a loca-tion, material (a lot can be found on kidsakoder web-site), a couple of grown-ups to watch over your shoul-der, and of course kids (yours, neigh-bours, strangers - it doesn’t really matter).

When I was ten, my mother did something that changed my life – she asked my uncle to teach me how to code. Once a week we sat on the bus for an hour to get to his place, while I was working my way through the “Mastering QBasic by playing”, by Erny Casper. It was an exciting journey to another world.

49

By Olga Voronkova

A group of children drew this after one of the code club workshops in their school

© P

hoto

sani

/Shu

tter

stoc

k

Olga Voronkova is a fresh graduate from University of Oslo and developer at Computas. She likes puzzles, apps, pink, free food and turtles.

Page 26: NDC Magazine

50

AUTHENTICATION, SINGLE SIGN-ON AND FEDERATIONIn corporate environments, the prevalent technology stack for implementing authentication and SSO is SAML2p and WS-Federation both based on SAML assertions, XML and XML digital signatures. All these technologies are proven and mature but they are also overly complex and at the end of their innovation lifecycle – to quote the popular identity analyst Craig Burton:

“SAML is the Windows XP of Identity. No funding. No inno-vation. People still use it - but it has no future. SAML is dead != SAML is bad. SAML is dead != SAML isn’t useful. SAML is dead means SAML != the future.”

Given the technologies we use today for building modern applications in browsers and for mobile computers, SAML is not really supported anymore.

In the meantime - OAuth2, which is a framework around requesting and using access tokens, gained quite a bit of traction. It was designed for native, web and browser

based applications right from the start and can be imple-mented by any device that has an HTTP stack. It lacked some well-defi ned “profi les”, a token type specifi cation and was not really capable of interoperable authentica-tion on its own. This is where the OpenID Foundation and OpenID Connect comes0 in.

OPENID CONNECTOIDC (in short) is an extension to OAuth2 that adds authen-tication and interoperability features. Specifi cally three important things were added or specifi ed.

IDENTITY TOKENOAuth2 already has the notion of an access token. This token is opaque to the client and is meant to be sent to some API backend. OIDC adds another token type called the identity token. The identity token has a standard format (a JWT – JSON Web Token), uses standard crypto and has a defi ned set of claims. This token is specifi cally designed so that the requesting client can validate it and thus verify the identity of the user (see fi gure 1).

The authentication and authorization story is currently quite fragmented – on one hand there are the “dinosaurs” like SAML2p and WS-Federation which do a good job in authenticating users in classic Web SSO scenarios, but are not really usable in e.g. native mobile applications. On the other hand there is OAuth2, which is useful for delegated Web API access but cannot be used for authentication (at least not without more or less secure proprietary extensions). OpenID Connect unifi es both worlds and makes it much easier to implement authentication and API access in modern applications.

51© g

rafv

isio

n / S

hutt

erst

ock

By Dominick Baier

OpenID Connect:Unifying Authentication and Delegated API Access

Figure 1 A JWT identity token con-taining information about

the issuer (iss), client (aud), expiration (exp), user (sub)

and authentication method (amr). See1 for a link to this

useful JWT decoder.

Page 27: NDC Magazine

52 53

If the identity token should be send to a server-based web application, the client can add a response_mode=form_post parameter which instructs the OIDC provider to package the token in an HTML form and post it to the callback address (again very similar to WS-Federation of SAML2p POST profi le).

API ACCESS AND DELEGATED AUTHORIZATIONSo far we looked at authentication (aka “a client wants to know who the user is”), but the other big use case these days is delegated API access (aka “the client wants to access a back-end service on behalf of that user”). Some-times we only need authentication and access the back-end in a trusted subsystem manner, sometimes the client does not really care who the user is as long as it can access the back-end, and sometimes we need both.

Since OIDC is based on OAuth2, we get the API access for free. That’s great, especially since the identity token and the API access token can be acquired in a single round-trip, e.g.:

authorize?client_id=implicitclient&redirect_uri=http%3A%2F%2Flocalhost%3A21575%2Findex.html&response_type=id_token%20token&scope=openid%20profi le%20someApi.read%20some-OtherApi.write%20email

Compared to the previous examples, there are some important differences here. First of all the response types is now “id_token token”, which means that we now request an identity token and an access token. Second, the scopes now contain OpenID specifi c scopes like profi le and email, but also API scopes like someApi.read. The resulting call-back will now contain both an identity token and the access token (as well as the access token expiration time):

http://localhost/index.html#id_token=ey..xz&token=sjs..rew&expires_in=3600

So in other words – using this approach we can use a sin-gle protocol for all application and client types to request authentication and access tokens. That’s very useful.

IMPLEMENTATIONSOpenID Connect v1.0 was released on February 26th 2014, so it is pretty new. Nevertheless, since the specifi cations were under development for quite a while, there are already a number of implementations for both OIDC pro-viders as well as client libraries (including JWT validation and parsing). See2 for the offi cial library and product list.

On the .NET/C# side of things we are currently working on IdentityServer v33 which is an open source OIDC and OAuth2 implementation, and Microsoft has already pre-viewed OIDC middleware for Katana/ASP.NET4.

Since one of the main goals of OIDC is interoperability5, it should soon be trivial to combine heterogeneous clients and providers into a larger application architecture – which sounds good to me.

RESOURCES0 http://openid.net/connect/1 http://jwt.io2 http://openid.net/developers/libraries/3 https://github.com/thinktecture/Think- tecture.IdentityServer.v34 http://katanaproject.codeplex.com/5 http://osis.idcommons.net/wiki/Category: OC5_Participant

SET OF STANDARD SCOPES AND CLAIMSOAuth2 uses the scope parameter to specify which resources the client wants to access. The actual scope values are to be defi ned by the implementer. OIDC adds a number of identity related standard scopes like profi le or email. Each of these scopes in turn map to a set of standard claims like given_name, picture or gender. These scopes are used for constructing a consent screen so that the user can actually authorize the client application to access the personal data, as well as for creating an access token for the UserInfo endpoint.

USERINFO ENDPOINTDepending on the protocol parameters, claims can be directly returned from an authentication request (WS-Federation style) or via a back channel (SAML2p artifact resolution style). OIDC also defi nes this back channel end-point for requesting claims as well as its request/response format. It’s called the UserInfo endpoint.

FLOWSSimilar to “raw” OAuth2, OpenID Connect also uses so called fl ows to describe the interaction between various client types and the OIDC provider. The implicit fl ow is for public clients that cannot (or don’t want to) authenticate with the provider – a native or JavaScript/browser-based application would be an example for that.

The code fl ow is typically used for server-based applica-tions that can securely store secrets and authenticate with the OIDC provider – this allows for additional features like refresh tokens.

There’s a third fl ow, called the hybrid fl ow, which can be used for application architectures that are a mixture of the above-described scenarios.

SOME EXAMPLESLet’s have a look at some examples of typical OpenID Con-nect authentication requests. For simplicity we will use the implicit fl ow to describe the general protocol steps (and also omit some of the details).

Example 1: A native/JS application requests authentica-tion. The application only needs to know the unique user id of the user.

authorize?client_id=clientapp&redirect_uri=http%3A%2F%2Flocalhost%3A21575%2Findex.html&response_type=id_token&scope=openid

In plain English this means:

“Hi – I am a client called clientapp (client_id=clientapp), please authenticate the user for me and send me back an identity token (response_type=id_token) containing the user id (scope=openid) to my application address (redi-rect_uri).”

The resulting callback will look like this (again simplifi ed):

http://localhost/index.html#id_token=ey...ssq

The client can then extract the identity token and validate it. To make that process simpler, clients can also automati-cally discover the necessary key material to validate the signature. This is done via metadata that the OIDC pro-vider can make available (very similar to WS-Federation or SAML metadata).

Example 2: In addition to the user identifi er, the client would also like to know the email address of the user as well as some profi le information like fi rst and last name.

authorize?client_id=clientapp&redirect_uri=http%3A%2F%2Flocalhost%3A21575%2Findex.html&response_type=id_token&scope=openid%20email%20profi le

This time the scope parameter also contains the values email and profi le, and the resulting identity token will contain the requested values (if available). Also similar to OAuth2 it is possible for an OIDC provider to ask the user for consent before it releases the identity informa-tion (see fi gure 2).

Figure 2 Example of an OpenID Connect Consent Screen

Since the callback transmits the identity token via a hash fragment on the URL, this approach is only suitable to native or browser-based applications.

Dominick Baier is well known expert for identity & access control technologies and protocols. He shares his time between doing consulting for thinktecture (http://www.thinktecture.com), working on open source projects (http://thinktecture.github.io), blogging (http://leastprivilege.com) and tweeting (@leastprivilege).

SCOPE CLAIMS

profi le

name, family_name, given_name, middle_name, nickname, pre-ferred_username, profile, pic-ture, website, gender, birthdate, zoneinfo, locale, and updated_at.

email email, email_verifi ed

address address

phone phone_number, phone_number_verifi ed

offl ine_access requests refresh token

Page 28: NDC Magazine

54 55

COURSE OVERVIEW OSLO www.programutvikling.no

C++ Days Mai Jun Aug Sep Oct Location Price

Advanced C++ programming and Introduction to C++11 - Hubert Matthews 4 19 Oslo 21 900

C++ for Embedded Developers - Mike Tarlton 5 6 Oslo 24 900

Scalable design and implementation using C++ - Andrei Alexandrescu 2 02 Plaza 9 800

C Days Mai Jun Aug Sep Oct Location Price

Deep C: Et kurs for erfarne C og C++ programmerere - Olve Maudal 2 28 Oslo 14 900

DATABASE Days Mai Jun Aug Sep Oct Location Price

Databasedesign, -implementering og SQL-programmering - Dag Hoftun Knutsen 4 09 Oslo 21 900

PROGRAMMING Days Mai Jun Aug Sep Oct Location Price

Objektorientert utvikling - Eivind Nordby 4 16 Oslo 21 900

PRE-CONFERENCE WORKSHOPS AT NDC OSLO Days Mai Jun Aug Sep Oct Location Price

Advanced PostSharp From the Horse s Mouth - Gael Fraiteur 1 02 Plaza 6 800

Raw TDD - Kevlin Henney 1 02 Plaza 6 800

Getting Started with Apache Cassandra - Tim Berglund 1 03 Plaza 6 800

Lean Startup: Your Minimum Viable Product (MVP) Sucks! - Tristian Kromer 1 03 Plaza 6 800

Designing and implementing Web APIs in the .NET platform - Pablo Cibraro & Pedro Félix 2 02 Plaza 9 800

GitHub Intro + Advanced - Fryman, Graham & Olsson 2 02 Plaza 9 800

Agile Interactions Workshop - Jessie Shternshus 1 02 Plaza 6 800

AngularJS workshop - Scott Allen 2 02 Plaza 9 800

Hacking the Creative Brain - Denise Jacobs 1 03 Plaza 6 800

Programming in Functional Style - Venkat Subramaniam 2 02 Plaza 9 800

Identity and access control for modern web applications and APIs - Dominick Baier 2 02 Plaza 9 800

Mobile to Multi-Device Web - Luke Wroblewski 1 03 Plaza 6 800

Windows Azure Racing Game Workshop - Alan Smith 1 03 Plaza 6 800

XML Days Mai Jun Aug Sep Oct Location Price

Exchanging and Managing Data using XML and XSLT - Espen Evje 3 03 Oslo 18 900

COURSETITLE

AGILE Days Mai Jun Aug Sep Oct Location Price

Architecture with Agility - Kevlin Henney 2 17 Oslo 18 900

Agile Interactions Workshop - Jessie Shternshus 1 02 Plaza 6 800

Hacking the Creative Brain - Denise Jacobs 1 03 Plaza 6 800

BDD - Specification by Example - Gojko Adzic 2 12 Oslo 14 900

SCRUM Days Mai Jun Aug Sep Oct Location Price

Certified Scrum Product Owner - CSPO - Mike Cohn 2 04 17 Oslo 14 900

Certified ScrumMaster - CSM - Geoff Watts 2 16 Oslo 14 900

Certified ScrumMaster - CSM - Geoff Watts 2 11 Trond-heim 14 900

Certified ScrumMaster - CSM - Geoff Watts 2 9 Tromsø 14 900

Product Owner Survival Camp - Gojko Adzic 1 Oslo 14 900

Certified ScrumMaster - CSM - Mike Cohn 2 02 15 Oslo 14 900

TEST-DRIVEN DEVELOPMENT Days Mai Jun Aug Sep Oct Location Price

Test-Driven Development & Refactoring Techniques - Robert C. Martin - 10 November 3 Oslo 18 900

Test-Driven Development - Venkat Subramaniam 5 18 Oslo 24 900

Surviving Legacy Code - J.B. Rainsberger 2 18 Oslo 14 900

DESIGN - ANALYSIS - ARCHITECTURES Days Mai Jun Aug Sep Oct Location Price

Evolutionary Design and Architecture for Agile Development - Venkat Subra-maniam - 16 Februar 2015 4 Oslo 21 900

Agile Design and Modeling for Advanced Object Design with Patterns - Craig Larman - 12 januar 2015 4 Oslo 21 900

Project Design Master Class with Juval Lowy 5 13 Oslo 24 900

MOBILE APPLICATIONS Days Mai Jun Aug Sep Oct Location Price

Mobile to Multi-Device Web - Luke Wroblewski 1 03 Plaza 6 800

Fundamentals of iOS Programming - Wei-Meng Lee 5 19 Oslo 24 900

MICROSOFT Days Mai Jun Aug Sep Oct Location Price

70-513 - WCF 4.5 with Visual Studio 2013 - Sahil Malik 5 12 Oslo 24 900

Identity and access control for modern web applications and APIs - Dominick Baier 2 02 Plaza 9 800

C#.NET: Utvikling av applikasjoner i .NET med C# - Arjan Einbu 5 23 25 Oslo 24 900

Web Development in .NET - ASP.NET MVC , HTML5, CSS3, JavaScript - Arjan Einbu 5 12 30 18 13 Oslo 24 900

WPF/XAML - 70-511 / 10262A Windows Presentation Foundation/XAML - Arne Laugstøl 4 18 Oslo 21 900

Windows Azure Racing Game Workshop - Alan Smith 1 03 Plaza 6 800

SHAREPOINT Days Mai Jun Aug Sep Oct Location Price

SharePoint 2013 and Office 365: End to End for Developers - Sahil Malik 5 19 Oslo 24 900

JAVA Days Mai Jun Aug Sep Oct Location Price

Core Spring - Mårten Haglind 4 24 16 Oslo 21 900

Programming in Java 8 - Venkat Subramaniam - 19 November 3 Oslo 18 900

Programming Java Standard Edition - Eivind Nordby 5 02 Oslo 24 900

Reactive Programming with Akka - Venkat Subramaniam - 17 November 2 Oslo 21900

HTML5 - JavaScript - CSS3 Days Mai Jun Aug Sep Oct Location Price

JavaScript and HTML5 for Developers - Christian Wenz 3 11 Oslo 18 900

JavaScript for programmers - Christian Johansen 3 12 Oslo 18 900

AngularJS End-to-End SPA Development - Dan Wahlin 4 Oslo 21 900

AngularJS and HTML5 - Scott Allen 4 8 Oslo 21 900

AngularJS workshop - Scott Allen 2 02 Plaza 9 800

HOW TO FIND US PROGRAMUTVIKLING MAIN OFFICE, OSLO

ProgramUtvikling AS is located in the IT-Fornebu technology park at Snarøya.

ADDRESSMartin Lingesvei 17-25, 1367 Snarøya.

Our offices and course rooms are situated in the terminal building of the former Oslo airport. The photo shows the car park, bus stop and course rooms. For details of bus times, go to trafikanten.no

Entrance

Parking

Bus stop

FOLLOW US ON

twitter.com/progutvikling www.programutvikling.no/feed/news.aspx [email protected] facebook.com/programutvikling

ENROLMENT OPTIONSwww.programutvikling.no - [email protected] Tel.: +47 67 10 65 65 - Fax: +47 67 82 72 31

Page 29: NDC Magazine

56 57

• 3-day conference with 9 parallel tracks • 2 days of Pre-Conference Workshops

Agenda and Practical Information All you need to know about NDC 2014 >>>

ndcoslo.com

ProgramUtvikling offers the best courses and most flexible training to the developer community wher-ever you want us to. Our philosophy is to provide “practical, applicable knowledge” by providing the highest quality training with the best instructors.In addition to our permanent staff we have a number of exciting and well-known instructors such as Herb

Sutter, Craig Larman, Billy Hollis, Mike Cohn, Geoff Watts, Gill Cleeren, Sahil Malik and a great staff of excellent Scandinavian instructors.

NDC has become one of the largest conferences dedicated to .NET and Agile development and is hosted by ProgramUtvikling AS. www.ndcoslo.com www.ndc-london.com

We develop developersTraining and conferences in Oslo and London

OSLO - www.programutvikling.no

Phot

o: S

hutt

erst

ock

Page 30: NDC Magazine

58 59

TORBJØRN MARØ, CTO AT PSWINCOM

Torbjørn Marø is the CTO of a mobile com-munications company in Norway. He is a passionate coder, and loves to learn and use new (and old) program-ming languages and technologies. As an

active blogger he tries to share his excite-ment for software with anyone who's willing to listen.

"As always I'm looking forward to meeting a host of like minded and interesting people at NDC. I think the various topics and talks we have been able to select this year is amazing, and there will be something of interest to everyone attending."

"I'm especially happy with the attention given to functional programming this time around. The industry is fi nally beginning to see the importance and opportunities of this paradigm, and it's only going to become more important as we go forward."

JONAS FOLLESØ, MANAGER AND SCIENTIST IN BEKK

Jonas started pro-gramming the moment he got his first com-puter as a 11 year old, and after working with .NET for 11 years he has gained broad experience and in–depth knowledge of

the .NET Framework and the C# program-ming language. Over the last few years one of his passions has been for programming languages in general, and functional pro-gramming in particular. Jonas is currently working for BEKK as a scientist and manager, doing both project-work as well as keeping track of new technologies and techniques for software development. Jonas is an active member of and contribu-tor to the Norwegian developer community. He is an experienced speaker from both local user groups and larger conferences like TechEd, REMIX, MSDN Live, JavaZone, Smidig, ROOTS, Functional Programming Day and NDC. He has also been a member of the NDC program committee for the last 4 years.

TORSTEIN BJØRNSTAD, SENIOR CONSULTANT AT WEBSTEP

Torstein Bjørnstad is a consultant focused on helping clients take use of modern web technology in order to provide rich and interactive user expe-riences to their users. He spends his spare

time diving into and evaluating new technolo-gies in his many fi elds of interest. This is Mr Bjørnstad's second year in the agenda com-mittee, and his focus is to represent the views of developers working with the .NET stack.

"I have attended NDC for four years now, and I am very excited about this year's agenda. It might be a bit less centered on Microsoft-branded technologies and frameworks than earlier years, but instead it has more talks on patterns and practices which is relevant to everyone, and in my opinion more impor-tant. I am especially looking forward to this year's talks on functional programming and language alternatives to C#. My challenge to you as an attendee is to dare step out of your comfort zone and attend talks on topics you are not too familiar with, and get inspired!"

OLVE MAUDAL, MINISTER OF KNOWLEDGE AT CISCO SYSTEMS

Olve Maudal works for Cisco Systems where he is involved in devel-oping collaboration technology, in particu-lar video conferencing products and telep-resence solutions. He loves to write code,

but he is just as interested in how software is developed as what it actually does. Main interests are C, C++, TDD, secure coding and software architecture.

“We have established a very strong two day C++ track for NDC 2014, with Nico Josuttis, Andrei Alexandrescu, Hubert Matthews and Sccott Meyers as headliners. Learn more about modern C++, move semantics, type deduction, memory models, embedded, security, and tools. This is a unique oppor-tunity to get deep insights into modern C++ from top trainers and industry experts. You can even combine the conference with two-day pre-conference course by Andrei - "Scal-able design and implementation".

BRYAN HUNTER, FOUNDER OF NASHVILLE FUNCTIONAL PROGRAMMERS

Bryan Hunter is the CTO of Nashville-based Firefly Logic, and a functional programmer (Erlang, F#, and Elixir). He is a Microsoft MVP in F#, and founded the polyglot functional programming group

NashFP. Bryan volunteers much of his free time to promoting functional programming through community building, developer events, and business-leader education. This is the fi rst year that Bryan is part of the NDC programme committee. He was brought in to organize a full three-day functional pro-gramming track within NDC Oslo. When you

see the line-up you will agree he has done very well. "NDC has a big infl uence on developers all over the world. I learned of NDC Oslo in 2007, and each year since I've taken vaca-tion days to watch the session videos. For many companies in Tennessee (my home), NDC defi nes 'best practice', and what 'nor-mal' should look like. I am so thankful and honored to be included in the mix this year. I believe that we as an industry are at a tip-ping point where functional programming becomes mainstream; becomes the norm; becomes the 'safe option'. I can't imagine a better ribbon cutting/liminal moment than when Joe Armstrong takes the stage at NDC. My God, it's full of stars!"

BODIL STOKKE, SERIAL CONFERENCE ORGANISER AND DEVELOPER AT COMOYO

Bodil is a frequent speaker at developer conferences inter-nationally, and helps organize the Web Rebels and fl atMap(Oslo) con-ferences, and two local meetup groups, in addi-tion to serving on the

agenda committee for NDC. She is a profi lic contributor to the Free Software community, primarily as a Clojure developer, and has recently taken up designing new program-ming languages as a hobby. In her spare time she works as a web developer for Comoyo.

“My aim has been to help NDC lose its repu-tation for being a purely .NET conference and diversify into areas like the Web and func-tional programming. I`m pleased to report that in addition to the regular agile and enterprise fl uff, this year`s NDC has also gathered one of the best lineups for a func-tional programming conference I`ve seen in a long time. As a non- Microsoft developer, I am excited about this”.

JAKOB BRADFORD, GENERAL MANAGER OF PROGRAMUTVIKLING AND NDC

Jakob Bradford has the main responsibil-ity for seeing that the agenda committee reach their goal and the completion of the conference.

“Both of the number and quality of the Call For Papers have been very high this year. We have received more abstracts from more speakers than ever. The high quality meant that we increased with an extra track, so that this year there will be 9 parallel tracks. The number of speakers and abstracts shows the position NDC has as we enter our seventh year. This year I am very much looking forward to presenting our four-day C++ track.

KJERSTI SANDBERG, GENERAL MANAGER OF PROGRAMUTVIKLING

Kjersti Sandberg is the founder of Pro-gramUtvikling AS, and has organized the NDC Conference from the very beginning. Her daily job is with the professional areas of sale, marketing and

business development. Here role within this year`s agenda committee has been to liaise with speakers and present good ideas.

“NDC Oslo is a full week event with Pre-Con-ference Workshops on 2-3 June followed by the conference days 4-6 June. This year we have added more discounted workshops+ conference ticket options, giving our del-egates more fl exibility to tailor their own NDC experience”.

Once again the NDC Agenda Commit-tee has worked hard to select the very best among a mountain of suggested sessions and topics. We've tried to fi nd interesting speakers of high quality that is new to NDC, and we've used

feedback from earlier years to improve what is already a great conference. The agenda refl ects what developers are most concerned with in 2014, and while it will still be familiar you'll fi nd the conference program more versa-

tile than ever before. We hope you are as exited as we are about this, and that NDC 2014 will give you the inspiration and knowledge to face new challenges and do interesting and great things with technology!

The inspiring conference for developers will be held in Oslo spektrum for the seventh year in a row.

By Charlotte Lyng

THE AGENDA COMMITTEE NDC Oslo is reaching new hights

Page 31: NDC Magazine

60

SVEIN ARNE ACKENHAUSEN, INDEPEND-ENT CONSULTANT AND LECTURER

Svein Arne Acken-h a u s e n wo r k s i n Contango Svein Arne Ackenhausen on Con-tango Consulting AS, a small consultancy company that delivers software services and

training. Here he works mainly with .NET development assigments and courses. In addition to his daily consultancy work he works with the products ContinuouTests (Mighty Moose), AutoTest.NET and OpenIDE.

"I am really looking forward to this years con-ference. There are so many brilliant people talking about so many interesting subjects. There will be a lot of functional programming this year with some really exciting speakers,

like Joe Armstrong. What he and his team did with Erlang is something any developer can learn from. We get to learn from them and engage in conversations with them after hours. So much to learn! The agenda as a whole is diverse and I believe that all attendees will leave the conference with a greater understanding of the field of soft-ware development."

PETRI WILHELMSEN, TECHNICAL EVANGELIST FOR MICROSOFT

Petri's daily work is on the Evangelist team at Microsoft Norge. He is responsible for reaching out to devel-opers in Norway with Microsoft technology for developers, as well

as working closely with universities and

schools to provide them with knowledge about Microsoft Technology. In addition, he is a very active coder and has a passion for graphic programming, algorithms and game development.

“My role has been to help NDC find lectures, themes and sessions for the agenda. This is a big job where we on the Committee must sit

down together, evaluate lecturers and which sessions we wish to select from Call for Papers, distribute them during the day and make tracks. It has been incredibly reward-ing working with such a competent group of people as this year's agenda.

VERY STRONG C++ TRACK AT NDC 2014

2-6. June

C++

NDC CONFERENCE C++ Day 1 4 JuneC++14 Nico JosuttisEffective Modern C++ Scott MeyersError Handling in C++ Andrei AlexandrescuMove, noexcept, and push_back() and how they relate to each other Nico Josuttis

C++ Type Deduction and Why You Care Scott Meyers Template Meta-programming in C++ Andrei Alexandrescu

NDC WORKSHOP 2 days 2-3 June

Scalable design and implementation using C++ Andrei Alexandrescu

NDC CONFERENCE C++ Day 2 5 JuneC++ - where are we headed? Hubert MatthewsThree Cool Things about D Andrei AlexandrescuThe C++ memory model Mike LongC++ for small devices Isak StyfBrief tour of Clang Ismail PazarbasiInsecure coding in C and C++ Olve MaudalFor C++: When in doubt, do as the ints do Anders Knatten

WORKSHOP 2 DAYSNOK 9 800 + VAT

WORKSHOP 2 DAYS + NDC CONFERENCE 1 DAYNOK 13 000 + VAT

WORKSHOP 2 DAYS + NDC CONFERENCE2 DAYSNOK 16 000 + VAT

WORKSHOP 2 DAYS + NDC CONFERENCE3 DAYS (ALL ACCESS PASS)NOK 18 500 + VAT

Sign up atndcoslo.comCourse at OSLO PLAZA Conferences at OSLO SPEKTRUM

Andrei Alexandrescu

Nico Josuttis

Scott Meyers

Training and Conference

Scalable design and implementation using C++ with Andrei AlexandrescuThis course teaches advanced topics in designing and implement-ing large, scalable systems using C++. Performance and system-wide robustness are primary concerns. New features of C++ (and idioms they enable) that help reduce boilerplate and make complex system implementations will be discussed.

NDC Oslo - A 5-Day Knowledge Boost! With 13 Pre-Conference Workshops, 9 Conference tracks with 172 ses-sions NDC is a week packed with knowledge. You can choose everything from a 1 Day ticket to all 5 days with the All Access Pass including train-ing, workshops and the conference. Whatever you decide, we hope to see you in Oslo in June!

See course description at programutvikling.no and conference agenda at ndcoslo.com

For complete course descriptions, time and place, visit www.programutvikling.no

BDD - Specification by Example

Surviving Legacy Code

Agile Design and Modeling for Advanced Object Design with Patterns

12. June and 16. October in Oslo with Gojko Adzic

18. September in Oslo with J.B. Rainsberger

12. January 2015 in Oslo with Craig Larman

This two day workshop teaches you how to apply emerging practices for managing requirements, specifications and tests in agile and lean processes to bridge the communication gap between stakeholders and implementation teams, build quality into software from the start, design, develop and deliver systems fit for purpose.

Working with legacy code remains difficult. We feel afraid to change it, but sometimes we have no choice. You can easily learn techniques to help you manage your risk, but where do you practise them? If you apply them directly to your project's most valuable and difficult legacy code, then your risk becomes greater, not less. J. B. Rainsberger gives you a safe code base in which to experiment and guides you through the confusing risk/reward decisions involved in living with legacy code. You will learn and practise several specific, safe techniques that you can start using on your own legacy code once you return to your project.

This popular, high–impact, and hands–on course on mastering advanced object–oriented design (OOD) and design patterns (primarily the “Gang of Four” design patterns) with agility is aimed at architects and developers of OO systems, You will learn to design with patterns, apply visual modeling in an agile modeling approach, and a suite of related advanced design topics, including the design of packages. This course is based on acclaimed industry leader Craig Larman’s extensive experience coaching and applying OOD since the mid 1980s.

Page 32: NDC Magazine

62 63

Said about The Tide

“Beyond F*@king Amazing.”

“The Best Saturday night band we've seen in ages, if not ever!”

“One of the, if not the, fi nest covers bands in London.”

“...our most dynamic and excit-ing band, The Tide.”

With The Tide on shore, every-thing is set for a great musical experience at NDC Oslo.

LET US ENTERTAIN YOUWith grand music, multiple dining choices, even more parallel sessions and an intriguing

expo area, NDC Oslo 2014 is destined to be an inspiring, entertaining experience.

Washed ashore the banks of Oslo and onto the Oslo Spektrum Stage, are the the dynamic and exciting four piece band The Tide.

We’ve just got in some great news for you: Katzenjammer is now booked and will come and perform their mix of folk, pop, rock, country and balcan music. All is set for a great music experience at NDC Oslo.

KATZENJAMMER

THE TIDE FLOWS IN

Get ready for an incredible, high-octane stage performance, as the music fl ows through the expo area of NDC Oslo, Thursday June 5th. The Tide, based in London's West End, produce an “all out assault on your musical senses with their powerful display of pure, unadul-terated rock n' roll”.

The band has over twenty years live experience, drawing inspiration from bands such as The Police, Aerosmith, The Beatles, Green Day, Lou Reed, Pink Floyd, Primal Scream, The Stones, The Clash and more recent bands The Killers and Kings Of Leon.

Founding members Dean Sharp and Jamie Taylor started out as early as 1991 with various school bands and projects. Together they started writ-ing lyrics, and Deans track called Sky High got the initial interest for the band going.

Playing on the Oslo Spektrum stage are Dean Sharp on vocals and Rhythm Guitar, Jamie Taylor, lead guitar; Ste-fan Marinov, on bass guitar and fi nlly Alberto Voglino on drums.

By Inger Renate Moldskred Stie

The variety of dishes match the vari-ety of sessions to choose from and attend. With a 9th(!) parallel session this year; 9 rooms with diverse and different topics addressed, there is bound to be something up your alley. For the extra indecisive, all the ses-sions can be viewed from the Over-

flow Area: Swap between sessions with one click.

Prior to the concert on Thursday is the usual panel debate. Don’t miss out on a potentially heated debate from our panel.

During breaks, please make sure to visit the many stands in the expo area. And between mouthfulls, remember to visit the User group area to fi nd out

more about the work of the different user groups. Maybe you’ll fi nd one(or more) where you would fi t in, or per-haps get inspired to start your own?

June 5th, The Tide fl ows onto the Oslo Spektrum stage to rock NDC

Oslo developers.

9th parallel session

Find your user group at NDC Oslo

!

Page 33: NDC Magazine

64

Culinary Food from FCCircusServing food throughout the conference, the Flying

Culinary Circus bring you different dishesfor breakfast, lunch and dinner. Moving through the expo area you’ll pick up scents from a variety

of cuisines. Find your favourites amongst these cuisines:

SPANISHA variety of spanish tastes in a Tapa plate.

INDIANGet a spicy, fruity and culinary experience.

JAPANESEEnjoy a freshly made sushi meal on your way to the next session.

ITALIANGrab an italian pizza on the fl y.

THAILush, fragrant dishes bound to trigger your taste buds.

BRITISHWild Wild London: British cuisine meets cowboy.

In addition, NDC Oslo keep a barista bar open throughout the day, for you coffee loving developers.

Mik

e C

ohn

Geo

ff W

atts

ScrumMaster - Geoff Watts2 days: 09. September Tromsø, 11 september Trondheim and 16 October Oslo

Certifi ed ScrumMaster - CSM - Mike Cohn2 days: 02. June, 15. September and 15. December in Oslo

Certifi ed Scrum Product Owner - CSPO - Mike Cohn2 days: 04. June, 17. September and 17. December in Oslo

BECOME A CERTIFIED SCRUMMASTER OR A PRODUCT OWNER

For complete course descriptions, time and place, visit www.programutvikling.no

Now you can bring the benefits of continuous delivery to your database with these tools from Red Gate:

Introducing continuous deliveryfor SQL Server

Download all three tools for free at www.red-gate.com/ndc

SQL SOURCE CONTROLConnect your source control system to your database, for efficient development

SQL AUTOMATION PACKAutomate database builds on your CI server, for fast feedback on your work

SQL COMPAREThe world’s most trusted tool for releasing SQL Server updates

91% of the Fortune 100 and more than 650,000 end users worldwide use Red Gate.

Attending NDC Oslo?

Visit Red Gate’s booth for

a demo of the full process

Page 34: NDC Magazine

66 67

The capital of Norway

Oslo has a special combination of city life and easy access to the great outdoors. The city`s unique location means almost unlimited opportuni-ties for fun, and these are some of the choices you have when spending time in Oslo:

TRYVANNSTUAIf you got time to make it all the way to end of tram #1 on a sunny day, you should hitchhike in Nordmarka from Frogneseteren to the Tryvannstua lakes. Tryvannstua, which is a log cabin, built in 1931, is located by a small lake at the bottom of the ski slope Tranvannskleiva. The cabin is open year round and is the perfect place to try Norwegian pastries.

AKERSHUS FORTRESSAkershus Castle, also known as Akershus Slott, is a historic Norwe-gian landmark, located in the city centre by the Oslo Fjord. It is a great place to discover Oslo's history and a beautiful place to enjoy a summer day. Experience 700 years of history at Akershus Fortress with a guided tour. Guided tours are available every day in summer and on weekends in May and between mid-August and December.

FESTNINGEN RESTAURANTElegant yet relaxed brasserie at Akershus Fortress with great views of City Hall Square and Aker Brygge. The restaurant is located in Aker-shus Fortress' old prison, building 22. Festningen Restaurant offers à la carte and multi-course menus for both lunch and dinner. The dishes are made of unique, seasonal ingredients from various parts of Norway. Here you can pop in for a quick lunch or enjoy a long dinner with great wine.

WHISKY BAR This whisky bar prides itself to have the finest selection of Irish, Scot-tish and world whiskies. With its enormous selection of Whiskies, good food, elegant décor and cosy friendly atmosphere, The Whiskey Bar is the ‘Whisky Haven’ you have been looking for in Oslo. You`ll find The Whisky Bar on Rådhusgata at the heart of Oslo`s evening scene.

GRUNERLØKKAGrunerløkka is one of Oslo`s most popular boroughs. What started as a bohemian escape has turned into one of the most trendy parts of the city. Grunerløkka, commonly referred to as ‘Løkka’, is know for its

Oslo is a city full of contrasts. Its natural beauty, in combination with all the facilities of a modern metropolis, adds to the charm of a city often described as ‘the world`s largest village’. The surrounding countryside provides recrea-tional opportunities for the city`s inhabitants and visitors all year round.

© T

erje

Bor

ud -

Vis

itno

rway

.com

© M

orte

n N

orm

ann

Alm

elan

d/Sh

utte

rsto

ck

Tryvannstua cabin

Page 35: NDC Magazine

68 69

creative atmosphere and numerous little cafes, restaurants and bars. The borough is also a popular shopping district with original design shops and many vintage stores.

THE NORWEGIAN OPERA & BALLET Opera fan or not, this building in itself is worth a visit. Oslo`s new Opera House is shaped like an iceberg com-ing out of the water, and is the fi rst opera house in the world that let visitors walk on the roof. Learn more about the architecture, stagecraft, opera and ballet through a 50-minute guided tour.

SCHOUSKJELLERE MIKROBRYGGERIImagine Norway in the time of the

vikings: A dim, candle-lit vaulted hall where mead was swigged from goblets, resting on long rustic wooden tables, all the while a mas-sive fire roars away in the corner. Now replace the bearded barbarians with bearded Norwegian trendset-ters, and the fermented honey water with in-house brewed beers and you have got the atmospheric setting of the schouskjelleren Mikrobryggeri brew-pub. The brewery is located underground in the cellar of the old Schous Brewery on Trondheimsveien.

FRAM MUSEUMThe Fram Museum is dedicated to the story of Norwegian Polar expeditions. The central feature of the exhibit is

the ship they used for these explo-rations, aka the Fram. You’ll fi nd the museum on the peninsula of Bygdøy.

THE VIGELAND PARKThe park is a must-see in Oslo. The famous park is fi lled with 192 sculp-tures bronze and granite sculptures, far stretching lawns and long straight avenues bordered with maple trees. On a nice summer day, the park is full of people here you can go for a run, walk the dog, have a picnic or barbe-cue, play badminton or just do some sunbathing.

HOW TO GET AROUND IN OSLOThe Oslo Pass gives you free entry to more than 30 museums and attrac-

tions, free travel on all public trans-port, free entry to outdoor swimming pools, discount on sightseeing, con-cert tickets, bike rental and special offers in restaurants, shops enter-tainment and leisure venues. You can decide whether you want a card that is valid for 24, 48 or 72 hours.

VISIT BYGDØY Bygdøy is a peninsula on the western side of Oslo, Norway and belongs to the borough of Frogner. Bygdøy has several museums, like the Kon-Tiki Museum, which shows all year long the legendary expeditions of Thor Heyerdahl, the Norwegian Museum of Culture History, The Viking Ship Museum and the Norwegian Maritime

Museum. Bygdøy is one of Norway's oldest cultural landscapes with a rich history. Bygdøy has beautiful parks and forests and some of Oslo's most popular beaches. Bygdøy is accessible by bus, bike or it can be reached by the local public ferry departing from Aker Brygge every 30 minutes.

© V

isit

OSL

O/N

orm

anns

Kun

stfo

rlag

/Ter

je B

akke

Pet

ters

en

© N

ancy

Bun

dt -

Vis

itno

rway

.com

© 0

3997

7858

4/Sh

utte

rsto

ck

Foto

:Joha

n B

erge

- V

isit

norw

ay.c

om.©

Inno

vasj

on N

orge

/ Uni

vers

itet

ets

kult

urhi

stor

iske

mus

eer

Oslo-in numbers

• Total area: 454 square kilometres• Population (2014): 634,000 • Forest area: 242 km2

• Park and sports arena area: 8 square kilometres• Lakes within the city limits: 343

• Islands within the city in the Oslofjord: 40 • Length of the Oslofjord: 100 kilometres

© V

isit

OSL

O/N

ancy

Bun

dt

© g

ary7

18/S

hutt

erst

ock

Oslo Opera House

The Vigeland Sculpture Park Grünerløkka

Bygdøy ferry

Bygdøy beachThe Viking Ship Museum

Page 36: NDC Magazine

70 71

The next generation of conference speakers are born in the local user groups. At NDC, we complete the loop. Meet the following user groups at this year's NDC Community:

NNUGNorwegian .NET User Group (NNUG) is an independent user group for devel-opers by developers. We strive to be an open community where develop-ers and architects of every level can meet up and share knowledge about the Microsoft development platform, craftsmanship and best practices for developers. We meet up about once a month, sometimes featuring interna-tional speakers, but always with great local talent ready to share and discuss both bleeding edge technology and well-established practices. We have chapters located in Oslo, Bergen, Stavanger, Haugesund, Kristiansand, Trondheim and Vestfold.

DEVOPSDevOps and Continuous delivery has become increasingly popular over the last few years. DevOps Norway is a meetup focusing on these topics. We are about 500 members meeting up approximately every month. So far we have mainly had internationally renowned speakers, and a few work-

shops. In the future we are, in addi-tion, seeking to do more workshops and have more local speakers. Check us out at http://www.meetup.com/DevOps-Norway/

BAKSIABaksia's mission is to promote back end development. Our presentations and speakers focus on horizontally scalable solutions and the underlying frameworks, programming languages and paradigms. We are a fast growing community of almost 600 members. In the three years since we started, 16 speakers have presented interesting topics at our meetings. We always start with food and beverages kindly provided by our sponsors; Inmeta Consulting, Conax and Ardoq. NITH facilitate our meetings with central meeting venues in down town Oslo, close to public transportation.

BITRAFBitraf is a hackerspace / makerspace in Oslo, which is open to anyone 7 days a week. Come by if you are interested in programming, digital art, electronics, milling and fabrication, free software, game development or other similar activities. Work own your projects in a social environment, host or attend a workshop, a game jam, hackathon, bug squashing party or a good old fashioned

LAN party. Bitraf is completely user driven, so you decide what's going on.

OSLO C++Oslo C++ Users Group is a meetup group for Oslo-based developers interested in C++. Our main focus is C++, and C++11 in particular, but we occasionally arrange meetups about C, embedded development and other subjects that may be interesting to our members. Everyone is welcome to give a presentation at our meetups. We have had talks by both big names and local C++ers sharing their knowledge. You'll find us at meetup.com/ocppug!

STARTUP WEEKENDStartup Weekend is an intense 54 hours event which takes you trough the process of finding other designers, marketers, business people and pro-grammers to execute on an idea during a weekend. Here you practice the act of Lean Startup, which can be applied inside both small and big companies. Some successfull funded companies we have from previous events in Oslo ishttp://soundrop.fm which is a jukebox spotify app with millions of people streaming, and http://swipe.to which turns presentation slides into a live experience, also with a large userbase. Check out http://oslo.startupweekend.org/ for our upcoming event at 13-15. june.

Oslo is a city full of enthused developers. In an average week, you can generally find two or more user groups of developers meeting some-where in the city. In order to celebrate this, NDC has invited some of the larger user groups to share their passion with the NDC crowd. The NDC community area has 9 user groups present that will help create more action during the conference. Each user group will give quizzes, inter-view some of the profiled NDC speakers and conduct competitions.

By Johannes Brodwall

Meet the User Groups

at NDC Community

Page 37: NDC Magazine

7372

OSλO HASKELLOsλo Haskell is a user group for people interested in the purely functional pro-gramming language Haskell and related topics. Haskell was long considered a research language, but has seen much wider adoption the last years. Its main selling points are the extremely pow-erful type system, good performance and the ease of using concurrency and parallelism. We try to focus on both the concepts and theory behind Haskell and its ‘real-world’ usage in industry.

ANGULAR JS AngularJS Oslo meetup is a community of web developers dedicated to one of the most advanced and hot discussed JavaScript frameworks ideally suited for creating modern web and mobile applications. Community's mission is to help web front-end developers with selection of the best framework for their needs and to share knowledge, experience and best practices on it.

XPExtreme programming is about "turn-ing it all the way up to 11". We see that we spend less time correcting bugs if we test earlier, so how about if we test before we have anything to test? We

see that we avoid misunderstandings when programmers talk together, so how about if we work in pairs the whole time? We see that we get less prob-lems if we integrate more frequently, so how about if we integrate on every check in? We see that we get better requirements if we speak more to our customers, so how about if we have a customer team member? Extreme pro-gramming is the idea that we can look at what techniques help us today and explore what would happen if we take it even further.

OSLO ENTERPRISE SEARCH MEETUPWe defi ne enterprise search as retriev-ing information from certain sources and the presenting the most relevant information from these sources to target audiences. Having a good enter-prise search solution is a great advan-tage for every company. It will become even more important as the number of data sources grows while the amount of information in each source also grows. We look at search solutions as a whole, and are interested in everything from concepts and user experience to development and technology.

TECHSHOCK TechShock is a user group for web and mobile developers, both backend and frontend. Hosted by VG, the makers

of Norway's most visited web site, we cover a broad set of technologies, all related to the development and main-tenance of web technology. While our group covers a variety of topics, our individual meetups are narrowed down to more specifi c areas of interest. We try to keep our talks centered around real-world examples and experiences. At our meetups, there is at least one talk held by people working at VG, but we also bring in great speakers from other media and non-media companies. For more information, see http://meetup.com/techshock or http://tech.vg.no

LÆR KIDSA KODING ‘Lær Kidsa Koding’ is a Norwegian sibling to Code.org and Code Club - a volunteer movement that seeks to introduce children to coding. We wish to increase the general IT knowledge, and contribute to IT-recruitment by giving all students a chance to learn programming. We also help schools, and provide arenas where teachers and code club instructors can meet and help each other.

Kodeklubben teaches Norwegian kids how to code on top of

3 June, 18:30 - 20.30 at Oslo Plaza

The event is suitable for juniors aged 8- 18 years.

The aim of the workshop is to provide the attendees with enough skills to continue coding at home. Bring your kids and come. First come, fi rst served. Sign up at www.ndcoslo.com/codeclub

Join the Code Club Workshop at NDC!

It's time to introduce your kid to coding

© M

onik

a M

ølle

r tea

chin

g pu

pils

at H

unds

und

Low

er S

econ

dary

Sch

ool

Programming in Functional Style2-3 June at Oslo Plaza with Venkat SubramaniamThis three day course, offered by award winning author and trainer Venkat Subramaniam, will get you programming in functional programming. This course is not a theory of why this is a good idea, but a practical deep dive into the key aspects of functional programming. It will help you learn why, what, and exactly how to make use of this. Venkat is known for being a polyglot programmer and will demonstrate the functional style of programming in languages that the attendees use at their work each day.

For sign up and complete course descriptionvisit www.programutvikling.no

Page 38: NDC Magazine

Ticket types Price 2 Day Pre-Conference Workshop Pass NOK 9800 1 Day Pre-Conference Workshop Pass NOK 6800 25% VAT will be added to all ticket types.

be inspiredsign up now!

2 DAYS OF WORKSHOPS ON TOP OF RADISSON BLU PLAZA

You may attend these workshops without going to the conference

Tim BerglundGetting Started with Apache Cassandra

Alan Smith Windows Azure Racing Game Workshop

Gael Fraiteur Advanced PostSharp From the Horse’s Mouth

Kevlin Henny Raw TDD

Dominick Baier & Brock Allen Identity and access control for modern web applications and APIs

Pablo Cibraro & Pedro FélixDesigning and implementing Web APIs in the .NET platform

Jessie ShternshusAgile Interactions Workshop

Denise JacobsHacking the Creative Brain

Fryman, Graham & Olsson GitHub Intro + Advanced

Luke Wroblewski Mobile to Multi-Device Web

Tristan Kromer Lean Startup: Your Minimum Viable Product (MVP) Sucks!

Andrei AlexandrescuScalable design and implementation using C++

Scott Allen AngularJS workshop

Venkat Subramaniam Programming in Functional Style

DAY 1 - JUNE 2nd

DAY 2 - JUNE 3rd

2 DAYS - JUNE 2-3rd

ndcoslo.com@NDC_conferences #ndcoslo

Workshops are included in the

NDC ALL ACCESS CONFERENCE PASS

NOK 1850025% VAT will be added

Page 39: NDC Magazine

76 77

Room 1 Room 2 Room 3 Room 4 Room 5 Room 6 Room 7 Room 8 Room 9 Workshop

09:00 - 10:00

It’s a Write/Read (Mobile) Web

Luke Wroblewski

10:00 - 10:20 Break

10:20 - 11:20

Immutability, State and Scale - Functional, Distributed Applications in Azure

C++14 Front End Design Patterns: SOLID CSS + JS for Backend Developers

Hybrid vs Native: Choosing a Mobile Strategy

Developing in a Decade

Pharo: Playing with live objects

Building End-to-End Web Apps Using TypeScript

Domain Specific Languages, the functional way

Strangling the Legacy out of an Application

John Azariah and Mahesh Krishnan

Nico Josuttis Anthony van der Hoorn

Jeff French Hadi Hariri Tudor Girba Gil Fink Tomas Petricek

Anders Abel

11:20 - 11:40 Break

11:40 - 12:40

Go: A Pragmatic Language

Effective Modern C++

Build a Better Bootstrap

Temporal correlation and complex event processing in JavaScript

Get Unblocked Windows Azure Mobile Services from the ground up

The Agony of Lean Startup

OWIN and Katana: What the Func?

Writing RESTful web services using Node.js with a vengeance

Anthony Eden Scott Meyers Tim G. Thomas James Nugent Denise Jacobs Niall Merrigan Tristan Kromer

Brock Allen Jakob Mattsson

12:40 - 13:40 Lunch

13:40 - 14:40

Azure Web Sites Secrets, Exposed!

Error Handling in C++

Write massively-parallel GPU code for the browser with WebGL

ReactiveUI - Turning MVVM up to 11

Seven Ineffective Coding Habits of Many Programmers

What is new: Windows Phone and Windows Store App

Functional Programming the Long Road to Enlighten-ment: a Historical and Personal Narrative

TBA Web API Authorization & Access Control – done right!

Nik Molnar Andrei Alexandrescu

Steve Sanderson

Brendan Forster

Kevlin Henney Iris Classon Joe Armstrong Damian Edwards and David Fowler

Dominick Baier

14:40 - 15:00 Break

15:00 - 16:00

Move, noexcept, and push_back() and how they relate to each other

Bridging Node.js and .NET Using Edge.js

People, Process, Tools – The Essence of DevOps

CPU Caches and Why You care

Our experience from building and running a SaaS in the cloud

The Future of ASP.NET and “Katana”

CQRS with Erlang

Async C# 5.0 - Patters For Real World Use

Agile Team Interactions Workshop

Nico Josuttis David Neal Richard Campbell

Scott Meyers Erling Wegger Linde

Scott Hanselman

Bryan Hunter Liam Westley Jessie Shternshus

16:00 - 16:20 Break

16:20 - 17:20

Scaling Event Processing at all scales and all languages with the Reactive Extensions

C++ Type Deduction and Why You Care

Functional Reactive Programming and Bacon

Railway Oriented Programming -- error handling in functional languages

Finally! - True Cross-Plat-form Federation & Single Sign-On with OpenID Connect

Leading without formal authority

How C# Saved my Marriage

Patterns for the People

scriptcs deep dive. Extending, customizing and embedding in your applications.

Matthew Podwysocki

Scott Meyers Mikael Brevik Scott Wlaschin

Dominick Baier

Glenn Henriksen

Scott Hanselman

Kevlin Henney Filip W

17:20 - 17:40 Break

17:40 - 18:40

Game and Simulator Physics for Developers, Gamers and Petrol Heads

Template Meta-pro-gramming in C++

Serialize All The Things with Json.NET

Better Software--No Matter What: The Most Important Design Guideline

Functional Code Considered Beautiful

The integrations we fear and how we can manage them

Managing Asynchronic-ity

TCP servers in .NET done right

Single sign-on for mobile native applications

Alan Smith Andrei Alexandrescu

James Newton-King

Scott Meyers Garrett Smith Karoline Klever

Douglas Crockford

James Nugent Pedro Félix

Room 1 Room 2 Room 3 Room 4 Room 5 Room 6 Room 7 Room 8 Room 9 Workshop

09:00 - 10:00

Javascript Combinators

Delightful WebGL in Elm, with FRP and Types

Beyond NuGet: Front End Package Management with Bower

Monitoring your app with Logstash and Elasticsearch

Taking Design Patterns to the Next Level

C++ - where are we headed?

The mess we're in

Snake Bitten: Danger and Misfortune in the Evolution of Program-ming Languages

The mythical beast called the Internet of Things and how to tame it

Reginald Braithwaite

John P Mayer Anthony van der Hoorn

Vidar Kongsli and Torstein Nicolaysen

Gael Fraiteur Hubert Matthews

Joe Armstrong Bruce Tate David Edwin

10:00 - 10:20 Break

10:20 - 11:20

The Art of the Javascript Metaobject Protocol

Becoming an Outlier: Career Reboot for the Developer Mind

Docker is the future of shipping our code

Cloud beyond scaling : realtime webapplica-tions

An Actor's Life for Me – An introduction to the TPL Dataflow Library and asynchronous programming blocks

From Knockout to AngularJS

Full Stack Web Performance

Three Cool Things about D

How to scale apps and cloud services for Play Magnus

Reginald Braithwaite

Cory House Paul Stack Christian Holm Nielsen

Liam Westley Yngve Bakken Nilsen

Nik Molnar Andrei Alexandrescu

Christer V. Aas and Felipe Longe

11:20 - 11:40 Break

11:40 - 12:40

The journey from Powershell to Grunt for Build and Deploy

Zone out, check in, move on

Delivering Continuously to 10 Million Users

Quick Tour to Front-End Unit Testing Using Jasmine

An Introduction to Nancy

.NET outside of Visual Studio

The Better Parts

Pipe dreams: Pipes |> Macros |> Beautiful Code

The C++ memory model

Paul Stack Mark Seemann Robert Misch and Simon Hohenadl

Gil Fink Mathew McLoughlin

Svein Arne Ackenhausen

Douglas Crockford

Bruce Tate Mike Long

12:40 - 13:40 Lunch

13:40 - 14:40

Real World Single Page Apps: A Knockout Case Study

Code that fits your brain

Making The Computer See - Computer Vision For Everyday Applications

Hacking the Internet of Things

TBA Cross-plat-form physics-based gaming using MonoGame and Farseer

GitHub Power Tools

Aggregation with noSQL

C++ for small devices

Cory House Adam Tornhill Martin Jul Einar Otto Stangvik and Erlend Oftedal

Jack Schulze Rune Andreas Grimstad

Tim Berglund John Zablocki Isak Styf

14:40 - 15:00 Break

15:00 - 16:00

Angular TypeScript

Agile Kaizen Wherefore art thou Erlang?

Privacy for the Internet

Designing Wonderful .NET APIs

C# is in my ears and in my eyes

Node.JS Tools For Front-End Developers

TBA Brief tour of Clang

Mark Rendle Scott Bellware

Robert Virding

Nico Josuttis James Newton-King

Chris Hardy Scott Allen Damian Edwards and David Fowler

Ismail Pazarbasi

16:00 - 16:20 Break

16:20 - 17:20

Building Directives for AngularJS

Agile Metrics - Velocity is NOT the Goal

Discrete Math You Need to Know

Ninja vs. Samurai - Let the scripting battle begin

TBA Insecure coding in C and C++

Free is a Lie "It doesn't work like that in enterprise"

Why no code reviews?

Scott Allen Doc Norton Tim Berglund Rustam Mehmandarov and Harald Fianbakken

Greg Young Olve Maudal Aral Balkan Peter Smith Enrico Campidoglio

17:20 - 17:40 Break

17:40 - 18:40

Facial Hair & the Road to Faster JavaScript

From Code Monkey to Boss Man

IDEs: The State of the Union

0-layered architecture

10 Things I've Learned From Doing OSS

Making sense of unstruc-tured data

Domain modelling with the F# type system

The Technical Debt Trap

So you think you can int? (C++)"

Joel Fillmore Anthony Eden Matt Ellis Bjørn Einar Bjartnes

Brendan Forster

Anders Norås Scott Wlaschin

Doc Norton Anders Knatten

PROGRAM – Wednesday PROGRAM – Thursday.NET Framework Agile Architecture C++ CloudDatabase Design Devops Front-End Framework FunFunctional Programming Gadgets Internet Of Things JavaScript MicrosoftMisc Languages Mobile People Programming Languages Securitytba Techniques Testing Tools UXWeb

7776

Page 40: NDC Magazine

78 79

Vi tror at interesser og lidenskap er viktig – både på og utenfor jobb. Nysgjerrige mennesker oppnår rett og slett mer. I BEKK får du mulighet

til å utvikle deg videre, både som menneske og fagperson.

Sjekk ut ulike jobbmuligheter og hele vår faglige bredde på våre nettsider.

JOBB I BEKK ?

www.bekk.no

TIMESLOTS Room 1 Room 2 Room 3 Room 4 Room 5 Room 6 Room 7 Room 8 Room 9 Workshop

09:00 - 10:00 Coding against MongoDB in .NET

Metamagical programming with expression trees

F# and Machine Learning: a winning combination

Some Time Later: What’s the state of HTML5 & hybrid apps?

Continuous Delivery with Octopus Deploy

Build an extraordinary career by sharing your knowledge

Functional Programming: What? Why? When?

Getting Agile with Scrum

Typed? Dynamic? Both! Cross-plat-form DSLs in C#

Craig Wilson Einar W. Høst Mathias Brandewinder

Kevin Boyle Jeff French Johannes Brodwall

Robert C. Mar-tin

Mike Cohn Vagif Abilov

10:00 - 10:20 Break

10:20 - 11:20 Data Modeling Examples in the Real World with MongoDB

The Future of Extreme Web Browsing

1) Write cross-plat-form apps with F# & Xamarin. 2) ??? 3) Profit!

Accelerating Windows Store app development by using Prism for the Windows Runtime

Help! My code quality is not manageable

Internet of Things - Controlling the world with Arduino and JavaScript?

Advanced TDD: The Transforma-tion Priority Premise

User Stories for Agile Requirements

Beautiful Builds

Craig Wilson Robby Ingebretsen

Rachel Reese David Britch Patroklos Papapetrou

Magnus Green Robert C. Mar-tin

Mike Cohn Roy Osherove

11:20 - 11:40 Break

11:40 - 12:40 Back to basics: Finalization and disposition in .NET

Making 3D games with MonoGame

Lessons Learned - Web Application Testing in .NET

A lap around the Windows Phone 8.1 development platform

Architecting large Single Page Applications with Knockout.js

From SQL to RavenDB: A .NET Team’s Journey

Transforming your C# code to functional style

Agile Estimating

Say Hello to your Google Android Wear Watch

Nicole Calinoiu

Richard Garside

Gáspár Nagy Andy Wigley Steve Sanderson

David Simner Venkat Subramaniam

Mike Cohn Wei-Meng Lee

12:40 - 13:40 Lunch

13:40 - 14:40 Hadoop Kickstarter for the Microsoft Platform

How I hacked my way to Norway

Porting Quake III to F#: A Journey to Functional Programming

Building Universal Apps for Windows Phone and Windows 8.1

.NET Rocks Live!

The Internet Of Things and everything wireless

Clean Architecture and Design

Advanced Top-ics in Agile Planning

HTML5 & JavaScript Communica-tion APIs

TDD with AngularJS and TypeScript Workshop Part I

Gary Short Troy Hunt Will Smith Andy Wigley Richard Campbell

Jarle Boe Robert C. Mar-tin

Mike Cohn Christian Wenz

Sirar Salih

14:40 - 15:00 Break

15:00 - 16:00 Introducing Roslyn

Making Actors Scalable

Programming Pebble

TDD in Tatters From text to full-text

Towards an Evolutionary Architecture

Leading a Self-Organiz-ing Team

A Heaping Stack of Scripts: Getting the most out of JavaScript Stacktraces.

TDD with AngularJS and TypeScript Workshop Part II

Justin Rusbatch

Natalia Chechina

Wei-Meng Lee Scott Bellware

Martijn Laarman

Venkat Subramaniam

Mike Cohn Todd Gardner Sirar Salih

16:00 - 16:20 Break

16:20 - 17:20 Using the Scrum Rules Against your Boss

Web Audio: Can you hear me now?

The Future of UX with Kinect for Windows v2

Windows 8.1 Store Apps – Given to Fly

A Peek into an Enterprise Development Operation Team

A reality check on the Internet of Things - and how you can get started with your own project

Core Software Design Principles

History of Programming: Part 1

Case study: Making use of functional programming techniques in ..NET

Anders Abel Jory K. Prum Carl Franklin Kevin Dockx Nils Kjetil Vestmoen Nilsen

Simen Sommerfeldt

Venkat Subramaniam

Mark Rendle Hans-Chris-tian Holm

PROGRAM – Friday

78

Page 41: NDC Magazine

Donation

SMSAPI

Survey

Posisjonering

Merge

SMS

Loyalty Club

LOVESMS

Positio

nin

g

Voting

Vo

ting

Mobile

marketing

MarketingPassword

RemindersWarnings

Ordering

Confirmation

SMS

BillingHLR

VerifyingQuest SMS Loyalty Club

Pass

wo

rd

Survey

HLR Contact

update

Rabekkgata 9, Moss - Norway

[email protected] l +47 69 20 69 20

For more information:

www.vianett.com We love SMS!

The fast way to integrate

SMSinto your software

Donation

Reminders

Survey

PositioningMerge

SMSPayment

Payment

Positio

nin

g

Voting

Vo

ting

Marketing

Password

Password

Booking

Ordering

Ordering

Confirmation

SMS

Billing

MMSHLR

VerifyingGet inspired

AskSign up now for a free developer account: www.vianett.com/developer

JavaHTTP

ASP

COM

SMPP

MSSQL

YAP

SMTPFTP

Web Services

C#

“ViaNett`s API`s are simple and easy to understand, well documented and their support is excellent”

Erik Lerbæk IT-manager, Viking Redningstjeneste AS

Returadresse: ProgramUtvikling AS. Postboks 1, 1330 Fornebu