Patrick McVeety-Mill:

Loud & Abrasive


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

  • Don't Put Links Inside Buttons

    And Vice Versa

    This assertion may be old news to you, and if it is feel free to breeze by, but I just made this mistake and surely I’m not the only or the last one to come upon it.

    The anchor (<a>) and button (<button>) html tags are designed for different purposes. Buttons act in forms, anchors (links) are practically anywhere and go to other pages. Thinking people like Chris Coyier have posted some thoughts about that before, and I’m sure there are many opinions about it, as living things like html are wont to lead to.

    Read On
  • Dynamic Collapse Headers in Bootstrap

    Twitter Bootstrap sure is fancy. With it or cousin framework Foundation, you can whip up a pretty nice, modern-looking website with minimal effort. (Though personally, I often prefer the less-opinionated Pure framework.) These libraries and tools provide the groundwork and components to style your way into the future, but also leave out some of the nuances to enhance your user experience to primo usability and slickness.

    Bootstrap’s Collapse component is pretty handy. It looks like this:

    Read On
  • 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