Type(Script)Ahead

by dotnetnerd 14. December 2017 07:48

Recently I ran into a task that I had encountered less than a year ago with another client. In both cases the client was using Bootstrap CSS for their grid layout, but didn’t have much need for the Bootstrap JavaScript bits. After a while the need for type ahead functionality arose, so the first time around we agreed to include the Bootstrap JavaScript so we could use the Bootstrap Typeahead plugin.

However having to include jQuery, Bootstrap JavaScript and a plugin, which still required me to make some tweeks to work properly, didn’t sit well with me. So the second time around I opted to implement type ahead on my own. More...

Simply being lazy and concurrent

by dotnetnerd 18. November 2017 20:25

I recently worked on a long running migration project, where we needed to ensure that some of the sql migration scripts were only called once per entity that was migrated, in a threadsafe manner. I looked to the System.Collections.Concurrent namespace, but none of the classes were really a good match. Basically what I needed was the ability to run a part of the migration that was identified by key, but ensure that it would only run once, although different parent strategies might try and run it.

More...

Template for TypeScript, Handlebars and Webpack architecture

by dotnetnerd 5. October 2017 12:05

I recently started a new project, based on my own medicine of not using a framework, but building a simple architecture, that can grow and change freely based on needs as they arise. It is coming along very nicely, and has allowed us to have a pretty clean architecture.

For this project we chose to base the solution on TypeScript, and use handlebars for views along with a few other small libraries. As a clientside build tool we wanted to use webpack, because it is fast, has a lot of plugins that we can use, and is well suited for working with css modules. More...

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

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