Reading Client-Side Files for Validation with Vue.js

Reading Client-Side Files for Validation with Vue.js

Folks new to web development may not know that form inputs using the file type are read only. For good reason of course. You wouldn’t want nefarious (I’ve been waiting a while to use that word) JavaScript programs setting the value of the field and doing uploads behind the scenes - it would be a great way to steal information off your computer. However, just because the field is read only doesn’t mean we can’t do cool stuff with it. In fact, once a user has select a file (or files, remember the multiple attribute!), you can not only see the file type, name, and size, you can read it as well. This offers you some interesting possibilities.

read more

Using HTML Form Validation without a Form (Kinda)

Using HTML Form Validation without a Form (Kinda)

This will be a quick one. I’ve been a huge fan of HTML-based form validation for some time now. Even though it is far from perfect (and must always be coupled with server-side validation), I love the fact that it can catch errors early in the submission process and create a better experience for users. My first experience with server-side programming was writing Perl scripts to handle forms so anything that improves the process is pretty freaking important to me.

read more

Building a Plex Server Duration Search with Vue.js

Building a Plex Server Duration Search with Vue.js

A few days ago a good friend asked me a question about Plex. If you’ve never heard of it, Plex is an awesome media server that creates an easy to use UI for media (videos, music files, pictures, etc.). It’s very popular and you can use it via the web, mobile devices, and smart TVs. It’s relatively easy to use and you can share your (legally acquired of course) content with friends. My friend mentioned that it would be cool if Plex had a way to find a movie of a particular length. In this case, dinner was in an hour or so and it would be neat to find something of that particular length. Plex lets you sort by duration but you can’t filter to a particular length (or range of lengths).

read more

Handling Errors in Vue.js

Handling Errors in Vue.js

I’ve been spending the last year working with, writing about, and presenting on my favorite framework, Vue.js, and realized that I had yet to look into error handling with Vue. I’d like to say that’s because I write perfect code, but I think we all know the truth of that. I spent some time the last few days playing around with various error handling techniques provided by Vue and thought I’d share my findings. Obviously this won’t cover every scenario out there, but I hope it helps!

read more

Working with Audio in NativeScript - Part Two

Working with Audio in NativeScript - Part Two

A few days ago I blogged about my experience working with audio and NativeScript (Working with Audio in NativeScript - Part One). Over the weekend I got a chance to wrap up the demo application I was working on and thought I’d share the result. As always, my work ends up being a mix of stuff I think went well and stuff I think… could be done better. I’ll do my best to call out the code I think could be improved and would love any suggestions or comments.

read more

Vue Components FTW - VGauge (and a love letter to CodeSandbox)

Vue Components FTW - VGauge (and a love letter to CodeSandbox)

When I began this series I had a few things in mind - highlighting Vue components that were cool and easy to use. As part of my arbitrary guideline for “simple” I only wanted to use components that included support for script tag installation. In other words, you didn’t have to use a full Vue application but could simply add a script tag to your page. This made it especially easy to use with CodePen which I’ve been a huge fan of lately. It’s not that I’m opposed to components that don’t support this or think it’s a terrible thing to not support script tag usage, I just want to show my appreciation for a component supporting both use cases.

read more

Blocking Web Sites from Prompting for Notifications

Blocking Web Sites from Prompting for Notifications

In general, I’m a fan of new capabilities that come to the web platform. Unfortunately, sometimes a new feature is released that is abused as hell by web sites making you wish the feature had never even been considered. In this case, I don’t necessarily blame web developers, as I think they already know that a particular feature is being abused, but rather managers who insist that they know what they’re doing and “users really want this”.

read more

Getting Location in NativeScript - Part 2

Getting Location in NativeScript - Part 2

A few days ago I blogged about working with Geolocation in NativeScript (“Getting Location in NativeScript”). That post was a bit short as I was writing during a layover on my way to NativeScript Developer Day (which was pretty damn cool!) in Amsterdam. Now I’m on my way home, stuck in Atlanta due to storms causing chaos, and I thought I’d share a quick update to my previous post.

read more

Getting Location in NativeScript

Getting Location in NativeScript

As I prepare to get on an 8+ hour flight to Amsterdam for NativeScript Developer Day, I thought it would be nice to work on a quick little NativeScript demo. It occurred to me a few days ago that one of the things I did while learning Cordova and Ionic was to build a crap ton of simple demos that used various plugins as a way to learn the ecosystem. I’ve decided to try my best to repeat that process with NativeScript. What follows is the first of two articles I’m going to write on using geolocation with NativeScript. This is just a simple introduction while the next one will be a slightly more complex example.

read more