Page 1

SP PR ECI OG AL RA FU MM NC IN TIO G I NA SS L UE

MAGAZINE

FUNCTIONAL REACTIVE PROGRAMMING

F O R S O F T WA R E D E V E L O P E R S AND LEADERS

MIKAEL BREVIK AND STIAN MØLLERSEN

THE POWER OF PARTIAL APPLICATION

CREATING RESPONSIVE UIS WITH F#

SCOTT WLASCHIN

RACHEL REESE

Workshops Page 70

COURSES See descriptions Page 56

TEACHING DEVELOPERS NEW TRICKS KAROLINE KLEVER

NO 1/2014

THE DEVELOPER REBRANDED AS NDC MAGAZINE


NDC MAGAZINE

1-2014

Teaching developers new tricks There comes a responsibility with the job of being a developer, and that is to keep updated. Our worlds are constantly changing. The tools you used last year are not necessarily supported this year. That framework you loved is now overpowered by another, more extensive framework. And the methodology your project managers swore to didn’t work as well as promised, so from now on we’re trying a new one. The world you knew as a developer five years ago is a totally different world from the one you live in today. I’ve always found the term “self-taught” to be a bit misplaced when used in connection to development. We are all self-taught to some extent. When I think about the greatest developers I know and what they have in common, it’s that they constantly evolve. They self-teach every day, every week, every month. I’m sure that 90% of the knowledge they possess is self-taught, and that is what makes them extraordinarily good. When you have the privilege of being able to work on what you love, the fascination of what you do and how you do it will make you thrive for more. It makes you want to learn more.

videos, MOOCs, conferences etc., the list of ways to gain knowledge is endless. As our technological worlds are changing, there has been a shift in how we learn. We learn by teaching others what we know. Why else did you put that module you created on GitHub? And what about that blog posts you wrote last week? By publishing that blog post you not only had to put your newly gained knowledge into writing, but most likely you also contributed to someone out there learning a thing or two. It’s cheesy to say, but sharing is caring. There is a couple of important question all developers should ask themselves at least twice a year. That is “What are my goals for the next twelve months? What do I want to learn? How can I become better?” Being aware of where you want to go will enable you to learn the things needed to get there. Knowing that you’re constantly evolving and not making the same mistakes twice will also make it easier for you to find inspiration and motivation. And everyone who are lucky enough to have experienced it, knows that there is nothing better than to work in a team filled with motivated, knowledge-loving and knowledge-sharing developers. So what are your goals for the next twelve months? Karoline Klever

Our preferences to learning are different. Some developers learn by engaging in discussions over a beer, others read a book on the bus. There are blogs, Meetups, classes,

SP PR ECIA OGR L AM FUNC MIN TI G ISONA SU L E

MAGAZINE

FUNCTIONAL REACTIVE PROGRAMMING

F O R S O F T WA R E D E V E L O P E R S AND LEADERS

MIKAEL BREVIK AND STIAN MØLLERSEN

THE POWER OF PARTIAL APPLICATION

CREATING RESPONSIVE UIS WITH F#

SCOTT WLASCHIN

RACHEL REESE

Advertise in the NDC Magazine and meet your target group!

Workshops Page 70

COURSES See descriptions Page 56

TEACHING DEVELOPERS NEW TRICKS

For more information about advertisement, please contact Charlotte Lyng at +47 93 41 03 57 or charlotte@programutvikling.no

KAROLINE KLEVER

NO 1/2014

THE DEVELOPER REBRANDED AS NDC MAGAZINE

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


Contents ARTICLES The power of partial application....................................... p. 4 The ideal programming language..................................... p. 8 Seven Questions about Seven Languages ..... p. 12 0-layered architecture . .............................................................. p. 18 Creating responsive UIs with F# ............................... p. 22 Understanding programming paradigms ...... p. 28 The RELEASE Project

.................................................................

p. 32

Functional reactive programming ............................ p. 38 Teaching kids python with the Code Club

.....

p. 44

...............................................................................................

p. 46

Large-scale JavaScript applications and the DOM

Architecting for change ............................................................ p. 50 NDC London returning in 2014 ..................................... p. 54

COURSES Descriptions.................................................................................................. p. 56 Course overview..................................................................................... p. 68

Editor: Kjersti Sandberg

Marketing Manager: Charlotte Lyng

Member of Den Norske Fagpresses Forening

IC ECOLAB

EL

RD

67 2

24 1

Print run: 13,000 Print: Merkur Trykk AS

NO

Photo cover: Krostoffer Sunnset Design: Ole H. Størksen Uncredited photos are from Shutterstock, except portraits.

Pr

int in

g compa

ny

3


4

© Igor Petrovic/Shutterstock

The Power of PARTIAL APPLICATION


Some functional programming principles can seem bizarre and hard to understand when you first encounter them, but are immensely powerful when you master them. In this article we’ll look at the technique called “partial application” and see how it can be used in practice. By Scott Wlaschin

When a newcomer looks at a functional programming language, one of the first things that leaps out at them is that whitespace is used between the arguments in function calls rather than parentheses. For example, here is a simple “add” function: // define a function let add x y = x + y

// normal version: add three parameters let add3 x y z = x + y + z // alternate definition let add3 x y = (fun z -> x + y + z)

This concept is very different from what you might be used to non-functional languages, and you might be thinking: What good is it? What possible use can it have?

// use the function let result = add 1 2

Why don’t functional languages use parentheses, like “normal” languages? Why isn’t a function call written the standard way? let result = add(1,2)

// why not this way?

The reason is that, with functional languages, the parentheses can be put in a completely unexpected place; around the function name and first argument, like this: let result = (add 1) 2

Furthermore, the code in parentheses can actually be extracted into a separate function altogether and then called later: let partialFn = (add 1) let result = partialFn 2

The act of passing fewer parameters than needed is called “partial application”. Behind the scenes, you could think of “add” as being implemented as a one parameter function that returns a lambda (another one parameter function). The “x” parameter is “baked into” the lambda, so that it in turn only needs to take a single “y” parameter. // alternate definition let add x = (fun y -> x + y)

Any multi-parameter function can be treated this way. So for example, a three parameter “add” function can be treated as a two parameter function that returns a new one parameter function, like this:

Let me answer that by showing you three important examples of the power of partial application. PARTIAL APPLICATION WITH MAPS AND FILTERS In a functional programming language, when working with lists and other collections, you avoid “foreach” loops and tend to work on the entire collection at once, passing in a function that is applied to every element in the collection. The List.map function, for example, is defined like this: List.map (function to apply to each element) (a list)

So to add 1 to each element of a list we might write something like this: List.map (fun elem -> elem + 1) [1..10]

But that lambda is exactly the same as the output of the partially applied “add” function that we implemented earlier. In other words, we can reuse the “add” function by partially applying it with only one parameter, and passing the result to the map function, like this: List.map (add 1) [1..10]

Similarly, we could create a general “isDivisibleBy” function let isDivisibleBy divisor input = (input % divisor = 0)

And then we can use it in a partially applied form too, with a filter function, like this: List.filter (isDivisibleBy 2) [1..10]

5


This approach becomes even more useful when you need to chain a series of functions together, like this: [1..10] |> List.filter (isDivisibleBy 2) |> List.map (add 20)

So, when you see functions used in this way, you are seeing partial application in action. PARTIAL APPLICATION FOR DEPENDENCY INJECTION In object-oriented design, the concept of “dependency injection” is used to parameterize one object with another, typically by passing in an interface or service in the constructor. In functional programming, there are no classes or objects, but partial application can act as the equivalent technique. For example, let’s say that you need a function that looks up a customer in a database. The function will take a customer id as input and return a Customer value, so its signature will look like this: type GetCustomer = CustomerId -> Customer

But where’s the database? How can this function work without a database to talk to? The answer is that we can define an implementation with an extra parameter for the database connection. And in the implementation, we can use the passed-in connection to do the work, like this: let getCustomerFromDatabase connection customerId = // from connection // select customer // where customerId = customerId

But we can now do a trick! We can pass in only the first parameter (the connection), and get back a new function which now just takes the customerId, exactly as we want. let getCustomer = getCustomerFromDatabase myConnection

What’s more, we can easily mock a different version of the same function for testing. For example, we could use an inmemory map/dictionary as a lookup. The implementation of that function would look like this: let getCustomerFromMemory map customerId = map |> Map.find customerId

But again, if we pass only the map, we can get back a new function that looks just like any other “getCustomer” function. let getCustomer = getCustomerFromMemory myMap

So now we have two versions of a “getCustomer” function. One was created by partially applying the database

6

connection, and one was created by partially applying the map. They both have the same signature and are completely interchangeable, and they have both been “injected” with a different dependency. I hope you can see that this approach gives you exactly the same benefits that dependency injection and mocking do in the object-oriented world. PARTIAL APPLICATION IN CONJUNCTION WITH VALIDATION Finally, let’s look at one more use of partial application, which is to gradually build up a constructor function that can handle bad input. Say that you have a “Person” type that is built from other types: Name, Age and Email. type type type type

Name = Name of string Age = Age of int Email = Email of string Person = { name: Name age: Age email: Email }

Now let’s also say that the Name, Age and Email types have to be valid before they can be created. For example, the name must not be blank, the age must be a positive number, and the email must contain an “@” sign. We can enforce this by having constructors that do validation, and which return an optional value: “Some” if the input is valid, but “None” if the input is not valid. Here’s some code that demonstrates this: open System.Text.RegularExpressions open System // constructor that might return a Name // val name : s:string -> Name option let name s = if String.IsNullOrWhiteSpace(s) then None else Some (Name s) // constructor that might return an Age // val age : i:int -> Age option let age i = if i <= 0 then None else Some (Age i) // constructor that might return an Email // val email : s:string -> Email option let email s = if Regex.IsMatch(s,@"^\S+@\S+\.\S+$") then Some (Email s) else None

Here’s the problem: we want to create a valid Person, but the various inputs might be valid or not. Only if all the inputs are valid should we create the Person. How can we do this? The imperative approach might be to do all the validations, and then if they all valid, then create a new Person with the valid values. Here’s an example of how this might look:


// create a new Person let person unsafeName unsafeAge unsafeEmail = // validate each input let name = name unsafeName let age = age unsafeAge let email = email unsafeEmail if name.IsSome && age.IsSome && email.IsSome // if they are all valid then Some {name=name.Value; age=age.Value; email=email.Value} // else return None else None

Unfortunately, this code is ugly and error prone and it will only get smellier as more parameters are added. It would be nice if we could build the Person incrementally, processing one input at a time, and abandoning it immediately if we find a bad input. But the Person type is immutable and must be built all-or-nothing, so we seem to be stuck. However, there is a way to work incrementally, and the secret is to use partial application. First, we create a function that creates the Person type in the normal way. It will assume all the inputs are valid, so it is very simple. let person name age email = {name=name; age=age; email=email}

Because it is a function, we can build it up incrementally, processing one parameter at a time. First we pass in the first parameter, creating a partially applied function. If the first parameter is successful, then the partially applied function will be too (e.g. Something). But if the first parameter is not successful, then the partially applied function will also be unsuccessful (e.g. None) let partial1 = person (process) (name "Alice")

Next, we take the partially applied function (“partial1”) and pass in the next parameter. This time the result will be successful only if both the “partial1” and the parameter are successful, otherwise the result (“partial2”) will be unsuccessful. let partial2 = partial1 (process) (age 30)

Finally, we process the last parameter. Again the result will be successful only if both the function (“partial2”) and the parameter are successful, otherwise the result will be unsuccessful. let result = partial2 (process) (email "a@example.com")

So finally we have our result, which will be either success or failure.

Here’s the real code, with some helper functions “<^>” and “<*>” defined. let (<^>) = Option.map let (<*>) f x = match (f,x) with | (Some f'),(Some x') -> Some (f' x') | _ -> None let partial1 = person <^> name "Alice" let partial2 = partial1 <*> age 30 let result = partial2 <*> email "a@example.com"

This is a bit ugly, but we can remove all the intermediate steps (partials) and put all the code together, like this: let result = person <^> name "Alice" <*> age 30 <*> email "a@example.com"

In this case, all the inputs are valid, and the result is just as we would expect: // Person option = // //

Some {name=Name "Alice";age=Age 30; email=Email "a@example.com";}

We can also check that the error path works, by passing in invalid parameters: // bad name let result = person <^> <*> <*> // => Person option // bad age let result = person <^> <*> <*> // => Person option

name "" age 30 email "a@example.com" = None name "Alice" age -30 email "a@example.com" = None

In both these cases, we get the result “None”, as we would expect. So we now have an elegant way of building an immutable type, with validation included for all parameters. Thank you, partial application! SUMMARY In this article we’ve looked at partial application and some of its common uses. I hope that this technique has been demystified for you somewhat, and that you can see that, far from being a trivial trick, it is the foundation for many powerful functional programming techniques.

Scott Wlaschin is a functional programming consultant and trainer, who can be contacted at fpbridge.co.uk. He blogs about F# at fsharpforfunandprofit.

7


The IDEAL programming language

8


In this article, we will be designing and writing code to represent hands in a game of cards. However, we'll do so with a twist. Instead of relying on one of those trusty old workhorses, C# and Java, we'll use the language of our dreams: we’ll make it up as we go along, adding the features and capabilities we want. Why would we do such a thing? Well, I think that every once in a while, it's a useful exercise to fire all your tools and abstractions and start with a blank slate - have them re-apply for the job, if you like. In this article, we'll fire the programming language itself. After all, according to Wittgenstein, the limits of our language mean the limits of our world. By Einar W. Høst

Let's not dwell too long with lofty philosophical issues, though - we have work to do! First, we need some way of representing a playing card. In C# or Java, we'd create a class for that. However, I prefer abstractions that carry less weight. A playing card basically just consists of two types of information: the rank and the suit. So perhaps we could write something like this: datatype suit = Clubs | Diamonds | Hearts | Spades datatype rank = Ace | King | Queen | Jack | NumericCard of int datatype card = Card of suit * rank

We just made up the first concept in our ideal language: a datatype. A datatype may contain choices between things. The vertical bar is supposed to mean “or”, so a suit for instance is either Clubs or Diamonds or Hearts or Spades; similarly for rank. Numeric of int is the most succinct way I could think of to associate a card with a numeric value. A Card is associated with a tuple of suit and rank (the asterisk means “and”). An example should make things clearer. To do so, we need a way of introducing values. We'll use val. Now we can define two playing cards like this: val c1 = Card (Diamonds, Ace) val c2 = Card (Spades, Numeric 2)

I made it really, really easy to create tuples! One of my biggest complaints about C# and Java is that it is way too cumbersome to work with simple data types like tuples and lists. It should be trivial to put them together and pull them apart, since that's sort of the bread and butter of working with data. For instance, to create a list of cards (representing a hand, say), we shouldn't need to write anything more complicated than: val hand = [Card (Diamonds, Ace), Card (Spades, Numeric 2), Card (Hearts, Queen)]

9


That's it for data, at least for now. Let's add a bit of behavior - after all, data that just sits there isn't terribly interesting. For instance, say we wanted to define a function to translate the rank of a card into a numeric value. We could use the most fun keyword I can think of: fun value_of card = case rank_of card of Ace => 14 | King => 13 | Queen => 12 | Jack => 11 | NumericCard x => x

Remember that I said that it should be really easy to pull tuples and lists apart as well as put them together? In an ideal language, we should be able to pull things apart based on structure and content. Here we’re looking at the structure and content of the rank of the card and treating the different cases appropriately. The syntax I made up uses | to separate between cases (just as in the datatype definition) and => to say what we should do in each case. It’s like a switch statement, only useful. In case the rank is Ace, the value is 14. In case it is Queen, the value is 12. For Numeric, it gets more interesting. We’re able to magically capture the number associated with the Numeric in a variable, and return that variable as the value of the card. So for Numeric 8, the value is 8, for instance. Isn’t that cool? At this point, you might wonder about typing. Is this makebelieve language statically or dynamically typed? I vote for static. There's a lot of merit to static typing, I think, but it shouldn't require all that typing if you know what I mean. So the ideal language should allow me to write the succinct code I have above, yet arrest me if I get suit and rank mixed up! I'm imagining that there is some powerful type inference voodoo going on, much more potent than the meek and meager things that the C# and Java compilers do. The compiler should just look at the code and figure out what the types must be. If we try to pass in something that doesn’t match the compiler’s expectations, we should get an error - at compile time. The code shouldn’t even run. If we really want to, though, we should be allowed to provide type annotations. In some cases it helps readability. As an example, we’ll write a function to count the number of cards with a particular rank: fun count (r: rank) (hand: card list) = case hand of [] => 0 | (_, r')::cs' => if r = r' then 1 + count r cs' else count r cs'

Here, we’re explicitly stating that the type of r should be rank and the type of hand should be card list.

10

In the body of the function, we’re once again decomposing basic data structures - this time both a list and a tuple. I'm imagining there's a list operator :: that will push an element onto the front of a list. The neat thing is that it also works in reverse when used in a case expression, so that we can decompose a list into the first element and the rest of the list. The meaning of _ is “whatever” - we won’t use the value for anything. Also note that it’s fine to use variable names like r’ and cs’. Now it should be straightforward to understand what the function does. The hand is a list of cards. The list might be empty (written []), in which case the number of cards with rank r is zero. If, however, the hand is a list consisting of at least one card, there are two possibilities: either that card has rank r or it does not. If it has rank r we count it, otherwise we ignore it. Then we proceed recursively to count the cards with the right rank in the remainder of the hand. Next, suppose we discovered that it would be really useful to have a specific function to count the number of Queens. We could of course define a new function count_queens that would accept a list of cards, and then call the count function with Queen and the cards in the body. That would work, but I have a better idea. Let’s make our language so that functions only ever take a single parameter! Whenever someone writes two parameters in a function definition, we’ll interpret it as two functions chained together, each taking a single parameter. The first function takes the first parameter and produces the second function, which takes the second parameter and produces the expected output. Sounds weird? It turns out to be really neat. Now we have a general and flexible solution to the count_queens problem. Whenever we want a function explicitly for counting cards of a particular rank, we’ll just pass in the rank (and nothing more) to the count function, and our language will magically do what we want: return a function that will count cards of that rank! So this is sufficient to create a function to count queens: val count_queens = count Queen

Makes sense? Imagine trying to do that in C# or Java! At this point, perhaps it’s time to stop dreaming and wake up to reality. Where do we stand now? We invented some pretty powerful concepts that allowed us to write very light-weight and expressive code that closely represented the domain. If you ask me, the only sad thing at this point is that it's just a dream - right? Well, you might have seen this coming: it's actually not. The dream is very much real, and actually way older than both C# and Java. It’s called ML and was invented in 1973 (which probably means it’s older than you). You could (and should!) download Standard ML, start the REPL and enter the code snippets in this article and have the code run. You’ll find that Standard ML supports all the things we made up: light-weight data types, flexible composition and decomposition of tuples and lists, pattern matching on structure and content, powerful type inference, and lots of other things that we didn’t have time for. It’s an amazing language.


Einar W. Høst is a developer and technical architect at Computas. In the evenings, he indulges in impractical coding projects aimed at having fun with the djinns of the computer. He holds a PhD in Computer Science from the University of Oslo and thinks ivory towers are beautiful.

© ArtChi/Shutterstock

Of course, you might argue that I’m still in dreamland. I realize you’ll have a hard time convincing your project manager or customer to use ML over C# or Java, despite of all its merits. Surely programming in ML is for mad bearded professors and functional hipsters that don’t actually have to build anything real? Yes and no. While ML might be for evenings, F# is not, and F# is the granddaughter of ML (OCaml is the language in between). This means that you can write code that uses the same concepts that I pretended to dream up in this article, and still have access to all the other tools you rely on, at least if you’re on the .NET platform. If you’re on the Java platform, you can write code in a similar style in Scala, although the lineage from ML is not as clear in that case. Nevertheless, the ideas and concepts are very much the same. So I really think you’re out of excuses - the ideal language is available on your platform, and you should use it. Why wouldn’t you?

11


Seven Questions about Seven Languages

12


In this interview Bruce Tate (author of Seven Languages in Seven Weeks) fields questions from Bryan Hunter (CTO of Firefly Logic).

BH: Many computer books follow the formula of "{some skill recruiters know by name} in {programming language every recruiter knows by name}". Many computer books have a shallow, fast-food-coder, ticket-to-dollars feel to them. In the first "Seven Languages" book you covered Ruby, Io, Prolog, Scala, Erlang, Clojure, and Haskell. Recruiters know about Ruby and maybe about Scala, but this is an unusual book. It has a different philosophy. How would you describe its philosophy? BT: Great question! I strongly believe that the publishing industry is dying. Part of the pressure is due to the Internet. There's just so much that's instantly available and free. But part of the problem is that we have collectively lost our soul as an industry. When I start a writing project, I don't immediately ask myself what the market is likely to be. I write about what should be interesting to read.

Šlolloj/Shutterstock

There's another problem, though. We are used to looking for market leaders, and abandoning everything outside of the mainstream. It's a dangerous way for an industry to think. We are just now understanding that Java may not be the ideal language to solve every problem, nearly twenty years after it was invented. Seven Languages, as all of the seven-in-seven books, tells a story. We need a better set of tools for solving problems like distribution and concurrency, and some of those tools will come in the form of programming languages. The language choices show a logical progression toward more functional thinking, and that's not an accident. You can see the overall story in the way the book is organized. One object oriented language, one prototype language, a declarative language, and

four functional languages. I think a similar story is playing out on a landscape of problems and languages to solve them. BH: You mentioned "distribution", "concurrency", "declarative", and "functional" all pretty close together. That combination of terms points me (and Google) to Erlang. Am I reading too much into that, or do you see the role of Erlang (or the Erlang VM) in our industry changing? BT: Another great question. It's like you are reading the notes I took when forming the language list. From its role in phone switches since the late 80s, Erlang has had to solve these problems for a long time now, but it's not the only way. I think Clojure has an excellent take on distribution and concurrency. I also think pure languages like Haskell have pretty elegant takes. When there's no mutable state, both concurrency and distribution become much easier. I do think we are going to circle back for a second look at several important problems. When all is said and done, OTP, Erlang's library for distribution of their telephony platform, is going to be recognized as one of the platforms that got the monitoring and propagation of exceptions right. In Seven More Languages, I write about Elixir, which builds on top of the Erlang virtual machine but also adds the elegant Lisp-like macros. Elixir is going to be a very important language because JosĂŠ Valim (creator of Elixir) gets so much right: the syntax tree, the macro system, the streaming APIs. He knows how to say "no", and that's very important for a new language. The rich syntax is going to feel right to a lot of developers looking for metaprogramming with macros.

13


BH: In the first book the big surprise for me was the inclusion of the logic programming language Prolog. The family of declarative languages includes the logic languages and the functional languages. When this clicked, I realized you were playing a much longer game than “beat up on Java”. The declarative versus imperative question goes back to genesis of computer science with Church and Turing in the 1930s, through the AI battles between Stanford and MIT in the late 60s, and continues today with OO versus FP. With the inclusion of core.logic in the second book you reemphasize logic programming. FP prepares us for the future regarding concurrency and distribution, but what looming problem does logic programming address? BT: Prolog, for me, accomplished three goals. First, we were trying to tell a story with a progression of languages. Prolog helped me step into functional programming because it was so close to Erlang and because it was declarative, like the functional languages in the book. Second, Prolog let me introduce a new programming model, and one that was not represented in the book. Finally, in the Seven Languages series, we try to get a typical developer out of her comfort zone. Prolog was an outstanding candidate for doing so. You can't solve problems in the traditional way. You have to adapt to the language, or fail. Core.logic is similar, I think. It's a new programming model, because when you mix logic programming with FP, magical things happen. Even functional programmers and logic programmers will have to stretch a little bit, and that's a great thing. As to the problem it will solve, I don't know! Maybe tying logic languages to more general-purpose languages will open up the possibilities. But with Mini Kanren, the foundation of core.logic, there's some new strange and wonderful stuff going on. I can't wait to see where it takes us. BH: Another group of declarative languages that have good distribution and concurrency stories are the dataflow

14

languages. I've worked with one of them called Pure Data, and it's pretty amazing. I'm curious if you considered Pure Data for the second book? Actually what languages are in the second book? Most of your readers will have a pet language that wasn't included, would you walk us through your (cruel) process? BT: The languages in Seven More Languages are Factor, core.logic, Elm, Agda, Elixir, Julia, and Lua. Our process is a little complicated. We try to tell a story with the series. First, we decide on a narrative. Then, we decide what languages tell the story we want to tell. Usually, that process means we leave out some great choices. Pure data is completely new to me! We touch on reactive and data flow concepts with Elm. It's a Haskelllike implementation that represents the stuff that you'd typically handle with callbacks or mutable state with functions and signals. It's a beautiful abstraction, and one that blew my mind. Each chapter attacks a nontrivial problem. I chose to attack a game. It came in at under 200 lines of code, which was wildly productive. But I'll have to check out Pure Data. Seven languages three, anyone? :) BH: Yes, please! So Elm is a Haskell-inspired functional programming language for GUIs that compiles to JavaScript and runs in the browser. There is also ClojureScript, CoffeeScript, FunScript, and over 350 other languages that compile to JavaScript. So much effort is being spent hiding JavaScript. In 2009 Scott Hanselman described JavaScript as the Assembly language of the web. Douglas Crockford said JavaScript "has become a tragically important language, and we’re going to be stuck with it for a time”. Given all that, why would someone choose to write JavaScript on the server? How do you explain the popularity of Node.js?

V

BT: I think JavaScript is getting a resurgence for two big reasons. First, it is the one native language on the browser. That's a tremendous advantage for a language. Second, it's not Java. It has some elements of many

different languages and even programming models. Node is popular because JavaScript is popular and it's much better than some of the alternatives. In Seven Web Frameworks, we talk about the increasing proliferation of real components on the browser, and also the movement toward functional languages on the server. We attack one traditional framework, two JavaScript frameworks, and four functional ones. It turns out that functional programming is just a better abstraction for server-side web programming. I mean, we're just dealing with a set of functional transformations. Elm on the client side, or something like it, is inevitable for the same reasons. JavaScript is OK, but there are just better alternatives out there. JavaScript is a lot like Java in that regard. It's everywhere, and has been good for its time, but eventually the complexity will catch up. BH: Ryan Dahl the creator of Node.js said, "We should not be supporting more programming languages. We should be killing them.” While your fans would disagree with that sentiment, many businesses seem to agree with it. Standardization and consolidation have been business obsessions since Frederick Taylor. How do we make a business case for diversity of languages? How do we best address their fear? BT: I am not trying to make a political statement with the Seven in Seven line at all. I am making a learning statement. We are better programmers when we know more. Learning languages makes you smarter. Learning databases, web frameworks, concurrency models, and the like makes you smarter too. We need more programmers with a broader perspective. But a funny thing has happened. As people actually use those languages, more and more of them are actually finding that they like them, and are implementing systems that are saving their companies time and money. And their bosses are learning that they actually like money and success. I've come to understand that the time and money you save when you’re solving


BH: In these books you are doing for programming languages what Alan Lomax did for American folk music. In this research you’ve undoubtedly learned a ton that you couldn't fit into the formal constraints of the books themselves. What unpublished gem would you most like to pass along? What would you most like us to go out and learn? BT: That's a great analogy! I'm not sure I deserve the praise. I guess I'll wrap up with a story. A few months ago, I met José Valim at a conference. I told him that I admired his work and hoped to make as big an impact on our industry as he has. He laughed and told me that the three influences on his language were Ruby (which he already knew) for the rich syntax, Erlang for its concurrency and distribution

models, and Clojure for its macros. I laughed back and told him that I covered both of those languages in Seven Languages. He looked at me pointedly and said, "I know. Seven Languages was where I learned Erlang and Clojure." So my book was the inspiration for Elixir. I was stunned. I barely knew either language when I wrote those chapters. You see, I think Elixir is going to be a great language and a tremendously important one. I admire José tremendously. It's not quite what you were asking for, but my hidden gem is this. Be bold enough to explore, and bolder still when you share your experience with the world. When you do, great things can happen.

Bruce Tate is Author of Seven Languages in Seven Weeks, Deploying Rails Applications, From Java to Ruby, Rails: Up and Running, Beyond Java, 6 others.

Bryan Hunter is a geek, a Microsoft MVP in C#, a partner at Firefl y Logic, and the founder of Nashville Functional Programmers.

V

5

© complot/Shutterstock

a problem with the right tool trumps just about every other concern, within reason, of course.

15


Inspiring SINCE 2008 Developers We are proud to present the seventh NDC Thanks to our inspiring partners who make it happen!

Your logo here

@NDC_conferences #ndcoslo


For information about partnership deals, please contact: charlotte@programutvikling.no tel.: +47 93 41 03 57

Become a partner today!

ndcoslo.com


0-layered architecture By Bjørn Einar Bjartnes

N-layered architectures bring value through decoupling, but they come at a price. Computers are binary and our abstractions can slow things down. We will look at a typical n-layered ASP.NET Web API application for the special case of n = 0, where data is just a binary stream all the way from the database to the browser.

18


Š Carlos Castilla/Shutterstock

WHY? To respond fast when clients are asking for large amounts of data you can't wait for entire objects to finish loading before you respond, just as you don't wait for the entire movie to download when watching it online. As battle-hardened Enterprise developers we are used to working with humongous datasets, and as our users have been spoiled with the performance of modern web applications, we are challenged to deliver more data faster. In this article we will look at techniques on how to stream data from SQL Server to clients using .NET Web API. We will see that in freeing us from the shackles of traditional layered architectures we can drastically reduce latency and memory footprint.

19


STREAMS IN C# Streams are sequences of data made available over time. Streams can be visualized as a conveyor belt that makes data available in ordered chunks. Rather than waiting until the entire batch is produced, streams will emit a chunk of the sequence as soon as it is ready. This can be useful for many reasons. Streams require less resources for storage, as they do not store the whole batch before moving on to the next processing step. In computer terms this means less memory usage, for example by chunking up a file and sending it in pieces as opposed to reading the entire file into memory. Latency is also reduced as data can be sent before as soon as the first chunk is available. For example, the database can start sending data before it has read the entire dataset - through a webserver and to a browser - before it has finished reading all data. NON-STREAMING SOLUTIONS To begin, let us compare a typical streaming approach with a non-streaming one. We will write a .NET Web API controller that returns the content of a file. The program will read the entire file into memory and then return it to the client. [Route("")] public HttpResponseMessage GetResult() { var result = File.ReadAllText(@"C:\data\SwissProt.xml"); var response = new HttpResponseMessage(HttpStatusCode.OK) { Content = new StringContent(result) }; response.Content.Headers.ContentType = new MediaTypeHeaderValue("application/xml"); return response; } Figure 1 - Returning a file as a string. https://gist.github.com/bjartwolf/8536940

We have to hold the entire file loaded in memory until the request is disposed. Now, if the file is small, reading the entire file shouldnâ&#x20AC;&#x2122;t really be of much concern. However, if the file is large, we have to hold the entire object in memory until the client has finished downloading. In a typical .NET Web API solution where we serialize an object to the format desired by the client, we have to hold the C# objects in memory until the request is disposed. We will also typically wait for the entire object to be read from the database until we start serializing, paying a latency cost. STREAMING SOLUTIONS Instead of reading the entire file, let us just open a FileStream from the file and directly insert that as streaming content instead of string content. In C# we find the magic streams in the Stream Class in the System.IO namespace. This solution will send chunks of the file to the client, buffering only what it needs in memory. [Route("")] public HttpResponseMessage GetResult() { var fs = new FileStream(@"C:\data\medline13n0701.xml"), FileMode.Open); var response = new HttpResponseMessage(HttpStatusCode.OK) { Content = new StreamContent(fs) }; response.Content.Headers.ContentType = new MediaTypeHeaderValue("application/xml"); return response; } https://gist.github.com/bjartwolf/8580339

20


A ZIP-HACK Modern web clients all understand gzip. Gzip can zip and unzip data in a streaming fashion. All the data is still just a binary stream, all we have to do to make this work is gzip the file before we store it on disk and tell the web client that the response is gzipped through the Content-Encoding header. XML and JSON benefits greatly from compressions, in my examples data is compressed by almost a factor of ten when gzipped. [Route("")] public HttpResponseMessage GetResult() { var fs = new FileStream(@"C:\data\medline13n0701.xml.gz"), FileMode.Open); var response = new HttpResponseMessage(HttpStatusCode.OK) { Content = new StreamContent(fs) }; response.Content.Headers.ContentType = new MediaTypeHeaderValue("application/xml"); response.Content.Headers.ContentEncoding.Add("gzip"); return response; }

https://gist.github.com/bjartwolf/8537113

CACHING This is just cache, you might say? Yes, it really is just a cache. But it is optimized for when you need detailed control of your data and you have to cache large files. You can still do everything else, such as authentication and authorization and logging using the same techniques, as in the rest of your ASP.NET Web API solution. WHAT ABOUT THE REAL WORLD? The toy-examples above are certainly not ready for the enterprise. However, there are techniques for streaming content from SQL Server and also for having SQL Server storing content as files on disk through SQL Server FILESTREAM. I hope to be able to present these techniques to you at NDC Oslo 2014, but if you are impatient the code can be found at https://github.com/bjartwolf/SqlFileStreamWebApiDemo MORE INFO: http://blog.bjartwolf.com/?p=2002 http://vimeo.com/68236538 https://github.com/bjartwolf/FileStreamWebApiDemo http://download.red-gate.com/ebooks/SQL/Art_of _SS_Filestream_Sebastian_ and_Aelterman.pdf

Bjørn Einar is a developer with Computas AS where he works with SharePoint solutions for the petroleum industry. You'll also find him coding for fun in the Computas Lambda Club and tinkering with R/C cars and drones.

21


Reactive programming has become quite a buzzword lately. There has been much talk around the Microsoft Rx extensions for .NET, as well as the various JavaScript Reactive frameworks (Knockout.js, RxJs, etc.) and there are even a few new languages which focus specifically on the functional reactive programming style â&#x20AC;&#x201C; Elm and REScala, amongst others. By Rachel Reese

22


© Igor Petrovic/Shutterstock

Creating Responsive UIs with F#

Before we jump into any code, let’s define and contrast a couple terms.

submit, just to receive errors on the user’s end. The entire experience becomes more fluid for the user.

Reactive: This simply refers to a UI that is capable of automatically responding to information that has changed, either externally, or from another part of the app. For example, consider a form that only enables the submit button after the required information has been filled in. The code monitors each required field for an event such as OnKeyUp or LostFocus. The event handler then contains the logic to perform the necessary checks for all information and, if these checks pass, the submit button is enabled. A few simple lines of code can prevent the frustration of hitting

Responsive: Capital-R responsive often refers to “Responsive Web Design,” which is an entirely separate paradigm, generally focusing on a web site UI design that is able to handle many different devices and viewing sizes. During the course of this article, I will instead be referring to lowercase-r “responsive,” meaning more literally, “responds quickly.” For example, a properly responsive application should be careful about running computations on the main UI thread. When this thread is occupied, the application will appear to freeze, resulting in a poor user experience.

23


A REACTIVE UI IN WPF USING EVENTS Let’s start by looking at the most common way of creating responsive applications: through a combination of binding to properties and subscribing to events. This works well for simple cases, but will not give us a good way to offload heavy processing work to a background thread. Later, in the second part of this article, we’ll refactor this solution to use F# async workflows, but for now, we’ll start with an application that just uses binding and events. When it is run, the user is able to enter text into the top textbox and, automatically, it is color-coded into vowels and consonants. There’s an additional option to set ‘w’ and ‘y’ as vowels. Checking either checkbox automatically re-colors the text in the Formatted textbox.

SETTING UP THE UI BINDINGS The behavior of the two checkboxes was very straightforward logic to set up. Both contain a simple two-way binding in the XAML. <CheckBox Grid.Column="1" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center" IsChecked="{Binding Path=IsWVowel, Mode=TwoWay}"/>

This is connected to a fully-backed property in the ViewModel, so that more details may be added. In this case, a call to OnPropertyChanged for the property is added, which handles the INotifyPropertyChanged setup. Just like the checkboxes, the UnformattedText textbox also uses a very similar fully-backed property with the OnPropertyChanged event, but is not bound in the XAML. type FormatTextViewModel() = // lots of things omitted let propChanged = Event<PropertyChangedEventHandler,PropertyChangedEventArgs>() member this.IsWVowel with get() = isWvowel and set value = isWvowel <- value this.OnPropertyChanged("IsWVowel") // lots more things omitted member this.OnPropertyChanged(name) = propChanged.Trigger(this, new PropertyChangedEventArgs(name)) [<CLIEvent>] member this.PropertyChanged = propChanged.Publish interface INotifyPropertyChanged with [<CLIEvent>] member this.PropertyChanged = this.PropertyChanged

24


SETTING UP THE EVENT HANDLERS In addition to publishing the PropertyChanged event, the UnformattedText textbox obtains knowledge of each new character by checking for the KeyUp event in the textbox, and then setting the property in the ViewModel to the current value of the textbox text. This happens in the app.fs module, as part of the loadWindow method. Also contained in the loadWindow method is the event handler for the PropertyChanged events, which updates the text for the FormattedTextBox. Because that textbox is read-only, there is no backing property, just a call to the GetFormattedText method. This is called when any of the properties change, because all three affect the final output of the FormattedTextBox. let loadWindow() = _viewModel.PropertyChanged |> Event.add (fun _ -> window.FormattedTextBox.Document <- _viewModel.GetFormattedText) window.UnformattedTextBox.KeyUp.Add(fun _ -> _viewModel.Text <- window.UnformattedTextBox.Text)

IMPLEMENTING THE TEXT FORMATTING This GetFormattedText method is the heart of the application. First, it checks the incoming string of text for vowels via the CheckForVowels method in the applicationâ&#x20AC;&#x2122;s Model. let private isVowel isWvowel isYvowel character = let isV = match character with | 'a' | 'e' | 'i' | 'o' | 'u' | 'A' | 'E' | 'I' | 'O' | 'U'-> true | 'w' | 'W' when isWvowel -> true | 'y' | 'Y' when isYvowel -> true | _ -> false (character, isV) let CheckForVowels isWvowel isYvowel text = Array.map (isVowel isWvowel isYvowel) text

Then, that information is sent to the BuildDocument and associated ConvertText methods, which create a new instance of the Run class for each character, color the text appropriately, and then add all of them to a new FlowDocument. The FormattedTextBox then takes the new FlowDocument as its text property. If you are new to the RichTextBox in WPF, the Run class works very much like an html <span> tag to format small sections of inline text (in our case, a single character) without adding additional spacing. These Runs must be added to a paragraph, which creates a full block of text (i.e., not inline). The paragraph may then be added to the FlowDocument is one of the top-level elements that gather text into a document for displaying. Specifically, it allows dynamic reformatting for different content sizes â&#x20AC;&#x201C; in other words, for a Responsive (capital-R) design, use a FlowDocument.

25


let ConvertCharacter unformattedText = let character, isv = unformattedText let fg = if isv then Brushes.OrangeRed else Brushes.DarkSlateGray let run = new Run(character.ToString(), Foreground = fg) run let BuildDocument (unformattedText:(char*bool)[]) = let fd = new FlowDocument() let par = new Paragraph() unformattedText |> Array.map ConvertCharacter |> par.Inlines.AddRange fd.Blocks.Add(par) fd member this.GetFormattedText = BuildDocument <| FormatTextModel.CheckForVowels this.IsWVowel this.IsYVowel (this.Text.ToString().ToCharArray())

The main issue surrounding this example is that all the computation is happening on the main UI thread. With very short computations this is easily tolerated, but if these were longer, more complicated computations, the UI would be blocked and frozen until the computation completed its work. For example, adding in a Thread. Sleep(500) into the CheckForVowels method in the Model causes the UI to hang quite frustratingly. This makes this UI still reactive, but most definitely not responsive. REFACTORING FOR A RESPONSIVE, NON-BLOCKING UI IN WPF USING ASYNC WORKFLOWS To solve the problem of long computations blocking the UI, we look to async workflows. We simply need to asynchronously off-load the heavy processing to another thread. When the processing is complete, the updates return, and the UI is reactively updated. To do this, we only need modify a few methods. Starting in the Model, we must transform the CheckForVowels method to an asynchronous method. We specifically want to block the thread in this instance (to simulate heavy work), so we leave Thread.Sleep here. If we had just wanted to delay the computation without blocking, we would have waited asynchronously, using Async.Sleep. let CheckForVowels isWvowel isYvowel text = async { Thread.Sleep(500) return Array.map (isVowel isWvowel isYvowel) text }

Next, since we call the CheckForVowels method from the GetFormattedText method, we must also update it to an asynchronous method. We also asynchronously call the Async.StartChild method, assigning the started token to textArray_async. Then, to insure we explicitly wait for the completed computation, we assign textArray_async to textArray before returning the value. The two-step protocol would allow us, in a larger application, to start several async computations in the background at once, before checking whether any were complete. member this.GetFormattedText = async { let! textArray_async = Async.StartChild(FormatTextModel.CheckForVowels this.IsWVowel this.IsYVowel (this.UnformattedText.ToString().ToCharArray())) let! textArray = textArray_async return BuildDocument textArray }

26


Finally, there are major changes to the App.fs module. Both events are refactored out of the loadWindow method into their own async methods, which loop and use the Async.AwaitObservable method to watch for the events published from the view model. Both otherwise update the same respective information as before. let loadWindow() = window.Root.DataContext <- _viewModel window.Root let OriginalTextLoop() = async { while true do let! keyup = Async.AwaitObservable(window.UnformattedTextBox.KeyUp) _viewModel.UnformattedText <- window.UnformattedTextBox.Text } let FormattedTextLoop() = async { while true do let! formattedTextChanged = Async.AwaitObservable(_viewModel.PropertyChanged) let! fd = _viewModel.GetFormattedText window.FormattedTextBox.Document <- fd }

We also must start the loops before we show the window. We do this with a call to Async.StartImediate. Async.StartImmediate(OriginalTextLoop()) Async.StartImmediate(FormattedTextLoop())

Once we’ve refactored our original project to add these few changes, we’re able to type freely in the UnformattedTextBox without the potentially heavy processing in the Model interfering with the UI. CONCLUSION It’s straightforward and simple to create responsive, reactive UIs with F#, as events are first-class values, and we are able to easily pass them around without creating IObservable<T> by hand. Consider the use above of Event.Add. It is just a normal function that takes an event as a parameter. When we also use Async workflows, the solution becomes particularly elegant. Async.StartImmediate will ensure that all non-background work is run on the UI thread, meaning you are able to access UI elements in your async block, which will free you from worrying about dispatchers. You can view the full source code here: https://github.com/rachelreese/Articles/tree/master/ The%20Developer%20-%20NDC%20-%20Feb%202014

Rachel Reese is a long-time software engineer and math geek who has recently relocated to Nashville, TN to work with the fabulous folks at Firefly Logic, as well as to be a part of the Nashville functional programming scene. She currently helps run the Nashville Xamarin user group, @NashXam. She previously ran the Burlington, VT functional programming user group, @VTFun, which was a constant source of inspiration to her, and at which she often spoke on F#. She's also an ASPInsider, an F# MVP, a community enthusiast, one of the founding @lambdaladies, and a Rachii. You can find her on twitter, @rachelreese, or on her blog: rachelree.se 27


Understanding programming paradigms By Karoline Klever

Having spent my whole career on imperative programming, what fascinates me most about functional programming is how much the declarative mindset differs from that of the imperative. Being a sub paradigm of declarative programming, the mind-boggling lambda expressions and recursive functions of functional programming may seem quite intimidating. 28


© agsandrew/ Shutterstock

In this article, I will compare imperative and declarative programming, see how functional programming connects to these two paradigms, and give you a short overview of a study done on combining several programming paradigms in a project.

A COMPARISON OF IMPERATIVE AND DECLARATIVE PROGRAMMING In imperative programming, you describe to the computer exactly how you want it to do whatever it is that you want done. In declarative programming, however, you describe what you want done, without specify-

ing how the computer should do it. For example, imagine you want your friend to make you Spaghetti Bolognese. The imperative way would be to give him a recipe, telling him exactly how you want him to make it. The declarative way, however, would be to just say “make me some Spaghetti Bolognese”,

29


and then let him decide for himself how to cook it. In either case, the end result should be you eating Spaghetti Bolognese. So in imperative programming, you write the “recipe” for your program and you also decide the flow of your program by using control structures such as if-then-else, continue, return, loops etc. This means that you’re in charge of the execution order of your program. You tell the computer that you want A to run before B; you want the onions to fry before adding the meat. The declarative paradigm doesn’t allow this, since the order of execution is out of your hands. The computer may decide to rearrange your program or run your tasks in parallel if that’s deemed to be the most efficient way of running your code. If you’re used to the imperative mindset, not knowing the execution order of your program can be quite confusing, it can feel like you’re not entirely in control. Keep in mind that that’s the point though: The computer eliminates risk by excluding you from the program flow decision making. Instead, you only need to focus on the main logic of your program. COMBINING MULTIPLE PROGRAMMING PARADIGMS As mentioned earlier, functional programming is a sub paradigm of declarative programming. Some functional languages are purely declarative (such as Haskell, Lisp and Erlang), but this is not the case for all functional languages. Take Scala and F# for example - both of these integrate functional programming with imperative, object oriented programming, enabling the developer to choose to which extent their programming technique should be functional or imperative. A study titled “On the Benefits of Combining Functional and Imperative Programming for Multicore Software” [1] investigates how developers can combine several programming paradigms in a project and how this affects the end result. The study was conducted on thirteen subjects who all went through the same training in Scala and Java, after which they were split into two groups. Each group was given an individual four-week project

30

building a complex parallel application – subjects in one group programming in Java, and the others using Scala. After finishing the initial assignment, subjects were asked to do the same project over again - but this time in the other language. Reuse of code and sharing among the project groups was, of course, forbidden. Throughout the study, the subjects were interviewed, their code was reviewed and their progress was tracked daily. As Scala is a multi-paradigm programming language, it is quite interesting to see how the subjects combined functional and imperative programming in practice. The study concluded:

Take C#, for instance - you might think it’s strictly imperative, but it actually contains declarative features, such as LINQ. Taking a closer look at your chosen programming language and understanding the paradigms it’s based on will make you better equipped to take advantage of its strong points and avoiding its pitfalls. [1] Pankratius, Victor, Felix Schmidt, and Gilda Garretòn. On the Benefits of Combining Functional and Imperative Programming for Multicore Software. Karlsruher Institut Für Technologie, 2011.

“8 subjects use more than 50% imperative style […] and 5 use more than 50% functional style. At the extremes, one subject uses 98% imperative style and one subject 78% functional style. […] No subject entirely rejects either style […]” These results demonstrate that many of the test subjects balanced the use of imperative and functional styles quite well. As expected, the use of functional style was slightly higher in parallel programs than in sequential programs. Comparing the choice of programming style to the performance of the programs reveals that the top three performing programs all combined functional and imperative programming to a significant degree. This study is one of the few done on combining programming paradigms, as research into this field has been limited. But as the list of multi-paradigm languages continues to grow, the need for developers to understand the impact of combining programming paradigms grows with it. UNDERSTANDING YOUR OWN PROGRAMMING LANGUAGE The difference between imperative and declarative programming is quite clear; in imperative programming you tell the computer how you want things done, while in declarative programming you tell the computer what you want to achieve. Not all developers know which paradigm their programming language belongs to though, and the answer is not always straight forward.

Karoline Klever is a developer and consultant working at Epinova, where she mainly focuses on EPiServer and Microsoft Dynamics CRM integrations. She is a Microsoft Certified Solution Developer and has a passion for web development.


Java 8 With Venkat Subramaniam 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 first book on Java 8 to hit the market, to help you make a quick and effective transition to Java 8 and its functional capabilities.

Scalable design and implementation using C++ With Andrei Alexandrescu This course teaches advanced topics in designing and implementing large, scalable systems using C++11. Performance and system-wide robustness are primary concerns. New features of C++11 (and idioms they enable) that help reduce boilerplate and make complex system implementations are introduced.

Programming in Functional Style With Venkat Subramaniam This 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.

BECOME A CERTIFIED SCRUMMASTER OR A PRODUCT OWNER Certified ScrumMaster - CSM - Mike Cohn 2 days: 02. June Certified Scrum Product Owner - CSPO - Mike Cohn 2 days: 04. June

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

Mike Cohn

Geoff Watts

ScrumMaster - Geoff Watts 2 days: 22. April


Every eighteen months during the last thirty years has seen the power of the computer that can be built on a silicon chip double – this has now come to a halt. Instead, chip manufacturers build multiple computers – or cores – on each chip: nearly all PCs are now ‘dual’ or ‘quad’ core, and the number of cores it is possible to put on each chip is growing exponentially. By Natalia Chechina and Phil Trinder

The RELEASE Project 32


KEY INNOVATION Building software for these multicore systems requires radically new software development technologies that can exploit the platform. Instead of programming a single core, the cores have to be programmed to work together in a coordinated way, and in a way that scales with the numbers of cores. Many expect 100,000-core platforms to become commonplace, and the best predictions are that core failures on such an architecture will be common, perhaps one an hour. Hence we require a programming model that is not only highly scalable but also reliable. The RELEASE project develops the first a scalable concurrency-oriented programming infrastructure and its associated tool set, and hence aims to reduce development times of multicore solutions while delivering increased reliability. TECHNICAL APPROACH Our platform builds on the Erlang language and Open Telecom Platform (OTP) libraries. Erlang[1] is a functional programming language. Its concurrency-oriented programming paradigm is novel in being very high level, predominantly stateless, and having both parallelism and reliability builtin rather than added-on. Some of the principles of the Erlang philosophy are as follows. Share nothing implies that isolated processes do not share memory and variables are not reusable, i.e. once a value is assigned it cannot be changed. Let it crush is a non-defensive approach that lets failing processes to crash, and then other processes detect and fix the problem. Erlang/OTP has inherently scalable computation and reliability models, but in practice at the beginning of the RELASE project scalability was constrained by aspects of the language, Virtual Machine (VM) and toolset.

© kIRr/Shutterstock

The RELEASE consortium attacks these problems at three levels: • We evolve the Erlang VM – which implements Erlang on each core – so that it can work effectively in large-scale multicore systems.

33


• We also evolve the language to Scalable Distributed (SD) Erlang, and adapt the OTP framework to provide constructs to control how computations are spread across multicore platforms, and coordination patterns to allow SD Erlang to effectively describe computations on large platforms, while preserving performance portability. • On top of the language and the VM we develop a scalable Erlang infrastructure to integrate multiple, heterogeneous clusters.

To exploit such large platforms, programmers need to be able to understand how their programs are behaving in practice. We build online SD Erlang monitoring and visualization tools to enable programmers to profile and visualize their SD Erlang applications; to refactor Erlang programs to run scalably and efficiently under SD Erlang; and to debug SD Erlang systems. DEMONSTRATION AND USE We demonstrate the effectiveness of the RELEASE approach in two case studies. EDF will port the Sim-Diasca simulation framework[2] to SD Erlang on the Blue Gene parallel computing platform. Sim-Diasca (SIMulation of DIscrete systems of All SCAles) is a distributed engine for large scale discrete simulations implemented in Erlang. The engine is able to handle more than one million relatively complex model instances using a hundred of cores. In an example of commercial use, Erlang Solutions has developed a deployment and management infrastructure Wombat[3] to exploit multiple heterogeneous cluster and cloud resources. SCIENTIFIC, ECONOMIC AND SOCIETAL IMPACT The presence of major European industrial players such as Ericsson and EDF in the consortium enables rapid commercialisation of the pro-

34

ject outputs, enhancing European competitiveness in the software development market and ultimately leading to new high technology jobs in Europe. The Erlang Solutions SME will gain additional revenues from marketing deployment and management infrastructure Wombat developed in the project. Ericsson exploits the new technology in new products and to move existing products to emerging hardware platforms to maintain their competitive position. EDF is working on simulation of smart energy grids using the Sim-Diasca simulation engine to model times more accurately than the previous version, leading to more efficient electricity supply and potentially to lower energy costs. PROJECT PARTNERS

COUNTRY

University of Glasgow

UK

Heriot-Watt University

UK

University of Kent

UK

Erlang Solutions Ltd

UK

Ericsson AB

Sweden

Institute of Communication and Computer Systems

Greece

Electricité de France SA (EDF) France Uppsala Universitet

Sweden

KEY ACHIEVEMENTS TO DATE • To improve the scalability of the Erlang VM we have made five important changes and architectural improvements that have been included in the Erlang/OTP release R16B03[4]. A prototype version of a sharing-preserving variant of the Erlang VM has also been developed and is currently being tested for inclusion into March 2013 Erlang/OTP release R17. • To improve language-level scalability we have implemented a reliable s_group library. The implementation is validated by giving an operational semantics and validating the semantics against the library using QuickCheck[5]. SD Erlang is open source and available from[6]. • We have produced a deployment and management infrastructure Wombat for exploiting multiple heterogeneous clusters/cloud resources.

• We have developed, improved, and made open source releases at http://www.release-project. eu/ of five concurrency tools: two online/offline profiling tools, i.e. Persept2[7] and DTrace/SystemTap, a prototype visualisation tool[8], the extended refactoring tool Wrangler[9], and the concurrency error detection tool Concuerror[10]. • As a case study we have adapted Sim-Diasca, a substantial distributed Erlang Simulation engine, to be reliable and more scalable. Future plans include further concurrency improvements to the Erlang VM; deployment and evaluation of the tools at scale; for SD Erlang to become a part of standard Erlang OTP library, and performance evaluation of the scalable infrastructure on an IBM Blue Gene/Q. ACKNOWLEDGEMENTS We would like to thank all our RELEASE colleagues. This work is supported by the European Union grant RII3-CT-2005-026133 'SCIEnce: Symbolic Computing Infrastructure in Europe', IST-2011-287510 'RELEASE: A High-Level Paradigm for Reliable Large-scale Server Software', and by the UK's Engineering and Physical Sciences Research Council grant EP/G055181/1 'HPC-GAP: High Performance Computational Algebra and Discrete Mathematics'.


BIBLIOGRAPHY [1] F. Cesarini and S. Thompson, Erlang Programming: A Concurrent Approach to Software Development, O'Reilly Media Inc., 2009, 1st edition. [2] “Sim-Diasca,” EDF, [Online]. Available: http://researchers.edf.com/ software/sim-diasca-80704.html. [Accessed 2014]. [3] “D6.3 Distributed Erlang Component Ontology,” Erlang Solutions Ltd, http://www.release-project.eu/, 2013. [4] “OTP R16B03-1,” Ericsson Computer Science Laboratory, [Online]. Available: http://www.erlang.org/ download.html. [Accessed 2014].

[5] “ QuickCheck,” QuviQ, [Online]. Available: http://www.quviq.com/ index.html. [Accessed 2014]. [6] “release-project/otp,” RELEASE project, [Online]. Available: https:// github.com/release-project/otp/ tree/dev. [Accessed 2014]. [7] H. Li and S. Thompson, “Multicore Profiling for Erlang Programs Using Percept2,” in Twelfth ACM SIGPLAN Erlang Workshop, pp. 33-42. ACM Press, Boston, USA, 2013.

Natalia Chechina is a postdoctoral research associate at Glasgow University in the RELEASE project.

[8] S. Thompson, R. Baker, P. Rodgers and H. Li, “Multi-level Visualization of Concurrent and Distributed Computation in Erlang,” in 19th International Conference on Distributed Multimedia Systems (DMS 2013), Brighton, UK, 2013. [9] Wrangler Refactoring Tool" H. Li, S. Thompson [Online]. Available: http:// www.cs.kent.ac.uk/projects/wrangler/Wrangler/Home.html [Accessed 2014] [10] M. Christakis, A. Gotovos and K. Sagonas, “Systematic Testing for Detecting Concurrency Errors in Erlang Programs,” in Sixth IEEE International Conference on Software Testing, Verification and Validation, pp. 154—163. IEEE Computer Society, Luxemburg, 2013.

Phil Trinder is a Professor at Glasgow University, and is a principle investigator of the RELEASE project. He is mainly interested in how to better exploit multi- and many-core machines, Clouds, High Performance Computers (HPC), and other platforms.

© kIRr/Shutterstock

GENERAL PROJECT INFORMATION Project coordinator: Glasgow University Contact person: Phil Trinder School of Computing Science, University of Glasgow G12 8QQ Glasgow, United Kingdom Tel: +44 141 3303627 Fax: +44 141 3304913 Phil.Trinder@glasgow.ac.uk Project website: www.release-project.eu Community contribution to the project: 2,400,000 Euro Project start date: 01.10.2011 Duration: 36 months

35


Inspiring SINCE 2008 Developers

Oslo Spektrum

2 DAYS OF WORKSHOPS 3 DAYS OF CONFERENCE TALKS

Keynote: Luke Wroblewski (US)

@NDC_conferences #ndcoslo


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

Price

All Access Pass (Workshops + Conference) 3 Day Conference Pass 2 Day Conference Pass 1 Day Conference Pass

NOK 18500 NOK 11500 NOK 10000 NOK 8500

2 Day Pre-Conference Workshop Pass 1 Day Pre-Conference Workshop Pass

NOK 9800 NOK 6800

25% VAT will be added to all ticket types.

be inspired

sign up now! ndcoslo.com


© Vikpit/Shutterstock

FUNCTIONAL REACTIVE PROGRAMMING

38


Functional reactive programming (FRP) is a merge of two different programming paradigms; functional and reactive. In this article we explore the history and theoretical foundation of FRP before diving into FRP in practice with an example in JavaScript using Bacon.js. After reading this article, you will have a basic understanding of what functional reactive programming is, which benefits it gives and how to apply it to your daily work. By Mikael Brevik and Stian Møllersen

BACKGROUND AND HISTORY Functional Reactive Programming is not a new concept in computer science. It can be traced to 1997, when Conal Elliot, from the Microsoft Research Group, and Paul Hudak, from Yale University released, the research paper "Functional Reactive Animation" in the proceedings of International Conference on Functional Programming1. The academic paper introduces a collection of data types and functions in a system called FRAN (Functional Reactive ANimations). FRAN in turn is preceeded by work done by Conal Elliot and the ActiveVRML modelling language. ActiveVRML was a declarative modelling language for defining simple, sophisticated and interactive animations2. The implementation of FRAN was based on the programming language Haskell, which is an easy extendable functional programming language. As Haskell may have some problems with space leaks, FRAN did as well. To try to fix this, Paul Hudak (et. al.) introduced Real Time FRP (RT-FRP) in a paper from 20013. RT-FRP made some simplifications to the model, but in turn lost some of the expressiveness of the FRAN system. A short year after introducing RT-FRP, the Yale team also released Event-Driven FRP, focusing

on value changes triggered by events and propagating values only on these events4. Some years later, Conal Elliot published the paper "Push-Pull Functional Reactive Programming" (2009)5. In this paper he described a way to implement FRP with a more modernized interface, and where the reactive values had a more simplified semantic. All reactive values were described with push- and pull-based evaluation. In later years, several different implementations and libraries have arisen. Some examples are the compile-tojavascript languages Elm6 and Flapjax7, or Bacon.js8 â&#x20AC;&#x201C; which is written completely in Javascript. There are also implementations in languages like C#, Java, Scala, Objective-C, Ruby, and more. THEORETICAL FOUNDATION The primary goal of functional reactive programming is to enable functional programming of user interfaces. Why does one want to program functionally? Functional programming gives the programmer tools to reason about code, both informal and rigorous, through the use of immutability and pure functions.

39


Immutability means that once a value has been instantiated, it does not change. Pure functions means that a function will always produce the same output given the same input. To create more advanced behaviour one can combine functions through other functions, which are known as higher order functions. These take functions as inputs and produce functions as output. This class of functions are also known as combinators. The most well-known combinators are map, reduce and filter. When composing functions in this manner, we program declaratively. A declarative programming style is more concerned with the what happens instead of the how something happens.

40

while leaving the task of actually propagating state to the execution model of the language or library used. The best example of data flow is the interaction between cells in a spreadsheet. If you change one cell, another cell which has a dependency on that cell would automatically be updated. For instance with one cell being the sum of two other cells.

If these traits are so great, why are they not found more often in modern programming? It has to do with the fact that many of the important attributes of programs are naturally mutable. This is especially true for user interfaces, where the user may mutate the state of the interface through actions.

Combining the reactive datatypes with functional composition we arrive at functional reactive programming. Because the semantics of reactive programming allows us to define datatypes that represent a value that handles its own mutation we can use that to introduce "safe" abstractions. Functions operate only on these abstracted datatypes and from the view of the function the state is immutable. All the mutation is left to the underlying implementation of the datatype. We can now use the composition vocabulary from functional programming without compromising the traits we wanted in the first place.

In addition to being mutable, environments like user interfaces are often asynchronous in their behaviour. This leaves us with an environment where the state may change at any point in time and outside the control of the program. In addition the order in which actions are performed is also important, so the temporal aspect of actions needs to be accounted for. This does seem largely at odds with the traits we want to obtain from functional programming. This is where reactive programming comes in.

Classical functional reactive programming deals with two different representations for values that vary with time. Behaviours, which are continuous values, can be represented as a function of time which yields a value f(t) -> v. Events, which are sequences of discrete events modelled as a list of value and time pairs [(t, v)], to account for discrete phenomena. This way FRP successfully deals with mutable and asynchronous environments while accounting for the temporal aspect.

Reactive programming is a programming paradigm that deals primarily with the flow of data and semantics for expressing how changes in state propagates through a dependency graph. Using reactive programming, a programmer is able to define datatypes that express data flows

FRP IN PRACTICE As mentioned a few times already, FRP really shines when used to program user interfaces. But there is nothing that limits us from applying the same theories to other environments that share the same characteristics as user interfaces.


By using the FRP style of programming we are able to instantiate data type, which can represent a value that can change at varying times, and compose these datatypes using functional composition. Because all our combinators are pure and the datatypes are immutable we only need to instantiate each representation once, the same goes for composed datatypes. This lends itself extremely well to code-reuse.

wraps events from DOM or jQuery events, objects from Node.js' EventEmitter, or Bacon.fromPromise() creates reactive data from promises. There are also several other methods, like creating data types from callbacks, from arrays, constant intervals and polling.

With FRP being at a high abstraction level and in a declarative style, we are able to achieve a great deal of functionality with rather few lines of code. With all state being managed internally by the reactive datatypes the programmer is freed from much of the cumbersome responsibility of working with mutable and asynchronous environments. And with the temporal aspect of actions being accounted for, FRP gives us a model which fits very well with these kind of domains.

bacon.fromEventTarget($('button'), 'click') .onValue(function() { console.log('FRP!'); })

PRACTICAL EXAMPLE For this practical example, we will take a closer look at Bacon.js which is a classical FRP implementation in Javascript. Bacon.js is created by Finish developer Juha Paananen. In this section we will see how Bacon.js can be used to achieve FRP in the browser. We will use Bacon.js to implement a simple SVG dot-drawer: tracking the mouse movement and when the mouse button is pressed draw dots every N milliseconds. BACON.JS INTRODUCTION As with classical FRP, we have events and behaviours. But in Bacon.js, we call them event streams and properties. A property always has a value, but an event stream is discrete. In Bacon.js we can wrap event sources to reactive data types using different functions. E.g. Bacon.fromEventTarget()

In the most simplest form we can react to an event like so:

We see that we can print string when a button is clicked. In most cases, Bacon.js returns a new event stream or property, but .onValue returns a function to unsubscribe to the events. Bacon.js uses lazy evaluation internally, only pushing values if there are subscribers. For example, without adding .onValue (or other methods adding subscribers, like assign) no value will get pushed. bacon.fromEventTarget($('button'), 'click') .doAction(function() { console.log('FRP!'); })

Prints nothing, even if the button is clicked. But Bacon.js can do much, much more than just printing values on clicks. We can start getting creative by using regular functional operations like map, filter, reduce and more. We will see more of this in the next section, where we implement our example. BACON.JS EXAMPLE IMPLEMENTATION The kind of state management and input/output handling this example demands could easily become a very cumbersome task using traditional imperative code. Using FRP, how ever, this should be a breeze.

41


We begin by initiating some event streams we shall use to compose a property of mouse movements.

var $svg = $('svg'), mouseMove = bacon.fromEventTarget($svg, 'mousemove'), mouseDown = bacon.fromEventTarget($svg, 'mousedown').map(true), mouseUp = bacon.fromEventTarget($svg, 'mouseup').map(false);

In this code we start of by fetching our SVG element. With that element, we create three different event streams: mouseMove - a property (behaviour in classical FRP lingo), that holds information about the position of the mouse. mouseDown - a discrete reactive data type that is triggered each time a mouse is clicked. Note the transformation on the end. By default, using .fromEventTarget gives the jQuery event as value, but by doing .map(true) we know we have a event stream with the value true each time the event stream is triggered. The mouseUp value is similar to mouseDown, except we transform the data value to be false for each trigger. Using both the mouseDown and mouseUp we can compose a new behaviour indicating whether or not the mouse button is held down. var isClickDown = mouseDown.merge(mouseUp).toProperty(false);

We see that if we have a stream of false values and merge it with a stream of true values, the resulting stream will be a stream of both false and true. We use .toProperty(false) to generate a property with false as the initial default value. The result, as stored in isClickDown, is a property that has the value true if the mouse is clicked, and false otherwise. It's important to notice, mouseDown and mouseUp is not altered in any way, and the returned isClickDown is an new immutable property.

We see that we take base in mouseMove which we have defined earlier. Taking that event stream, we use filter and the property isClickedDown to generate a property that has value only when the property isClickDown is true â&#x20AC;&#x201C; that is, only when the mouse button is pressed.

We can use these reactive data types to compose the information we need. We will now define mouseNewXY; a property with values of the mouses x and y position when the mouse is clicked.

Remember, per default .fromEventTarget gives the jQuery event-object as value, so we need to transform the value to a more readable format. In this example randomColor is just a random generated hex color.

var mouseNewXY = mouseMove .filter(isClickDown) .throttle(50) .map(function (e) { return { x: e.clientX, y: e.clientY, color: randomColor }; });

42

With that generated property, we throttle it per 50 milliseconds. The result is converted to a discrete event stream that has a value only every 50 milliseconds.

We now have a event stream of a object with the mouse position and a color, only when the mouse button is pressed, and throttled over 50 ms. We can use this event stream to draw out circles. mouseNewXY .map(toCircle) .assign($svg[0], 'appendChild');

In this code we have toCircle, a simple helper function used to convert from the data object to a SVG circle DOM


element. We use Bacon's assign to terminate the reactive data type. Each circle element we get we append it to the SVG DOM element. Now we have a working example, in just 20 lines of code (plus helpers). By using this example, we see some pretty interesting aspects. We see how easily we can compose reactive data types and manipulate them using functional programming. We have no unwanted side-effects or manual handling of states. The very cool thing is, we can easily extend this example and add multiple input sources or even outputs. As all reactive data types are immutable, we can use them again in different ways. For example, if we want to show if the mouse is pressed we can use the following code: isClickDown .map(function (down) { return down ? 'Yes' : 'No'; }) .assign($('.mouse-down'), 'text');

We can use isClickDown again, without having to think about it's previous involvements. Similarly, if we want to make this distributed through web sockets by adding a new input source. Replacing the code from before: mouseNewXY .merge(bacon.fromEventTarget(socket, 'data')) .map(toCircle) .assign($svg[0], 'appendChild');

In this example we say that the socket is a socket instance of socket.io, and that it emits our mouse data on the channel data.

tions enables the programmer to use pure functional programming while working with inheritly mutable data. FRP is a good fit with interface programming, or domains with the same characterisitics. FRP gives the programmer a declarative language and high level abstractions to work with. These abstractions fit the way we reason about the world and capture the temporal aspect of actions in a very good way. In recent years, FRP has become popular and we see many different implementations in various languages. Many implementations are based on Haskell, but Javascript is seeing a rise in popularity of FRP liberaries as well. Bacon.js is a Javascript library that gives the programmer the classical FRP datatypes of Behaviours and Events and a large API of functional combinators to work with. Being based purely on Javascript, Bacon.js works great in both the browser and on the server using Node.js. This makes it easy to start using FRP today, and it integrates very nicely with existing libraries and frameworks like jQuery and Backbone.js. RESOURCES: 1) FRAN/Classic FRP: http://conal.net/papers/icfp97/ 2) ActiveVRML: http://conal.net/papers/ActiveVRML/ 3) RT-FRP: http://dl.acm.org/citation.cfm?id=507654 4) ED-RFP: http://link.springer.com/chapter/10.1007/ 3-540-45587-6_11 5) Push/Pull FRP: http://conal.net/papers/push-pull-frp/ push-pull-frp.pdf 6) Elm: http://elm-lang.org 7) Flapjax: http://www.flapjax-lang.org/ 8) Bacon.js: https://github.com/baconjs/bacon.js

In addition we would have to emit data using our mouseNewXY data type. The complete example with helpers is available in this gist: http://bit.ly/frp-example WRAP-UP Functional reactive progamming started as academic research between Microsoft Research Group and Yale University in 1997. Over the comming years, they improved their work and honed in on an working implementation of FRP. Functional reactive programming is a combination of functional and reactive programming. Its primary goal is to reconcile the mutable and asyncronous nature of environments like user interfaces with the semantic determinism and rigorous reasoning enabled by pure functional programming. To achieve this goal, FRP makes use of reactive programming. Using dataflow semantics to create abstractions that represents time-varying values. Using these abstrac-

Mikael Brevik is an occasionally open source developer and avid internet surfer. Consultant at BEKK in Trondheim, Norway. Intrests include programming languages, paradigms and ways to improve programming or way of thinking.

Stian Møllersen is a Frontend developer from Trondheim. Does his daily work at BEKK, creating web experiences for clients. Passionate about bringing programming theory, mathematics and visual expressions together to make the amazing web come alive.

43


Monika Køller teaching pupils at Hundsund Lower Secondary School how to pilot drones by JavaScript

TEACHING KIDS PYTHON with the Code Club

The author and tef from Code Club UK

Teaching kids to code Python at Oslo Maker Faire 2014


Code Clubs for kids are spreading fast these days. The Code Club UKâ&#x20AC;&#x2122;s website counter shows 2074 clubs in the UK alone. In Norway we are gaining momentum, but there is a long way to go before we have satisfied the demand. My impression is that as we establish more Code Clubs and spread to more schools, even more kids and parents become aware of the possibilities and the demand increases. By Bjørn Einar Bjartnes, developer at Computas

As developers we have a responsibility to share our knowledge to the community that once taught us. Not only should we share knowledge to fellow developers through blogs, open source and conferences such as NDC, but we should share with schools, children and parents as well. It can be quite hard to bring new knowledge and new perspectives to the professional world of software developers. However, with an audience who has never done any coding before, the simplest code can create enthusiasm. It is incredible to see an assignment that might look a bit basic and dull serve as a basis for creativity far beyond what one could imagine.

from turtle import * shape("turtle") for count in range(4): forward(100) right(90)

Starting a code club does not have to be a lot of work. The Code Club has prepared material for teaching Scratch (a graphical coding environment), HTML/CSS and Python. The material is written so that the students can find their way through it without much theory in advance. Python and the IDE used in the assignments are free and runs on Windows, Mac and Linux. What is required from you is to be enthusiastic, positive and to answer basic questions about code. And you might get some really hard questions bordering to philosophy welcome to working with kids. I have found that the simplest way to get started is to organize the CodeClub event through a school as the teachers will be happy to facilitate, provide infrastructure and will deal with organizing the class. Also, teaching the children of employees in your organization is an easy way to get started. Ask around and I am sure that you will find a parent or a teacher who would be happy to let you teach! All the material is on GitHub and if you cannot find a translation to your language, feel free to send a pull request with a translation. LINKS: https://github.com/CodeClub/ python-curriculum http://codeclubworld.org/advice/ creating-a-club.html http://www.kidsakoder.no/slikoppretter-du-lokal-gruppe/

45


Š GrandeDuc/Shutterstock

46


Large-scale JavaScript applications

and the DOM

As we want to build more powerful and interactive web applications we increasingly rely on JavaScript. However, many of us have experienced the pain of fixing bugs and adding new features to 3000 lines of "jQuery spaghetti" in a single file. By Kim Joar Bekkelund

In my experience, the most important aspect in building, testing and maintaining large-scale JavaScript applications is separating the inherently global and stateful DOM from our application's state and business logic. This is what frameworks such as Backbone.js, React, Ember and AngularJS tries to help us solve. However, before we use any of these we should understand the main issues with how we tend to use jQuery. ANTI-PATTERNS One of the main problems with jQuery is that we tend to rely on several anti-patterns. Let's look at the following 14 lines of code:

When we allow any part of the DOM to be accessed from anywhere in our code, e.g. $('.menu .logged-in') and $that.closest(".info") in the example above, we create several problems for ourselves: Our code is difficult to reason about as any part of the code can end up updating any part of the UI. The code is harder to reuse since it's not contained. When we need to add similar functionality to another part of our application we often end up copy-pasting business logic and DOM-related code instead of reusing shared functionality.

jQuery(document).ready(function() { $(".user form").submit(function(e) { var $that = $(this); e.preventDefault(); $.ajax({ // ... success: function(data) { var name = data.name || "Unknown"; $that.closest(".info").append("<h1>" + name + "</h1>"); $(".menu .logged-in").append(name); } }) }); });

Another problem is that it can be difficult to move functionality around on the page when we depend on the current DOM structure. In the example above we depend on ".info" being above the user form in the DOM tree. If we move the display of user information to another part of the site the code will break.

47


Additionally, testing this little piece of functionality is a formidable task. The main problem is that the entire application is set up when the DOM is loaded and that we provide no public interface through which we can test. Another problem is that we need to set up the DOM and submit a form to be able to test the Ajax request. INJECTING THE DOM A first step in the right direction is injecting the piece of the DOM we need. Very simplified it can look like this, where we inject $(".info") when we want to show user information: function showUserInfo($el, user) { // this function does not use $ directly $el.append("<h1>" + user.name + "</h1>"); } var user = { name: "Kim Joar" }; showUserInfo($(".info"), user);

To better understand how this can work, we could rewrite the example above using Backbone.js into something like this:

tation, "changes to the view are immediately reflected in the model, and any changes in the model are propagated to the view." With two-way binding we can in many cases forgo jQuery entirely. Let's look at an example using Ember.js, with the following template: {{#if isExpanded}} <div class="body">{{body}}</div> <button {{action contract}}>Contract</button> {{else}} <button {{action expand}}>Show More...</button> {{/if}}

And this controller which is connected to the template: App.PostController = Ember.ObjectController.extend({ body: 'body', isExpanded: false, actions: { expand: function() { this.set('isExpanded', true); },

jQuery(document).ready(function() { var user = new User();

});

new UserFormView({ el: $('.user'), model: user }); new UserInformationView({ el: $('.info'), model: user });

Here we have separated our code into a Backbone model and two Backbone views. The form and the display is now separate and can easily be moved around on the page by changing the element we inject. As models in Backbone emit events when their content is updated, the UserInformationView can listen for these events, such as "change", and update the displayed content. We have now decoupled our form from the display of information. Now, if we are strict with only allowing views to work with the DOM and only allow each view to work on the jQuery element we inject, it is far easier to reason about the DOM and its current state. Also, with this change the functionality is now very easy to test, reuse and maintain as all external dependencies are injected. TWO-WAY BINDING One interesting example of separating the DOM from the rest of our application is two-way binding. With two-way binding we have automatic synchronization between our state and the DOM. As AngularJS explains in their documen-

48

});

}

contract: function() { this.set('isExpanded', false); }

When the template is rendered to the DOM, it will show a button with "Show More..." as isExpanded is false. When the button is clicked, the body and a button with "Contract" will be shown instead. Here we have no jQuery at all â&#x20AC;&#x201C; the two-way binding is responsible for automatically synchronizing the DOM and the PostController. LEARNING MORE Better handling of the DOM is just a first step towards building better JavaScript applications, but perhaps the most important step. If you want to learn more about building large-scale JavaScript applications, check out http:// superherojs.com

Kim is the practice lead for JavaScript and web technologies at BEKK, where he mostly works on largeâ&#x20AC;&#x201C;scale JavaScript applications. He is a strong believer in treating JavaScript as a real language when we use it to build large applications. Kim is a frequent speaker on JavaScript and he is the creator of Superhero.js.


Š GrandeDuc/Shutterstock

about building re o m n ar le to t If you wan ut cations, check o li p ap t ip cr S va large-scale Ja js.com http://superhero


Architecting for

change As an architect, you hear the following statements from the business: “Our business is constantly changing to meet new demands of the marketplace”; “We need faster time to market to remain competitive”; “Our plan is to engage heavily in mergers and acquisitions”. What do all these statements have in common? Change. By Mark Richards

50


© Juanjo Tugores/ Shutterstock

It is a different world than it was many years ago. Both business and technology are in a constant state of rapid change. That means architectures have to sometimes change as well. However, the very definition of architecture is “something that is really hard to change”. So how can we make our architectures respond better to change?

in our Software Architecture Fundamentals video series from O’Reilly and conference workshops (soon to be held at the Architecture Day in Oslo (www.programutvikling.no/ kurs/architecture-day/4353). In this article, I will explore the architecting for change meme and discuss several techniques for ensuring that your architecture can properly adapt to change.

Architecting for change is one of several memes Neal Ford and I introduce

ARCHITECTURE AGILITY Simply put, traditional methods of

architecture are not sufficient to meet the ever-changing demands of the marketplace. Business is ever changing through mergers, acquisitions, growth, increased competition, and regulatory changes. Technology is also ever-changing through new platforms, languages, frameworks, patterns, and products. Because of all this rapid change, we need to make our architectures more adaptable to change as well. Specifi-

51


cally, we need our architectures to be agile. The term architecture agility means the ability to respond quickly to a constantly changing environment. Note the word “quickly” - this is the real key. All architectures can change; however, really successful architectures are ones which can quickly adapt to change. There are many techniques you can use for ensuring your architecture can quickly adapt to change. In this article I will describe three of those techniques: abstraction, leveraging standards, and creating productagnostic architectures.

© Carlos Castilla/ Shutterstock

ABSTRACTION The first technique, abstraction, involves decoupling architecture components so that components know less about each other, hence minimizing the overall impact of changes made to those components. There are five main forms of abstraction: location transparency, name transparency, implementation transparency, access decoupling, and finally contract decoupling (the hardest form to implement). In this section I will describe each of these forms of abstraction.

52

The first form, location transparency, means that the source component does not know or care where the target component resides. For example, the target component may reside on a server in Frankfurt, or even a server in Paris - it simply doesn’t matter. This is the easiest form of abstraction to implement, with messaging, service locators, and proxies being the most common implementation methods. Name transparency means that the source component does not know or care about the name of the component or service method. For example, suppose you need to access a pricing server for stock prices. Name transparency dictates that you can choose to call the service anything you want (e.g. GetLatestPrice), whereas the actual name of the method you are invoking on the target component is getSecurityPrice. The implementation name can continue to change, but the source component always refers to the service as GetLatestPrice. This form of abstraction is commonly found in messaging and service registries. Implementation transparency means that the source component does not know or care about what language

or platform the target component is written in. It could be Java, C#, .NET, C++/Tuxedo, even CICS - it simply doesn't matter. Again, messaging is a common way to implement this form of abstraction. Access decoupling means that the source component does not know or care about how the target component is accessed, whether it be RMI/IIOP (EJB), SOAP, REST, ATMI (Tuxedo), etc. Typically a source component standardizes on one access protocol (e.g., XML/JMS) and has a middleware component (e.g., integration hub or adapter) transform the protocol to that used by the target component. Finally, contract decoupling means that the contract advertised by the target component doesn't necessarily need to match the contract used by the source component. For example, lets say the source component uses a CUSIP (a security identifier) to check the price of a particular security, but the target component requires a SEDOL (another type of security identifier). A middleware component or adapter can perform a CUSIP to SEDOL conversion, thereby decoupling the contract of the target


component from source components. The level of abstraction you choose to implement is largely based on the trade offs you are willing to accept. For example, implementing abstraction through basic messaging automatically provides you with location, name, and implementation transparency. However, access and contract decoupling requires some sort of middleware component (like an enterprise service bus or custom adapters), both of which are expensive to implement and add a significant complexity to your application or system. LEVERAGE STANDARDS Another technique you can use to facilitate change within your architecture is to leverage standards. There are three types of standards you need consider as an architect: industry standards, de-facto standards, and corporate standards. Industry standards primarily consist of protocols and payload formats defined as either universal or belonging to a particular business domain. XML and SOAP are examples of universal industry standards, whereas SWIFT, FIX, and FpML are specific financial services domain standards. Sticking to industry standards, particularly domain-specific industry standards, allows the architecture to adapt change more quickly by integrating better with other applications and systems within that domain. For example, by choosing SWIFT as your standard, you can pretty much integrate with any bank. However, if you have your own custom protocol and data format, integration will take significantly longer. De-facto standards are those technologies and products that are so well known and widely accepted in the industry that they generally become a standard part of almost every technology stack. Hibernate, Struts, Apache Tomcat, and the Spring Framework are all good examples of de-facto standards. By leveraging these technologies and products, your architecture can adapt quicker to change primarily because the resource pool is large for these defacto standards and the availability of documentation and references is wide-spread. For example, if you

perform a Google search on a particular issue you are experiencing in Hibernate, chances are good that you will find a plethora of information to help you solve your problem. However, perform a Google search on a lesserknown persistence framework, and chances are you will be on your own to figure out the issue. Corporate standards are the third type of standard and include those technologies, tools, and products that your particular company uses. Sometimes corporate standards include industry and de-facto standards, but usually include specific products and technologies like .NET, Java EE, JBoss, Eclipse, etc. Leveraging corporate standard is critical to achieving architecture agility. Change is quicker because the resource pool and skill set within the company for those products and technologies is widespread. For example, let's say you decided to break away from the corporate standards (say Java EE) and implement your architecture using Ruby on Rails. However, because the resource pool hired by the company is Java EE, changing the application will be difficult due to the lack of available Ruby on Rails resources to make those changes.

the hardest type of architecture to change. It would literally take years to swap out one ERP product for another or integrate other products into the architecture. A much better approach would be to create an abstraction layer around the ERP product so that product upgrades can be better isolated and product changes be made more feasible. CONCLUSION While there are many techniques you can use to create architectures that quickly adapt to change, it is important to remember using these techniques comes with a price. Applying abstraction and creating productagnostic architectures usually decreases performance, adds significant complexity to the architecture, and increases development, testing, and maintenance costs. As an architect you must analyze the trade-offs between these disadvantages and the advantage of an agile architecture that can quickly adapt to change. If you are in an industry that is frequently changing (and most are), the trade-off is easy - you must architect for change. However, just how much agility you apply to the architecture depends on the trade-off's you are willing to accept.

PRODUCT AGNOSTIC ARCHITECTURE When designing an architecture for change, it is important to avoid what is known as vendor lock-in. While your architecture may need to be dependent on a particular product, the product should not be the architecture. Creating a product agnostic architecture involves sufficiently abstracting the product using adapters, message bus technology, or messaging to form what my friend Neal Ford fondly refers to as an anti-corruption layer. For example, let's say that you are using a major ERP product (e.g., Oracle, SAP, etc.) and you are asked to develop an architecture for the system. It is all-too tempting to just place the large ERP product in the middle of the architecture and leverage the many tools available from that product to develop and integrate various applications that use it. While this would certainly work, it is perhaps

Mark Richards is a hands-on architect with over 30 years of industry experience. Throughout his career he has performed roles as an application architect, integration architect, and enterprise architect. Although Mark works primarily in the Java platform, he also has experience in many other languages and technologies. Mark is the author of Java Message Service 2nd Edition by O'Reilly, contributing author of 97 Things Every Software Architect Should Know by O'Reilly, and most recently co-author with Neal Ford on a new video series by O'Reilly called Software Architecture Fundamentals. Mark has spoken at over 100 conferences worldwide, and is passionate about architecture, technology, and hiking.

53


NDC London

returning in 2014 Last year marked the end of the long wait as NDC made its first appearance outside of Oslo. By Charlotte Lyng. Photo: Kristoffer Sunnset

NDC London made its debut at the ICC Suites at the ExCel Exhibition Centre 2-6 December 2013. Close to 700 delegates from all over the world contributed in making NDC London an unqualified success. NDC London fostered a great atmosphere, with great speakers, culinary food, comfortable venue, loads of interesting sessions and an awesome party, creating a real community feel for its delegates.

54

The NDC team is excited to announce that they have already started the planning process for NDC London 2014. Save the date, NDC London will be back 1-5 December at the ExCel Exhibition Centre.


55

harlotte

Photo: C

Lyng

Š Elada Vasilyeva/Shutterstock


ADVERTISEMENT

COURSES for developers and leaders

56


AGILE - MANAGEMENT

Craig Larman

Dan North

AGILE AND ITERATIVE DEVELOPMENT - A MANAGERS GUIDE Author and instructor: Craig Larman This practical, information-packed seminar summarizes the key research, ideas, and practices of iterative development, aimed at executive and project leadership. This is a high-impact guide for managers and students to agile and iterative development methods: what they are, how they work, how to implement them – and why you should. Whether you’re an IT executive, project manager, student of software engineering, or developer, Craig Larman will help you understand the promise of agile/iterative development, sell it throughout your organization – and transform the promise into reality.

ACCELERATED AGILE: FROM MONTHS TO MINUTES Author and instructor: Dan North During this course you will learn unusual and counter–intuitive techniques for software delivery and understand the principles behind them. Using a mixture of discussion, instruction and exploration you will start to think differently about agile development, automation and team dynamics. By exploring several architecture and development strategies you will learn how you and your teams can produce and deploy software faster than they thought possible. You’ll never look at TDD the same way again, not to mention copying–and–pasting code.

AGILE FOUNDATIONS FOR BUSINESS ANALYSTS Author and instructor: Allan Kelly This course focuses on the role of requirements in driving generic Agile teams with reference to Scrum project management and XP technical practices. The Business Analyst’s role on an Agile team is described together with the additional tools, techniques and approaches available. Allan Kelly

Geoff Watts

RETROSPECTIVE TECHNIQUES Author and instructor: Geoff Watts The 2–day Retrospective Techniques course will teach the 5 step structure for facilitating a retrospective as described by Esther Derby and Diana Larsen and will also cover a number of approaches to be used in each part of the process. As well as leaving with new techniques for their retrospective toolboxes, attendees will get the opportunity to practice putting together a retrospective agenda and running and⁄or experiencing many of the techniques they will learn about.

GIT

Tim Berglund

GITHUB FOUNDATIONS NEW Author and instructor: Tim Berglund This six-hour workshop gets you up and running with Git and GitHub. We'll cover the basics of the Git command line interface, introduce you to graphical clients, and learn how to collaborate using pull requests on GitHub.com. No matter whether you work in open source, for a small company, or in a large enterprise, this is the introductory course for you.

ADVANCED GIT AND GITHUB Author and instructor: Tim Berglund You already know the basics of Git and GitHub, and you're ready for more. This six-hour workshop will equip you with the advanced skills you need to become the Git and GitHub expert on your team. Whether you work in open source, for a small company, or in a large enterprise, this is course is for you.

NEW

Tim Berglund

57


PEOPLE – SCRUM AGILE DEVELOPMENT WITH SCRUM Author and instructor: Arne Laugstøl This course will give an introduction to development in Scrum and agile development. The Participants will learn how to practice Scrum by collaborating as part of a Scrum-team during the labs. The course is aimed at people that is either going to participate in Scrum-teams, or just wants to know more of the concepts of Scrum and agile-development. You don’t need to be a developer to gain a full benefit from the course. Arne Laugstøl

CERTIFIED SCRUMMASTER CSM Author and instructor: Mike Cohn During the ScrumMaster class, attendees will learn why such a seemingly simple process as Scrum can have such profound effects on an organization. Participants gain practical experience working with Scrum tools and activities such as the product backlog, sprint backlog, daily Scrum meetings and sprint planning meeting. Participants leave knowing how to apply Scrum to all sizes of projects. The course gives you the title of Certified ScrumMaster. Mike Cohn

CERTIFIED SCRUMMASTER CSM Author and instructor: Geoff Watts Learn the Scrum framework for an agile project and the essentials of working as a ScrumMaster or Scrum team member. Through a fun mix of theoretical explanation, problem exploration and practical exercises, this 2–day course will equip attendees for their first Scrum project or enable them to reflect on their projects and become more agile. Geoff Watts

Mike Cohn

Geoff Watts

CERTIFIED SCRUM PRODUCT OWNER CSPO Author and instructor: Mike Cohn This course will teach you, the product owner, how to use the product backlog as a tool for success. As you watch the product take shape, iteration after iteration, you can restructure the Product Backlog to incorporate your insights or respond to changes in business conditions. You can also identify and cancel unsuccessful projects early, often within the first several months. The Certified Scrum Product Owner; course equips you with what you need to achieve success with Scrum.

CERTIFIED SCRUM PRODUCT OWNER CSPO Author and instructor: Geoff Watts During this course you will understand the product owner role with its authority and responsibility, and its interaction with the other Scrum roles. You will be able to create a product vision, stock and groom the product backlog, prioritise the backlog, and systematically refine requirements. You will also be able to create a realistic release and track the project progress and understand how you can effectively collaborate with the ScrumMaster and team in the sprint meetings.

AGILE INTERACTIONS WORKSHOP Author and instructor: Jessie Shternshus The most important factor of an Agile team is the teams ability to communicate effectively. We often only focus on the technical aspect of things, when really most of the breakdowns happen when the team can´t communicate with one another. Understanding how to interact with your internal and external team is vital to the entire agile process. Jessie Shternshus

For a complete course overview, price update, time and place, visit www.programutvikling.no and www.developerfocus.com Registration Oslo: Tel 67 10 65 65 • kurs@programutvikling.no • www.programutvikling.no

58

NEW


TEST-DRIVEN DEVELOPMENT, TESTING

Janet Gregory

THE WHOLE TEAM APPROACH TO AGILE TESTING Instructor: Janet Gregory This three day course explains how testers can become valued agile team members, how they contribute to delivering a continuous stream of business value, and ways to overcome common cultural and logistical obstacles in transitioning to an agile development process. It describes the values and principles that help testers adopt an agile testing mindset, and gives practical alternatives to traditional testing processes, such as defect tracking, metrics, audits, and conforming to quality models. Students will be shown how to complete testing activities in short iterations, and how testers contribute on a daily basis during each iteration and release cycle.

BDD - SPECIFICATION BY EXAMPLE Author and instructor: Gojko Adzic This three 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. Gojko Adzic

V. Subramaniam

TEST-DRIVEN DEVELOPMENT Author and instructor: Venkat Subramaniam The course has a good balance of interactive lectures and hands–on exercises. The attendees are expected to pair–up and work on the lab exercises. The instructor will assist the attendees as they work on the exercises. The objective of the course is for the attendees to gain an in depth practical knowledge of the concepts so they can put them to immediate use on real projects.

TEST-DRIVEN DEVELOPMENT & REFACTORING TECHNIQUES COURSE Author and instructor: Robert C. Martin This course teaches you how to use the principles and practices of TDD to specify requirements and designs using acceptance tests and unit tests. You will learn the intensely granular TDD approach to development using XUnit for unit testing and FitNesse for acceptance testing. You will experience the frequent and regular feedback and progress of letting tests drive the development and design. Robert C. Martin

Christian Johansen

TEST – DRIVEN JAVASCRIPT Author and instructor: Christian Johansen Even the most seasoned backend programmer is too often on thin ice once a web application’s frontend is in need of development and/or maintenance. Rid yourself of the insecurity by learning to understand and appreciate JavaScript for the highly productive and unusual language it is. The course will take you through JavaScript’s object model and functional elements, giving you a solid understanding of how JavaScript really works. A series of practical assignments puts this understanding to use by implementing reusable code using idiomatic JavaScript patterns. Unit testing and TDD will be demonstrated through-out the course.

FUNCTIONAL PROGRAMMING

V. Subramaniam

PROGRAMMING IN FUNCTIONAL STYLE NEW Author and instructor: Dr. Venkat Subramaniam This three day course, offered by award winning author and trainer Dr. 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.

59


EFFECTIVE CONCURRENCY

Herb Sutter

EFFECTIVE CONCURRENCY Author and instructor: Herb Sutter This course covers the fundamental tools that software developers need to write effective concurrent software for both single–core and multi–core⁄many–core machines. To use concurrency effectively, we must identify and solve four key challenges: 1. Leverage the ability to perform and manage work asynchronously. 2. Build applications that naturally run faster on new hardware having more and more cores. 3. Manage shared objects in memory effectively. 4. Engineer specifically for high performance

AGILE

Allan Kelly

APPLYING LEAN THINKING TO SOFTWARE DEVELOPMENT - INCLUDING AN INTRODUCTION TO THE KANBAN METHOD Author and instructor: Allan Kelly Demonstrate how Lean thinking can be applied to software development and equip students with practical tools for improving their development processes and environments. This workshop uses lecture material and exercises to teach Lean ideas and provide students with experience of applying Lean techniques. Those responsible for the development of software: Who should attend?: Project Managers, Team Leaders, Development Directors and Managers, Scrum Masters and Architects.

BDD - SPECIFICATION BY EXAMPLE Author and instructor: Gojko Adzic This three 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. Gojko Adzic

DATABASE DATABASE DESIGN, -IMPLEMENTATION AND SQL-PROGRAMMING Author and instructor: Dag Hoftun Knutsen This course covers all phases of developing a database application: Analysis, design, implementation, SQL-programming and testing. Hands-on exercises will give you practical experience. There is particular focus on how physical database design is important from a performance perspective. Dag Hoftun Knutsen

ORACLE SQL- PROGRAMMING Author and instructor: Dag Hoftun Knutsen This course is a comprehensive introduction to SQL, including coverage of Oracle-specific features. The course includes all aspects of SQL: Data Definition, Data Control and Data Manipulation with particular focus on querying. It also covers principles of database design for performance. Hands-on exercises provide practical experience with SQL, and you will also learn about common errors and pitfalls and how to avoid these. Dag Hoftun Knutsen

ORACLE PL/SQL- PROGRAMMING Author and instructor: Dag Hoftun Knutsen This course provides a comprehensive introduction to Oracle’s procedural language PL/SQL. The course describes the language’s general structure and syntax as well as various ways of applying the language in an application. Programming experience is gained through hands-on exercises. Dag Hoftun Knutsen

For a complete course overview visit www.programutvikling.no

60


JAVA CORE SPRING FRAMEWORK Author: Mårten Haglind Instructor: Mårten Haglind 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. Mårten Haglind

SPRING AND HIBERNATE DEVELOPMENT Author: Mårten Haglind Instructor: Mårten Haglind In this five–day course you will learn how to use the Spring Framework to create well–designed, testable business applications in an agile manner. In addition to that, you will learn how to use Hibernate, to effectively map Java domain model objects to a relation database. Mårten Haglind

Eivind Nordby

PROGRAMMING JAVA STANDARD EDITION Authors and Instructors: Eivind Nordby This course is designed to give programmers a solid grounding in the Java Programming language. Starting with the core syntax and OO concepts, it then progresses to covering class design, arrays and collections, core libraries, exception handling, I⁄O and networking, JUnit testing an introduction to Swing as well as the new Java features (the course is always up to date with the latest versions of Java SE). After taking this course delegates should be comfortable with working from a design on real projects using core Java, will be able to attend more advanced Java courses such as JEE and have a firm grasp of the fundaments required for the SCJP exam. EFFECTIVE SCALA Author and instructor: Jon-Anders Teigen You will learn how to model rich object–oriented systems using Scala’s integration of concepts from object– oriented and functional programming. We will explore how these two paradigms complement each other to bring you the best of both worlds. During these three days you will go from learning how to explore APIs using Scala’s interpreter to building full blown applications using the Lift web framework.

Jon-Anders Teigen

V. Subramaniam

PROGRAMMING IN JAVA 8 NEW Authors and instructors: Dr. Venkat Subramaniam Java is arguably one of the most widely used languages. This popular language is going through a makeover. This will have a significant impact on how programmers will code and design applications with Java. With the introduction of lambda expressions and method references in Java 8, we can now make use of functional stye of programming. With greater emphasis on immutability and state transformation instead of state mutation, this means fewer errors, more expressive and concise code that's easier to parallelize. All this comes with one caveat, we have to learn and adapt to not just the new syntax, but different and better way of thinking. This course is designed, by author of the first book on Java 8 to hit the market, to help you make a quick and effective transition to Java 8 and its functional capabilities.

XML EXCHANGING AND MANAGING DATA USING XML AND XSLT Author and instructor: Espen Evje This course gives a broad overview of XML, in particular of the structure and the syntax of XML documents, and of how to use XML documents in your solutions. You will learn about XML Schemas and about XPATH, and you will get an insight on how to use XML with relational databases. Espen Evje

For a complete course overview visit www.programutvikling.no

61


DESIGN - ANALYSIS- ARCHITECTURES

Craig Larman

AGILE DESIGN AND MODELING FOR ADVANCED OBJECT DESIGN WITH PATTERNS Author and instructor: Craig Larman During this popular, high–impact, and hands–on course you will learn to design with patterns, apply visual modelling in an agile modelling 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.

ANALYSIS AND DESIGN WITH SCRUM Author and instructor: Eivind Nordby The course targets developers who need to catch the users’ needs and transform them into distinct development tasks and into a solution capable of adapting to continuous requirements changes. The workflow is Scrum based, and UML is used for analysis and design ahead of programming in each sprint. Bundled with object-orientation, this gives a powerful, practical, developer oriented approach to problem solving. Eivind Nordby

ARCHITECTURE SKILLS Author and instructor: Kevlin Henney The Architecture Skills course introduces a broad curriculum for software architects. The course introduces development process models, architectural styles, requirements techniques, sufficient modelling techniques, design patterns and testing practices. This course includes a number of practical exercises so that attendees can see how the different activities fit together. There is also plenty of opportunity for discussion. Kevlin Henney

Robert C. Martin

Juval Lowy

AGILE ARCHITECTURE AND DESIGN Author and instructor: Robert C. Martin This course is a deep dive into the well–known SOLID principles of Agile and Object Oriented Design. Students will learn the characteristics of sound Object–Oriented designs and architecture, and patterns and practices that create them.  Principles include: The Single Responsibility Principle, The Open Closed Principle, The Liskov Substitution Principle, The Interface Segregation Principle, The Dependency Inversion Principle, and many others. Special attention is paid to Component oriented design, and the principles and patterns of large–scale component architecture. PROJECT DESIGN MASTER CLASS NEW Author and instructor: Juval Lowy When designing a software system it is easy to forget that the process of developing your design is complex, involving numerous stages from calculating the planned duration and cost to devising several execution options and scheduling resources. Even validating your plan is a vital step in order to ensure that your plan is both sensible and feasible. The design process poses many challenges and to overcome these obstacles it is essential that you grasp the inner dependencies between services and activities, the critical path of integration, the staff distribution and the risks involved. All of these challenges stem from your system design and addressing them properly is a hard core engineering – designing the project. This design task requires both the Product Manager and Architect to work closely in order to create a project design structure that can survive the test of the developments process. EVOLUTIONARY DESIGN AND ARCHITECTURE FOR AGILE DEVELOPMENT Author and instructor: Dr. Venkat Subramaniam The course has a good balance of interactive lectures and hands-on exercises. The attendees are expected to pair-up and work on the lab exercises. The instructor will assist the attendees as they work on the exercises. The objective of the course is for the attendees to gain an in depth practical knowledge of the concepts so they can put them to immediate use on real projects.

V. Subramaniam

CLEAN CODE: AGILE SOFTWARE CRAFTSMANSHIP Author and instructor: Robert C. Martin This is a two–day hands–on course in which students learn the principles and practices of Clean Code as described in Robert C. Martin’s book: Clean Code: A Handbook of Agile Software Craftsmanship. This course alternates between lecture and exercise so that students can experience, first–hand, the practices and disciplines of these fundamental topics. Robert C. Martin

62


DESIGN - ANALYSIS- ARCHITECTURES continued

Eivind Nordby

OBJECT-ORIENTED DEVELOPMENT Author and instructor: Eivind Nordby This is a course for experienced developers who are new to, or wish to strengthen their object-oriented thinking. More than the programming itself, the difficulty in passing to object-orientation is mental. That is why this course focuses on basic object-oriented thinking and basic design principles. Of course, there are plenty of practical exercises.

HTML5 – JAVASCRIPT JAVASCRIPT FOR PROGRAMMERS Author and instructor: Christian Johansen This three day workshop will introduce you to HTML5 with a brief backstory, before diving into the APIs one by one. As well as going through code and showing practical demonstrations, where possible, we’ll also talk about the alternatives and polyfills for old browsers that dont support ”awesome” out of the box. Christian Johansen

Christian Johansen

Scott Allan

Dan Wahlin

TEST – DRIVEN JAVASCRIPT Author and instructor: Christian Johansen Even the most seasoned backend programmer is too often on thin ice once a web application’s frontend is in need of development and/or maintenance. Rid yourself of the insecurity by learning to understand and appreciate JavaScript for the highly productive and unusual language it is. The course will take you through JavaScript’s object model and functional elements, giving you a solid understanding of how JavaScript really works. A series of practical assignments puts this understanding to use by implementing reusable code using idiomatic JavaScript patterns. Unit testing and TDD will be demonstrated through-out the course. ANGULARJS AND HTML 5 NEW Author and instructor: Scott Allen AngularJS brings testable architectural patterns to applications built with HTML 5. This course explains and demonstrates the many features of AngularJS, including directives, filters, routing, controllers, templates, services, views. But, the best applications need more than a single framework. We’ll also learn about responsive design, Bootstrap, and the latest HTML 5 features including local storage, the canvas, web workers, web sockets, and more

ANGULARJS END-TO-END SPA DEVELOPMENT NEW Author and instructor: Dan Wahlin The AngularJS End-to-End Application Development course provides a hands-on look at working with the AngularJS framework. The course starts with an introduction to building Single Page Applications (SPA) and talks about the features AngularJS provides. From there students learn about different aspects of the framework such as views and directives, controllers and routes, as well as factories and services. Along the way, different debugging techniques and tools are discussed, how different AngularJS components can be customized and shared with other components, and different JavaScript patterns that can be applied to applications to make them more maintainable. By the end of the class students will have walked through the process of building a Single Page Application (SPA) from end-to-end using AngularJS and be ready to apply that knowledge to applications they need to build at work.

JAVASCRIPT AND HTML5 FOR DEVELOPERS Author and instructor: Christian Wenz JavaScript has shown an impressive comeback over the past few years. The static, non-functional websites of the past have been replaced by smart web browsers which offer a runtime environment for actual applications. This course intends to bring you up to speed with today’s efficient and effective JavaScript. Christian Wenz

63


SHAREPOINT SHAREPOINT 2010 AND OFFICE 365: END TO END FOR DEVELOPERS AND DESIGNERS Author and instructor: Sahil Malik This 5 day course is packed with information that will load you with enough skills to work productively on any SharePoint project. It covers development aspects or UI design concepts in depth. This course is designed for technical audience or the architect who needs to learn all aspects of the product, for the developer, designer, and the administrator. Sahil Malik

Sahil Malik

SHAREPOINT 2013 AND OFFICE 365: END TO END FOR TECHNICAL AUDIENCE Author and instructor: Sahil Malik This 5 day course is packed with information that will load you with enough skills to work productively on any SharePoint project. It covers development aspects or UI design concepts in depth. This course is designed for technical audience or the architect who needs to learn all aspects of the product, for the developer, designer, and the administrator. The course has been written, and is delivered by Sahil Malik. You can expect plenty of real world insight that you don’t get in “canned courses”.

Sahil Malik

SHAREPOINT 2013 AND OFFICE 365: ONLY THE NEW STUFF Author and instructor: Sahil Malik This 3 day course is packed with targeted information that will bring your skills up to date on SharePoint 2013. Thiscourse is designed for technical audience or the architect who is already familiar with SharePoint 2010 and isinterested in getting targeted information, or the delta between SharePoint 2013 and SharePoint 2010. The coursehas been written, and is delivered by Sahil Malik. You can expect plenty of real world insight that you don’t get in“canned courses”.

MOBILE APPLICATIONS

Wei-Meng Le

Wei-Meng Le

Wei-Meng Le

64

ANDROID DEVELOPER TRAINING Author and instructor: Wei-Meng Lee Android is Google’s operating system for mobile devices. Using the Android SDK, developers can develop applications on the Android platform using the Java Programming language. In this 5-day course, participants will learn the various techniques to program their Android devices. The first half of this feature-packed course will show you how to get started in Android development, right from the start till deployment. In the second-half of this course, you will explore Android beyond the basics. You will learn about the latest Android designed for tablet devices, and explore the new APIs that allow you to build both smartphone and tablet applications. In addition, you will also learn about networking technologies in Android – Bluetooth, Sockets, as well as push notifications using the Google Cloud Messaging (GCM) Framework.

FUNDAMENTALS OF IOS Author and instructor: Wei-Meng Lee The workshop will begin with the basic concepts such as Views, View Controllers, Protocols and Delegates, as well as the tools that help you develop compelling iOS applications – Xcode and Interface Builder. Participants will then dive into the details of programming the iPhone, such as how to invoke the built–in applications and access the hardware of the iOS device. In the second half of this course particpants will learn the advanced techniques for writing iOS applications. You will learn about iPad–specific programming, Location–based Services and network programming.

MOB101 – 3-DAY WRITING CROSS PLATFORM IOS AND ANDROID APPS USING XAMARIN AND C# Author and instructor: Wei-Meng Lee In this 3-day workshop, you will learn the fundamentals of building cross-platform mobile apps targeting iOS and Android devices using Xamarin and C#. Using the Xamarin Studio, you can now write iOS and Android apps using your familiar C# language. When you are ready to deploy your apps, the Xamarin compiler will compile your app into the native binary for each platform. The end result is you have a first class application that is optimized for the respective platform that it is compiled for.


C++

Mike Tarlton

C++ FOR EMBEDDED DEVELOPERS Author and instructor: Mike Tarlton This course introduces the C++ language for general use. The course is suitable for programmers who do not need to have inâ&#x20AC;&#x201C;depth knowledge of embedded programming concepts or concurrency issues. The course is also useful for Hardware Engineers needing to learn C++, for example to move onto using SystemC. It is assumed delegates have a working knowledge of the C programming language.

Hubert Matthews

ADVANCED C++ PROGRAMMING AND INTRODUCTION TO C++11 NEW Author and instructor: Hubert Matthews This course is designed to introduce delegates to more advanced use of C++ as well as introducing the most common parts of C++11. It will cover techniques and idioms that allow for more efficient and safer use of the language as well as the concepts that make C++ different from other languages. Modern C++ techniques and facilities such as the STL are used throughout to introduce developers to the full power of the C++ language. One day is devoted to new C++11 features. C++11 PROGRAMMING Author and instructor: Hubert Matthews This course is designed to upgrade delegates to C++11, the new C++ standard. C++11 is designed to make programming in C++ easier and more efficient for both the developer and the machine. It will cover all of the major features along with idioms for using them effectively, giving you access to the full power of the new language and libraries.

Hubert Matthews

Scott Meyers

EFFECTIVE C++11 PROGRAMMING Author and instructor: Scott Meyers Software developers familiar with the fundamentals of C++11 are ready to advance from knowing what's in C++11 to understanding how to apply it effectively. This seminar, based on information in Scott Meyers' forthcoming Effective C++11, highlights the insights and best practices of the most accomplished C++11 programmers: the things they almost always do (or almost always avoid doing) to produce clear, correct, efficient code. SCALABLE DESIGN AND IMPLEMENTATION USING C++ Author and instructor: Andrei Alexandrescu This course teaches advanced topics in designing and implementing large, scalable systems using C++11. Performance and system-wide robustness are primary concerns. New features of C++11 (and idioms they enable) that help reduce boilerplate and make complex system implementations are introduced.

NEW

A. Alexandrescu

C

Olve Maudal

DEEP C: A COURSE FOR EXPERIENCED C AND C++ DEVELOPERS Author and instructor: Olve Maudal Programming is hard. Programming correct C is particularly hard. Indeed, even in serious industrial applications it is uncommon to see only correct, well defined and conforming code. Why do professional programmers write code like this? Because they lack a deep understanding, they donâ&#x20AC;&#x2122;t know the history and spirit of this wonderful programming language. C is not really a high level language, it is more like a portable assembler where you always need to consider the underlying hardware.

For a complete course overview visit www.programutvikling.no

65


MICROSOFT ZERO TO MICROSOFT BUSINESS INTELLIGENCE Author and instructor: Peter Myers This five day intensive instructor–led training course has been designed to enable students to commence developing and maintaining state–of–the–art integrated Business Intelligence (BI) solutions developed by using Microsoft products. The course consists of numerous hands–on labs that will provide students with the opportunity to produce an end–to–end BI solution. Peter Myers

DEVELOPING WINDOWS AZURE AND WEB SERVICES Author and instructor: Magnus Mårtensson About this CourseIn this course, students will learn how to design and develop services that access local and remote data from various data sources. Students will also learn how to develop and deploy services to hybrid environments, including on-premises servers and Windows Azure. This course helps people prepare for exam 70-487 M. Mårtensson

Arne Laugstøl

Billy Hollis

Dominick Baier

C#.NET: UTVIKLING AV APPLIKASJONER I .NET MED C# Author and instructor: Arne Laugstøl. Instructor: Arjan Einbu In this 5-day course you will learn how to develop applications in the .Net environment. The course will teach you the C# language and how to use the platform to make applications that will run on the desktop with WPF(Window Presentation Foundation) or in the browser with ASP.Net. How to communicate with WCF(Windows Communication Foundation), and accessing data with Linq or Entity Framework is part of the course.

Arjan Einbu

DESIGNING USER EXPERIENCES: PRINCIPLES AND TECHNIQUES FOR DEVELOPERS, MANAGERS AND ANALYSTS Author and instructor: Billy Hollis This class is aimed at developers, but it includes design, architecture, and development topics. Technical topics are mostly covered earlier in the class, with design and architectural topics coming later. However, because the class stresses effective design and architecture, design and architecture topics are listed first. This course will also discuss changes to WPF and related technologies in future Microsoft products, as presented at the BUILD Windows conference that takes place before the class. CLAIMS-BASED IDENTITY & ACCESS CONTROL FOR .NET 4.5 APPLICATIONS Author and instructor: Dominick Baier This course introduces to the fundamental concepts of identity & access control in .NET and covers the integration of these new technologies into the main application frameworks like ASP.NET, ASP.NET Web API and WCF. You will learn about patterns like single sign–on, federation, home realm discovery and identity delegation and how to implement them with .NET. You will learn how to implement authentication and authorization in web applications, SOAP services and HTTP⁄REST based services. You will learn about the SAML and JWT token types and the WS–Federation, WS–Trust and OAuth2 protocols. 70-513 - WCF 4.5 WITH VISUAL STUDIO 2012 Instructor: Sahil Malik This course is aimed at .NET developers interested in developing deep architectural and developer level expertise in WCF 4. In addition, this course will teach you about Windows Server AppFabric and Windows Azure AppFabric. This course also explains good archtecture practises and enables you to take Exam 70–513.

Sahil Malik

For a complete course overview, price update, time and place, visit www.programutvikling.no and www.developerfocus.com Registration Oslo: Tel 67 10 65 65 • kurs@programutvikling.no • www.programutvikling.no

66


MICROSOFT continued

Arjan Einbu

WEB DEVELOPMENT IN .NET - ASP.NET MVC , HTML5, CSS3, JAVASCRIPT Author and instructor: Scott Allen/Arjan Einbu This course covers everything you need to know to start building applications with the latest Microsoft web development stack. We will use ASP.NET MVC on the server and see how to work with models, views, and controllers. On the client we’ll take advantage of HTML 5, CSS 3, and the best JavaScript frameworks, including jQuery, Modernizr, and more. During the course we’ll also see how to apply test driven development techniques, cover best practices for security, scalability, and maintainability, and see various tips and tricks for building a compelling user experience. Over 150 pages of hands–on lab material included. 70-511 WINDOWS PRESENTATION FOUNDATION - WPF/XAML Author and instructor: Arne Laugstøl Windows Presentation Foundation (WPF) is a .NET technology that makes it possible to create compelling applications with modern user experience. The course covers both the basic things and the advanced stuff you need to know, to be able to give the user a “wow” effect. This course will make you able to take the Exam in 70-511 Windows Application Development with Microsoft .NET Framework 4.

Arne Laugstøl

70-583 - MICROSOFT AZURE Author and instructor: Sahil Malik This course is aimed towards the .NET developer who wishes to further their knowledge about Microsoft’s cloud offering – Azure. There are many parts to Azure, Windows Azure (Compute, Storage, Virtual Machine), SQL Azure, AppFabric and DataMarket. This course methodically looks at each piece and shows you practical usage of what you can use today. Sahil Malik

Gill Cleeren

CREATING WINDOWS 8 METRO APPS USING C# AND XAML Author and instructor: Gill Cleeren In this 3 day training course, attendees will learn how to build Windows 8 Metro style applications that offer a great user experience and interact with Windows. Developers will learn how to use the power of the XAML language to build their application all the way from the very first idea of the application to the deployment in the Windows Store. Throughout the course, attendees will see the relation between Windows 8 and other XAML–based technologies such as Silverlight or WPF.

Shy Cohen

ARCHITECTURE CLINIC Author and instructor: Shy Cohen It is a 5 day highly interactive event where you will learn, improve, and exercise software architecture skills, all based on the IDesign Method – a breakthrough, battle–proven approach to software architecture that has shown up to 80% reduction in the effort and time required for architecting, designing, and implementing software solutions. Through its application, it produces an easy–to–follow blueprint for the construction of a software system, while covering all the important aspects involved.

Miguel Castro

Christian Wenz

WINDOWS COMMUNICATION FOUNDATION (WCF) MASTER CLASS Author and instructor: Miguel Castro The training starts by explaining the motivation for WCF, and then continues to discuss in depth how to develop service–oriented applications using WCF. You will see how to take advantage of built–in features such as service hosting, instance management, asynchronous calls, synchronization, reliability, transaction management, disconnected queued calls, security as well as emerging technologies like cloud computing and the Windows Azure AppFabric service bus.

ASP.NET WEB API & SIGNALR: LIGHTWEIGHT WEB-BASED ARCHITECTURES FOR YOU! Author and instructor: Christian Weier Let's face it! The current trends and developments especially in the area of mobile platforms & devices and cloud computing will cause a re-thinking in architectural aspects for many software projects and products. If you ignore this today you may be in big trouble tomorrow. How can I reach a plethora of users and client devices? How can I integrate my systems and application parts in a lightweight and interoperable manner? How am I able to push data in near-real-time fashion from my services to my clients? This course tries to answer these and more questions. Christian Weyer will show you in a pragmatic way how to face the new challenges. See all of this coming to life by using technologies and frameworks like ASP.NET Web API, SignalR, .NET- and HTML5/JavaScript-based clients - mobile or not.

67


COURSE OVERVIEW OSLO COURSETITLE AGILE Architecture Skills - Kevlin Henney - 20. November 2014

2

Agile Interactions Workshop - Jessie Shternshus

1

Get Unblocked - Denise Jacobs

1 2

12

BDD - Specification by Example - Gojko Adzic SCRUM

2

Certified ScrumMaster - CSM - Geoff Watts

2

Product Owner Survival Camp - Gojko Adzic

1

TEST-DRIVEN DEVELOPMENT

18900

02

Plaza

6800

03

Plaza

6800

Oslo

14900

04 22 05

2

02

3

Test-Driven Development - Venkat Subramaniam - 18. August

5

Test-Driven JavaScript - Christian Johansen

3

12 26

Price

Oslo

14900

Oslo

14900

Oslo

14900

Oslo

14900

Days Mar Apr May Jun Location

Test-Driven Development & Refactoring Techniques - Robert C. Martin

DESIGN - ANALYSIS - ARCHITECTURES

12

Price

Oslo

Days Mar Apr May Jun Location

Certified Scrum Product Owner - CSPO - Mike Cohn

Certified ScrumMaster - CSM - Mike Cohn

Price

Oslo

18900

Oslo

24900

Oslo

18900

Days Mar Apr May Jun Location

Price

Evolutionary Design and Architecture for Agile Development - Venkat Subramaniam

4

Agile Design and Modeling for Advanced Object Design with Patterns - Craig Larman - 12 januar 2015

4

Architecture Day - Neal Ford, Mark Richards and Venkat Subramaniam

1

Felix

1900

Project Design Master Class with Juval Lowy 13. October

5

Oslo

24900

3

Oslo

18900

Architecture Skills - Kevlin Henney - 20. november MOBILE APPLICATIONS Mobile to Multi-Device Web - Luke Wroblewski Fundamentals of iOS Programming - Wei-Meng Lee MICROSOFT

09

1

3

5

19

2

C#.NET: Utvikling av applikasjoner i .NET med C# - Arjan Einbu

5

Claims-based Identity & Access Control for .NET 4.5 Applications - Dominick Baier

2

Creating apps for Windows 8.1 using C#, XAML and VS2013

4

Web Development in .NET - ASP.NET MVC , HTML5, CSS3, JavaScript - Arjan Einbu

5

WPF/XAML - 70-511 / 10262A Windows Presentation Foundation/XAML - Arne Laugstøl

4

1

Developing Windows Azure and Web Services - Magnus Mårtensson

4

8

Windows Azure Racing Game Workshop - Alan Smith

1

12

5

21900

17

12

Oslo

6800

Oslo

24900

3

Programming Java Standard Edition - Eivind Nordby

5 4

2

Plaza

9800

23

Oslo

24900

Oslo

14900

Oslo

21900

Oslo

24900

Oslo

21900

Oslo

21900

Plaza

6800

30

3 13

Oslo

6 19 24

3

JavaScript for programmers - Christian Johansen

3

11 23

Price 24900 Price

Oslo

21900

Oslo

18900

Oslo

24900

Oslo

21900

Days Mar Apr May Jun Location

JavaScript and HTML5 for Developers - Christian Wenz

Price 24900

Days Mar Apr May Jun Location

Programming in Java 8 - Venkat Subramaniam

Price

Oslo

9

5 4

HTML5 - JavaScript - CSS3

Oslo

Days Mar Apr May Jun Location

Core Spring - Mårten Haglind

Java EE Remastered - Mårten Haglind

21900

Days Mar Apr May Jun Location 5

JAVA

Oslo

Days Mar Apr May Jun Location

Identity and access control for modern web applications and APIs - Dominick Baier

SharePoint 2013 and Office 365: End to End for Developers - Sahil Malik

17

20

70-513 - WCF 4.5 with Visual Studio 2012 - Sahil Malik

SHAREPOINT

68

Days Mar Apr May Jun Location

Price

Oslo

18900

Oslo

18900


www.programutvikling.no

Test-Driven JavaScript with Christian Johansen

3

AngularJS End-to-End SPA Development - Dan Wahlin

4

AngularJS workshop - Scott Allen

2

C++

26 7 2

Oslo

18900

Oslo

21900

Plaza

Days Mar Apr May Jun Location

9500 Price

Advanced C++ programming and Introduction to C++11 - Hubert Matthews

4

24

Oslo

21900

C++ for Embedded Developers - Mike Tarlton

5

24

Oslo

24900

C++11 programming - Hubert Matthews

3

Kongsberg

18900

Scalable design and implementation using C++ - Andrei Alexandrescu

2

Plaza

14900

C

12 2

Days Mar Apr May Jun Location

Deep C: Et kurs for erfarne C og C++ programmerere - Olve Maudal - 28. August DATABASE

2

24

Oslo

Days Mar Apr May Jun Location

Databasedesign, -implementering og SQL-programmering - Dag Hoftun Knutsen PROGRAMMING

4

5

Oslo

Days Mar Apr May Jun Location

Objektorientert utvikling - Eivind Nordby

4

PRE-CONFERENCE WORKSHOPS AT NDC OSLO

16

Days Mar Apr May Jun

Oslo

Price 14900 Price 21900 Price 21900

Location

Price

Advanced Git and GitHub - Tim Berglund

1

3

Plaza

6800

Agile Interactions Workshop - Jessie Shternshus

1

2

Plaza

6800

AngularJS workshop - Scott Allen

2

2

Plaza

9500

Get Unblocked - Denise Jacobs

1

3

Plaza

6800

GitHub Foundations - Tim Berglund

1

2

Plaza

6800

Identity and access control for modern web applications and APIs - Dominick Baier

2

2

Plaza

9500

Information Alchemy: Crafting Better Presentations through Patterns - Neal Ford

1

2

Plaza

6800

Mobile to Multi-Device Web - Luke Wroblewski

1

3

Plaza

6800

Windows Azure Racing Game Workshop - Alan Smith

1

3

Plaza

6800

HOW TO FIND US PROGRAMUTVIKLING MAIN OFFICE, OSLO Parking Entrance

ProgramUtvikling AS is located in the IT-Fornebu technology park at Snarøya. ADDRESS Martin 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

ENROLMENT OPTIONS Bus stop

www.programutvikling.no - info@programutvikling.no Tel.: +47 67 10 65 65 - Fax: +47 67 82 72 31

FOLLOW US ON twitter.com/progutvikling

www.programutvikling.no/feed/news.aspx

nyheter@programutvikling.no

facebook.com/programutvikling

69


22DAYS DAYSOF OFWORKSHOPS WORKSHOPS ON ONTOP TOPOF OFRADISSON RADISSONBLU BLUPLAZA PLAZA DAY DAY11--JUNE JUNE2nd 2nd Tim Berglund GitHub Foundations This six-hour workshop gets you up and running with Git and GitHub. We’ll cover the basics of the Git command line interface, introduce you to graphical clients, and learn how to collaborate using pull requests on GitHub.com. No matter whether you work in open source, for a small company, or in a large enterprise, this is the introductory course for you.

Jessie Shternshu Agile Interactions Workshop The most important factor of an Agile team is the teams ability to communicate effectively. We often only focus on the technical aspect of things, when really most of the breakdowns happen when the team can´t communicate with one another. Understanding how to interact with your internal and external team is vital to the entire agile process.

Gael Fraiteur Advanced PostSharp From the Horse’s Mouth Most people know PostSharp for logging or exception handling, but those who dare to go deeper often change the way they think about programming – forever. Delivered by PostSharp’s founder and lead engineer Gael Fraiteur, this course explores the concepts of aspect-oriented programming, explains how to automate the implementation of design patterns, and describes how to validate design rules and architecture.

Neal Ford Information Alchemy: Crafting Better Presentations through Patterns Patterns are like the lower-level steps found inside recipes; they are the techniques you must master to be considered a master chef or master presenter. You can use the patterns in this session to construct your own recipes for different contexts, such as business meetings, technical demonstrations, scientific expositions and keynotes, just to name a few.

22DAYS DAYS--JUNE JUNE2-3rd 2-3rd Scott Allen AngularJS workshop AngularJS brings testable architectural patterns to applications built with HTML 5. This course explains and demonstrates the many features of AngularJS, including directives, filters, routing, controllers, templates, services, views. But, the best applications need more than a single framework. We’ll also learn about responsive design, Bootstrap, and the latest HTML 5 features including local storage, the canvas, web workers, web sockets, and more.

Pablo Cibraro and Pedro Félix Designing and implementing Web APIs in the .NET platform Web APIs are application programming interfaces exposed on the Web, using HTTP as an application protocol. They play an increasingly important role in the architecture of modern mobile-enabled distributed applications. This workshop aims to provide the attendees with both the technological and architectural knowledge required to design and implement Web APIs in the .NET platform.

@NDC_conferences #ndcoslo


DAY 2 - JUNE 3rd Denise Jacobs Get Unblocked As creative professionals, we are called upon to produce and deliver original strategies and solutions to make our companies or clients stand out in the crowd, requiring a high level of creative thinking and generation of innovative ideas.

2 Day Pass NOK 9800 1 Day Pass NOK 6800 25% VAT will be added

Luke Wroblewski Mobile to Multi-Device Web The web no longer starts and ends on our desktop and laptop computers. Today, the tremendous growth of mobile devices is turning more and more people into multi-device and, as a result, cross-device users.

You may attend these workshops without going to the conference

Tim Berglund Advanced Git and GitHub You already know the basics of Git and GitHub, and you’re ready for more. This six-hour workshop will equip you with the advanced skills you need to become the Git and GitHub expert on your team. Whether you work in open source, for a small company, or in a large enterprise, this is course is for you.

Alan Smith Windows Azure Racing Game Workshop The Windows Azure racing game workshop will focus on the use of Windows Azure services to host a back end system for real-time telemetry processing in a 3D racing game. The use of asynchronous queues, worker roles, storage services and websites will be explained. Techniques for real-time data stream processing, data archiving and report generation will be discussed and explored.

Kevlin Henney Introduction to TDD with a difference

Workshops are included in the

Bring your laptop to this hands-on workshop. Everything will be built up from first principles, including writing a simple testing framework. Language used: C#

NDC ALL ACCESS CONFERENCE PASS

NOK 18500 25% VAT will be added

Venkat Subramaniam Programming in Functional Style “Functional programming,” yes, everyone’s talking about it. But why? What’s this new excitement about something that’s been around for a very long time in some esoteric languages. For one thing, most mainstream languages now support it. C#, Java, C++,... To program in functional style you don’t have to change the language, but you have to change how you program in that language.

Dominick Baier and Brock Allen Identity and access control for modern web applications and APIs With ASP.NET MVC, Web API and SignalR tied together using the new OWIN and Katana framework, Microsoft provides a compelling server-side stack to write modern web applications and services. In this new world we typically want to connect client platforms like iOS, Windows or Android as well as JavaScript-based applications using frameworks like AngularJS.

ndcoslo.com


gs Warnin

rd

tion onfirma

C

Voting

d Passwor

Passwo

g Verifyin

Survey

SMS Billing

ing

Market

ers

Remind

Loyalty

Club

Voting

Contact LOVE update SMS

HLR

SMS API

ing

n

Donatio

Position

Mobile ng marketi Returadresse: ProgramUtvikling AS. Postboks 1, 1330 Fornebu Merge SMS

g

Orderin

The fast way to integrate

SMS into your software

C# Java HTTP ASP COM SMPP MSSQL YAP SMTP FTP Web Services

n Donatio

HLR

sales@vianett.no l

Voting

onfi

SMS Billing

g Verifyin

Rabekkgata 9, Moss - Norway

rmation

ww.vi

unt: w per acco

develo

rs

m20inde +47 69 R 20e 69

rd Passwo

For more information:

www.vianett.com arketing

M

eloper

m/dev anett.co

Survey

ing

Booking

ord

free

Erik Lerbæk IT-manager, Viking Redningstjeneste AS

Position

Sign

for a up now

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

t

Paymen

MMS

ired Get insp

Voting

Order Ask

Merge SMS

We love SMS!

Ndc magazine 1 issue  

The Developer is now rebranded to NDC Magazine.

Read more
Read more
Similar to
Popular now
Just for you