Mobile Safari's Performance is Not the Problem

| Comments

Earlier this week Nilay Patel of The Verge published an article about how “The Mobile Web Sucks”, which caught my attention, as I had written about the mobile web’s woes just a few days before.

But although both our articles argued that reading content on the mobile web can be less than ideal, our reasoning diverged when it came to explaining why. Whereas I argued that the issue is the web’s broken monetization and advertising model, Nilay argued that the issue is performance, and more specifically, “the performance of Mobile Safari”. Or in longer form:

“The entire point of the web was to democratize and simplify publishing using standards that anyone could build on, and it has been a raging, massively disruptive success for decades now. But the iPhone’s depressing combination of dominant mobile web marketshare and shitbox performance means we’re all sort of ready to throw that progress away.”

I don’t often take time out of my day to defend Safari, but in this case I feel the great need to take a few minutes to explain why Nilay’s argument is wrong, or at the very least off base.

NativeScript Quick Tip: Showing and Hiding Elements

| Comments

NativeScript supports the "collapsed" and "visible" states of the CSS visibility property. This means you can hide an element by setting its "visibility" property to "collapsed" in CSS. For example you can use the following CSS to hide all buttons.

button {
    visibility: collapsed;
}

Warning: Currently NativeScript is inconsistent with the CSS spec, as the CSS spec defines visibility: collapse, and NativeScript uses visiblity: collapsed. I have an issue open to resolve this discrepancy.

A reportValidity() Use Case and Polyfill

| Comments

Last week Chrome 40 was released, and while the greater web community was celebrating service workers landing, a little known DOM method made its first appearance in a browser: reportValidity().

Because I don’t think many people know what reportValidity() does, I thought I’d write a quick article about it. Personally I think the best way to explain reportValidity() is with a real-world example, so let’s start there.

Speed Up Your Cordova App with the WKWebView Plugin

| Comments

I woke up this morning to discover that the Telerik marketplace had a new WKWebView plugin:

I had written about the performance benefits of WKWebView before, and Eddy Verbruggen—the author of the WKWebView plugin—has done some performance benchmarks as well, so I knew the plugin would give a performance boost, but I had to see the benefits for myself.

Updating Google Play and iOS App Store Version Numbers with the AppBuilder CLI

| Comments

I had some issues updating iOS and Android version numbers yesterday so I thought I’d write up what I learned. Here’s the scenario: you already have an AppBuilder app deployed to the iOS app store and Google Play, and you want to increase the app’s version number from 1.0 to 1.0.1.

Doing so turns out to be as simple as running two commands:

$ appbuilder prop set BundleVersion 1.0.1
$ appbuilder prop set AndroidVersionCode 2

So You Want to Write a Tech Book

| Comments

Books on my shelf

When I finished jQuery UI in Action I decided I wanted to write a retrospective to help other aspiring authors. I wanted to release the retrospective around the same time as the book (*cough* late September), but as it turns out, it’s super easy to legitimize procrastination after you finish writing a book. Playing through the entire suite of Sonic the Hedgehog Genesis games suddenly seems like a great idea. (It is, by the way.)

But I did finally get around to doing this. What follows is a semi-coherent series of sentences about my experiences writing a tech book. The target reader is someone curious about how tech books are authored—especially masochistic readers that might be interested in writing a book themselves one day.

The Problem With Using HTML Imports For Dependency Management

| Comments

HTML imports are cool. If you haven’t heard of them before, you should read Eric Bidelman’s excellent introduction to them, but they’re pretty self explanatory with a bit of code. For example the following is how a jQuery UI dialog works in my proof-of-concept web components port:

<link rel="import" href="ui-dialog.html">

<ui-dialog title="Hello World"></ui-dialog>

The cool thing here is not what you see—a <link> tag that imports a custom element—but rather, what you don’t. Normally when using jQuery UI widgets, you have to worry about a number of JavaScript and CSS dependencies, such as jQuery Core, the widget factory, a CSS theme, and more. With HTML imports you don’t, as the import takes care of bundling everything you need.