Patrick McVeety-Mill:

Loud & Abrasive


Posts on development, software, and technology including tips, troubleshooting, and "nobody-asked-you" commentary.

  • Hide Data, Not Inputs

    Today’s data-rich, dynamic internet can mean shoving context and metadata wherever you can to support content styling, drive data usage, or otherwise spruce up your UI. Recently I was tasked with sorting and grouping items in a list by date, with display headers over each group. The list item sort-by dates initially came from the server, so I was able to leverage Razor helpers to generate the headers. Things got complicated, however, when I needed to dynamically show or hide each header based on whether its contents matched the current filter settings. Luckily we were using Knockout, so a framework for fancy front-end logic was in place.

    My first inclination was to nest hidden inputs inside the header element. An element with a built-in “value” that isn’t shown by nature seemed like a good choice. I then captured those values when I created my Knockout viewmodels for the list headers:

    Read On
  • JS in .NET Without Node

    Or, Not Node, .Net.

    I don’t have to tell you that javascript is the new hotness. In fact, at this point, some may even call it the old hotness. More and more web applications are built as SPAs, or at least have much richer client-sides. The tools and libraries that’ve come through node and the npm have proven so useful that many developers are taking advantage of them outside of core- node.js projects.

    Read On