.NET tanker & tips

.Net, jQuery og andre nørdede emner

SDD day 2 & 3 - Impressions and takeaways

May 23
by steffen 23. May 2019 20:23

As a part of my attendance at the SDD Conference in London, I have decided to write small blog posts summing up some of the impressions from the talks I attend. The format will be rougher since the posts have been written during the day and finished in the evening at the hotel.

This post is a summary of my impressions and takeaways from the second and third day of the SDD conference.

Version ASP.NET Core APIs

Philip Japiske (@skimedic) gave a walkthrough of the new versioning capabilities in .NET Core. Every public-facing API's are facing the same issues with regards to versioning. An API - like any other code - will almost always be a living thing, where new requirements will show up and change the endpoints and functionality.

In order not to introduce breaking changes to the existing API, that is being consumed by customers, a proper versioning strategy must be put into place. This was previously a manual process that the team agreed on, but with the new Microsoft.AspNetCore.MVC.Versioning.ApiExplorer assembly, this can be streamlined significantly by expressing which endpoints are supported in which versions of the API. By decorating a controller with the [ApiVersion("2.0")] data annotation, you can express which versions of the API the controller is currently supporting. It is even possible to have multiple decorations if the controller is supported in multiple version of the API.

Build RabbitMQ Microservices in C#

Queuing technology is here to stay. Richard Blewett gave a short introduction to one of the biggest actors in this technology stack: RabbitMQ. To support big spikes in load it is a common approach to implement a queue that can handle the messages. This can be handy if the request does not need an instant response (e.g. sending some data for processing). Each request can be put into the queue and the consumers can handle one at a time without being a bottleneck. RabbitMQ is written in Erlang and is optimized for performance - rumour has it that Google has a queue implementation that handles 1.000.000 messages per second!

One of the neat tricks that RabbitMQ has is the ability to add a 'topic'. The consumers can filter on this topic so that they only pick up the messages that they actually want to. It is a very simple approach, but the simplicity is what makes it so powerful. RabbitMQ is definitely on my list of things I want to learn more about.

Vue.js

One of the things that I am focusing on learning at the moment, is the different frontend javascript frameworks. Vue.js is Google's take on this and it plugs in very nicely with the ASP.NET MVC background that I have. Vue is extremely lightweight coming in at only 33k and also has its own logic with regards to manipulating the DOM, which means that you can also cut away jQuery saving even more bandwidth. It can work side by side with jQuery, but only if you actually have a specific need for jQuery (maybe legacy code). 

Vue supports all the cool stuff like two-way data binding and can easily be plugged into an existing Razor based MVC view. This means that you can use you traditional view models from MVC, to hand down data to Vue, which will use the data on the client-side. 

The first impression was very good and I will be digging into the pros and cons of Vue vs React and Angular soon.

UI Design crash course for software developers

I am not a designer, but as Joe Natoli (@joenatoli) pointed out it is very often that the developers (backend and frontend both) end up doing design work. In this talk Joe went through a few guidelines that will help anybody - even a developer - design UI that isn't horrible (might not be beautiful UI, but at least not horrible). 

Each element in the page must be in harmony with the other elements. This essentially means that it is important to align the elements vertically and horizontally as much as possible. If you draw a line from each vertical and horizontal edge on an element, this line should align with as many other lines in the screen. Also, make sure that the spacing between each element is the same.

If certain elements belong together, make sure to enhance this relationship by grouping the elements close together. This provides structure to the page and will make it easy for the user to understand the relationship between elements. Grouping can also be done with contrasting colours, but distance is superior for this, so choose to place elements close together overusing colour if possible.

One should be very aware of the concept of contrast. Black and white is the best contrast you can get and provides the user with very easy reading experience. Be aware of using very vibrant colours. Red on yellow might have great contrast, but can be very straining for the eye to read.

One should always try to keep the 'noise' as low as possible. Often there is simply too much content on a page, making it seem very messy and noisy. 'Less is more' is the goto motto, when deciding what to have on the page.

Tags: , , , , ,

blog comments powered by Disqus