Philip Hendry's Blog
Sporadic musings from Philip Hendry

ASP.NET Web Api Complex Model Binding and Validation

Dec 7, 2019 • ASP.NET • 18 min read

I’ve been writing an application that combines ASP.NET MVC/WebAPI backend and a Vue.JS single page application frontend over the last few years. It started as a bespoke ASP.NET MVC application but I’ve slowly been growing the code base into a multi-tenant product with quite a complex form editor written in Vue.JS. It’s this form editor that I’m focusing on in this post and in particular how it transfers quite a complex Javacript object model to/from an ASP.NET WebAPI interface. The rest of this post focuses on how JSON is mapped to an object property on a WebAPI action and the extra validation I want to have.  Read →

Binding Keypresses using Mousetrap in Aurelia

Feb 7, 2016 • Aurelia, JavaScript • 4 min read

I wanted to enhance my Aurelia app with some keyboard shortcuts so immediately searched the internet for a library that would overcome browsers differences for me whilst making it easy to set up key presses and their callbacks.  Read →

Binding HTML Boolean Attributes in Aurelia

Feb 7, 2016 • Aurelia, JavaScript • 1 min read

I’ve noticed before how HTML defines attributes such as multiple which don’t take values but I didn’t appreciate that the HTML specification has a term for these - boolean attributes. And so I came across this term when I was trying to bind multiple in a <select> using Aurelia. Take the following Aurelia template as an example:  Read →