We're back for a new year of .NET! For this first week of 2016, we're off to a great start with two packages and lots of interesting posts.
To read last week's post, see The week in .NET - 12/29/2015.
Package of the week #1: ReactiveUI
ReactiveUI uses Reactive Extensions for .NET to create testable UI that are compatible with Xamarin (iOS, Android, and Mac), WPF, Windows Forms, UWP, etc.
Here's an example that illustrates how Reactive programming is very appropriate for UI, by showing how to throttle change events on a search textbox before sending queries to a search service:
WhenAnyValue(x => x.SearchQuery)
.Throttle(TimeSpan.FromSeconds(1), RxApp.MainThreadScheduler)
.InvokeCommand(this, x => x.Search);
You can see this sample code in context on the ReactiveUI site.
The ReactiveUI community is very open to contributions: you can check out what's up for grabs, and they also have a tag for first-timer only issues.
Package of the week #2: TypedRouting
If you think declaring ASP.NET MVC routes involves too many "magic strings", you're going to love TypedRouting.
Here's how you would declare a GET
route to HomeController.Index(int)
:
routes.Get("MyRoute/{id}", route =>
route.ToAction(a => a.Index(With.Any<int>())));
In this example, both the controller name and the action method names are checked at compile-time. Even the signature of the method can be checked during compilation, and will be flagged as an error if it changes and becomes incompatible with its usage.
The library doesn't stop at adding routes, and also provides a range of utilities to use the routes. For example, you can get a link using the route defined above:
urlHelper.Action(c => c.Index(1));
User group of the week: New England Microsoft Developers
This week, the New England Microsoft Developers group has John Pelak talking about Azure ML - machine learning for all of us, on Thursday, January 7, from 6:30PM to 8:30PM, in Burlington, MA.
.NET
- Fast shared array, buffer, and ring buffer for .NET IPC with memory mapped files by Justin Stenning.
- Having a look at the dotnet CLI tool and .NET Native compilation in Linux by Tugberk Ugurlu.
- Introducing NBench - an automated performance testing framework by Petabridge.
- Do one thing and do it well by Mark Rendle.
ASP.NET
- Complex custom tag helpers in MVC 6 by Dave Paquette.
- How to unit test ASP.NET MVC 6 ModelState, and Fast ASP.NET Integration by Armen Shimoon.
F#
Start your New Year off right with the epic conclusion of the 2015 F# Advent Calendar in English:
- Welcome to 2016 - A Call to Action, by The F# Software Foundation.
- Visualizing F# Advent Calendar Contributors, by Pierre Irrmann.
- Implementing API Gateway in F# Using Rx and Suave, by Tamizh Vendan.
- Happy New Year 2016 Around the World, by Tomas Petricek.
Check out F# Weekly for more great content from the F# community.
And this is it for this week!
Contribute to the week in .NET
As always, this weekly post couldn't exist without community contributions, and I'd like to thank all those who sent links and tips. You can participate too. Did you write a great blog post, or just read one? Do you want everyone to know about an amazing new contribution or a useful library? We'd love to hear from you, and feature your contributions on future posts:
- Send an email to beleroy at Microsoft,
- comment on this gist
- Leave us a pointer in the comments section below.
This week's post (and future posts) also contains news I first read on ASP.NET's community spotlight, on F# weekly, on ASP.NET Weekly, and on Chris Alcock's The Morning Brew.