TypeScript patterns: Controller

by dotnetnerd 7. August 2017 11:45

The next pattern I want to take a look at, that is fundamental to how many JavaScript applications are structured, is the Controller pattern.

There are different definitions for what a Controller is on the client, depending on what framework people are used to working with. As you may know I often recommend not using a framework, but I go with the definition that a controller encapsulates the UI logic for a part of a web page. A common practice is to have controllers take the html element that it works on as the first constructor argument, followed by dependencies (services and other controllers) and possibly an options object. This will resemble what you are likely doing if you are writing eg. an MVC application in ASP.NET MVC or WebAPI. In much the same way, this allows you to pass in dependencies, and keep the controller free of hardcoded dependencies.

More...

TypeScript patterns: Lazy

by DotNetNerd 12. July 2017 08:48

I have been working with TypeScript for quite a while now, and I really enjoy how the strong typing enables better tooling, as well as more understandable code, where the patterns of old look more like themselves, than they do in plain JavaScript. With the adoptation that TypeScript has seen in the last couple of years, I think it is safe to say that it is a good bet going forward, so if you are not already on board I highly recommend it. I will bet your time is better spent with languages and patterns, than they are learning the framework flavour of the day – although they do in themselves provide inspiration for patterns.

More...

TypeScript 2 – full speed ahead!

by DotNetNerd 1. May 2017 10:30

I have been happy working with TypeScript for quite a while now, and I am happy to say that things are moving ahead with the language quite well. It is not that long ago that TypeScript version 2.0 was realeased, and with steady releases we are now at version 2.3.

One of the big things that came to TypeScript in version 2.0 was discriminated union types and the option to do strict null checks, which combine quite nicely. Discriminated unions are simply done using the pipe operator, and the compiler will do strict null checks if you use the --strictNullChecks switch. More...

ASP.NET Core and Node together: JavaScript Services

by DotNetNerd 6. January 2017 10:08

A while ago I heard about some JavaScript Services that Steve Sanderson was working on for .NET core. The central idea was to provide services that could use NodeJS within an ASP.NET application, allowing us to consume all the awesome modules that are written for node. This can allow us to do a number of things, like prerendering and better integration between client and server that can run the same code.

Recently I ran into a new article about the work they are doing on JavaScript Services, and it seems to be far enough along now, that I think it is really worth trying out.
The documentation is really well written, so I won't write step by step instructions, but simply point out that it can be found on github and that it is pretty easy to get going.

More...

2016 review

by dotnetnerd 19. December 2016 10:24

What a year this has been, and now is the time for my yearly review. Work wise my business has been very simple to run and very stable, because I have continued to extend my contract with DI. This may sound boring initially, but the reason this has worked for me is that I get to dive into a lot of technologies especilly around Azure and Visual Studio Team Services. I have been building a greenfield self-service application, for one of the biggest and most influential organisations in the country, while having the hands on the wheel with reguard to tech and design. So although I have not been moving on to new projects as much as I expected I am loving it.

More...

GOTO: automated driving

by dotnetnerd 4. October 2016 11:56

A subject that I find myself reading about and discussing over the dinner table a lot recently is the promise of self-driving cars. I absolutely love the idea because of all of the problems it can solve in society. No more drunk driving, no more wasting time in traffic jams, no more parking issues and no need to own an expensive heap of metal that looses value even though you only use it a few hours a week.

With this in mind I went to Sanna Pampels talk called “Automated driving - are we taking the human factors researcher out of the loop?”. The talk was relly good with Sanna starting out by covering the different levels of automation. Going from a level 0 with no automation, over different levels of assisted and partially automated driving to level 5 which is full automation or autonomous cars.

Sanna said that british drivers spend 124 hrs in traffic jams each year, and dribing is not as safe as it could be, mainly because of human errors in traffic.

More...

Tags:

Events

Deep learning at GOTO

by dotnetnerd 3. October 2016 11:49

Today I chose to take up an old advice and picked a track that was completely out of my comfort zone for the first day of GOTO. When jumping off the deep end you might as well do it completely, so I decided to go for a number of talks on Deep Learning Analytics.

I had high hopes because the first talk was an introduction to the subject called “what is it and what can it do for you”. Sadly the talk didn’t really do it for me, because it started out really theoretical, and Diogo Almeida seemed almost too passionate, which meant that he started speaking really fast and jumped between usecases, both current and some for the possible future.

More...

Tags:

Events

GOTO 20 year anniversary

by DotNetNerd 3. October 2016 08:58

This year is, believe it or not, the 20th anniversary of the GOTO conference. So I think the expectations are high, with the event being hosted at the Bella Center.

Dan North, who is a regular speaker at GOTO, was tasked with doing the first half of the keynote, and as always he delivered. The topic was on the future of agile, so a topic that I have seen Dan speak about a number of times. He went over how we are still a young industry with the vast majority of us being the first in our families to work in IT.

More...

Tags:

Events

GOTO – a word on language divercity

by DotNetNerd 29. September 2016 10:52

One of the things that makes GOTO special for me is that it is the one conference i visit every year where I run into developers with so many different backgrounds. Most conferences are in one way or another centered around one platform and one programming language. Even though GOTO started as a Java conference back when it was called Jaoo, this is no longer the case, with Microsoft being regulars on the speaker list, and with tracks on languages like Elixir, Pearl and NodeJS being a regular occurance in the past.

More...

Tags:

Events

Almost GOTO time

by dotnetnerd 13. September 2016 07:40

So it's that time of the year again. GOTO Copenhagen is just around the corner, and this year it is the 20th anniversary, so I expect it to be an even bigger deal than it normally is. It certainly looks like it, with the event being hosted at the Bella Center on the 3.-4. October, and with a very impressive speaker lineup.

More...

Tags:

Events

Who am I?

My name is Christian Holm Diget, and I work as an independent consultant, in Denmark, where I write code, give advice on architecture and help with training. On the side I get to do a bit of speaking and help with miscellaneous community events.

Some of my primary focus areas are code quality, programming languages and using new technologies to provide value.

Microsoft Certified Professional Developer

Microsoft Most Valuable Professional

Month List

bedava tv izle