• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Dion Almaer

Software, Development, Products

  • @dalmaer
  • LinkedIn
  • Medium
  • RSS
  • Show Search
Hide Search

Gearing up the Web for 2018

December 29, 2017 Leave a Comment

It’s the time of year when you reflect and refocus. With the recent news of Edge and WebKit bringing service workers to their people, it is hard not to reflect on the long journey of bringing rich, some may say app-like, capabilities to the Web.

❗️It's like we got huge present from web platform this holiday🎁

Safari Technology Preview release from @webkit says
"we’re excited to enable Service Workers by default in this release. Please test our implementation with your websites"
🎉🎉🎉https://t.co/tINheFZSzv

— Chrome Developers (@ChromiumDev) December 20, 2017

With 2017 sunsetting (in some ways: good riddance!), I thought back ten years to 2007. You may remember the simpler times where Arnold was the Governator in California, Mad Men and Flight of the Conchords were on the scene, and Steve Jobs showed us his new phone.

In the world of the Web, I was working on Google Gears.

Any excuse to get the zipper image back!

This was a pre-Chrome world where developers who were trying to bring bleeding edge desktop web apps (Gmail, Google Docs, etc) often reached to a browser plugin to deliver the functionality that they needed (Flash and Silverlight). We were seeing a resurgence in using HTML/CSS/ and JS to power the UI, using plugins to get access to some native capabilities — Remember XMLHTTPRequest was born as an IE ActiveX component.

Picture yourself with a Gmail that nailed spam and search so well that Eudora was tossed aside. One restriction though was the reliance of a tether to the Internet. A next obvious step was to take Gmail offline (including that great search!) and improve all of the perf (always an issue ;).

Gears brought us the modules to do just this, and it is fascinating to see which primitives we ended up with:

  • A Database module (powered by SQLite), which could store data locally
  • A WorkerPool module, which provided parallel execution of JavaScript code
  • A LocalServer module, which cached and served application resources (HTML, JavaScript, images, etc.)
  • A Desktop module, which let web applications interact more naturally with the desktop
  • A Geolocation module, which let web applications detect the geographical location of their users (Google Maps any one!!!)

How many of these are still needed to pull off a great web experience, worthy of the home screen addition from a loyal user, even as we have moved to mobile and beyond?

But a browser plugin wasn’t the ideal solution. You want the platform itself to grab onto good ideas and bake them in (hopefully learning from the implementations to come up with something much better). Also, 2007 remember….. with Safari on iPhone, and Jobs said “nope” to the plugin world (and thus the fall of Flash and Silverlight).

Let’s take a peak at the problems we were solving and what the solutions we now have available, with the new context of mobile, and where we can be heading in 2018!


Dealing with data

The Gmail team dealt with much pain on the bleeding edge as everyone worked out how to store (sometimes large amounts of) data correctly locally and sync it with the backend.

We quickly codified SQLite into the platform via WebSQL, which didn’t quite stick. There were issues with baking in an implementation into a standard, but I also wonder how much gas was lost from the effort because the world jumped into a “NoSQL” bandwagon. The many benefits of SQL have held the test of time, and with new innovations such as Spanner, I do sometimes wonder if it wouldn’t be kinda great to have SQL back in the client toolbox?

Instead we got the likes of DOMStorage and IndexedDB, as well as many solutions on top of our primitives. Today we see a lot of usage of Firebase (including the new Firestore which has offline support on the Web!) and there is also large mindshare in the GraphQL space, with great clients such as Apollo.

So, we have a lot of work going on with respect to data, both on the client and how to sync back to the backend, but I think we will see new patterns emerge in 2018 that will put everything together.

Working off thread

As we constructed richer applications through JavaScript, and accessing local capabilities like databases, we needed to be able to do this work away from the UI thread, else the apps became unresponsive. Thus, Gears brought us WorkerPool, which was morphed into the Web Workers standard.

Doing less work on the main thread continues to very much be a key bottleneck, especially in a world of low power CPUs! Phil Walton just posted on this from the vantage point of interactivity, and the lack thereof, and we have exciting work landing and in process.

Browser vendors are hitting this head on in their implementations, with large architecture changes (e.g. Quantum has a lot of this baked in) as well as tactical upgrades (e.g. image decoding happening elsewhere).

We are also seeing new standards that bake new abilities, from tweaks such as img decoding, and large additions such as the awesome Animation Worket that will truly change the game.

When it comes to new capabilities, we often follow the pattern of:

  • Step one: make it possible.
  • Step two: make it easier.
  • Step three: make it perform.

This is one reason I got excited about Surma’s exploration: COMlink, that gives you the same API across windows, iframes, Web Workers and Service Workers — speaking of which….

A Local Serv…ice

The browser was built as a client desktop application that sat on a nice fat university pipe. I remember that world fondly, where I had an Sun Ultra as my workstation, and I could also login to any machine on campus and have my X windows show up just they were.

The network was never perfect, but as it diversified, and our devices walked around with us, we needed to handle the lack of network progressively. The Gears LocalServer module came with a couple of cool features. One of them was the Gears JSON manifest file, somewhat akin to AppCache, that allowed for a declarative approach. Declarative APIs are great until you need to break out of the box. In that case you long for an imperative API that the declarative one builds on. LocalServer gave you a programatic API too, but it was much more restrictive than what we have today in the powerful Service Worker, where you get to fully own the networking layer. With this power comes great responsibility and is one that you need to think through up front, making sure that you have the correct kill switches in place, and processes to fully test.

Service Workers were a perfect example of the Extended Web in action. A powerful building block for us all to build on top of, including the web platform itself, as we have seen with Web Push and friends.

Native capabilities

When the Web is at its best, it allows you to reach the broadest set of users, but also allows them to experience it on their terms. This is why a UI change to make image picking better (often feeling more akin to other image picking on that particular device) can have a large impact. It is also why I have been a fan of extensions, allowing users to customize to break out of the A/B optimizing machines.

Gears had a Desktop module that allowed you to drop an icon for your web application that could now serve locally and store data via SQLite.

Home screen access is even more important in the world of mobile, so that is where we first saw this support via the Add To Home Screen API. This doesn’t mean that I don’t want it on my desktop too though, and I look forward to great desktop PWA support in 2018!

Gears drove some of these native capabilities, and in general I like to see developers being able to push the boundaries, and having the platform standardize the good ones later. This is one reason that I keen to see how developers use Trusted Web Activities, which gives you the ability to bridge native and Web in a new way.


Now we have seen how the specific Gears modules have baked themselves into the core platform. It is also interesting to look at the areas that weren’t a focus then, and how we are now going well beyond the issues of the day.

The Google Apps of the day were large codebases. Throngs of JavaScript were being flung, and Closure was the weapon of choice to keep the codebase sane. We got through the ES4 detour, and I am happy to see that with ES2015 we have put our requirements into the language versus comments.

Layout wasn’t as much fun back then. Without Flexbox, we had to result in a lot of tricks that required JavaScript, and we had to manually (read: use a lot of resources :/) check on what was in view versus using APIs from the Observer family (Check out Eric’s examples of the new ResizeObserver addition!).

These days we not only have Flexbox in the toolbox, but we also have the fantastic CSS Grid, and one fun way to master it is by “playing” with Dave’s Grid Critters.

https://mobile.twitter.com/trueadm/status/944908776896978946

When it comes to bringing capabilities wrapped up in native code, we now have WebAssembly at our finger-tips. I am particularly curious to see what gets wrapped and made available for the masses.

And what better way to do the wrapping that via Web Components. We have long dreamt of the ability to reuse rich UI components that were fully tested and had high quality accessibility support. It used to be frustrating to see an amazing YUI widget, that you couldn’t bring into Closure land. We are finally getting to the point where this is no longer an issue, and with SkateJS, Stencil, and Svelte joining Polymer and friends, we can share and compile like never before, and it is starting to feel like 2018 is the year of the Template Literal Libraries.

When you put this together, we can have the semantics of <something-cool> that could be wrapping rich UI and WebAssembly code under the hood.

We still have much to do, but the pieces are coming together to deliver rich experiences that can be constructed and combined by creators. In a world where we seem to spend more time consuming, I sincerely hope for 2018 to be a turning point for more of a read/write Web, and world.

Not only are we seeing the features come to light, we are seeing browser vendors coming together to implement them with haste, a huge difference from the time of Gears and ChromeFrame.

So, here’s to more green in 2018, something that I was excited about in the Chrome DevSummit keynote that I got to give with Ben:

I am curious to hear what you are looking for in 2018. It has been a lot of fun to read existing thoughts from the various end of year countdowns, and a big thanks to Mariko for inviting me to write this for http://web.advent.today/!

Share this:

  • Twitter
  • Facebook

Tagged With: Web Development

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Twitter

My Tweets

Recent Posts

  • Generative AI: It’s Time to Get Into First Gear
  • Developer Docs + GenAI = ❤️
  • We keep confusing efficacy for effectiveness
  • The holy grail of a Web SDK
  • The rise of the extensible app platforms

Follow

  • LinkedIn
  • Medium
  • RSS
  • Twitter

Tags

3d Touch 2016 Active Recall Adaptive Design Agile Amazon Echo Android Android Development Apple Application Apps Artificial Intelligence Autocorrect blog Bots Brain Calendar Career Advice Cloud Computing Coding Cognitive Bias Commerce Communication Companies Conference Consciousness Cooking Cricket Cross Platform Deadline Delivery Design Desktop Developer Advocacy Developer Experience Developer Platform Developer Productivity Developer Relations Developers Developer Tools Development Distributed Teams Documentation DX Ecosystem Education Energy Engineering Engineering Mangement Entrepreneurship Exercise Family Fitness Founders Future GenAI Gender Equality Google Google Developer Google IO Habits Health HR JavaScript Jobs Jquery Kids Stories Kotlin Language Leadership Learning Lottery Machine Learning Management Messaging Metrics Micro Learning Microservices Microsoft Mobile Mobile App Development Mobile Apps Mobile Web Moving On NPM Open Source Organization Organization Design Pair Programming Paren Parenting Path Performance Platform Platform Thinking Politics Product Design Product Development Productivity Product Management Product Metrics Programming Progress Progressive Enhancement Progressive Web App Project Management Psychology Push Notifications pwa QA Rails React Reactive Remix Remote Working Resilience Ruby on Rails Screentime Self Improvement Service Worker Sharing Economy Shipping Shopify Short Story Silicon Valley Slack Software Software Development Spaced Repetition Speaking Startup Steve Jobs Study Teaching Team Building Tech Tech Ecosystems Technical Writing Technology Tools Transportation TV Series Twitter Typescript Uber UI Unknown User Experience User Testing UX vitals Voice Walmart Web Web Components Web Development Web Extensions Web Frameworks Web Performance Web Platform WWDC Yarn

Subscribe via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Archives

  • January 2023
  • September 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • November 2021
  • August 2021
  • July 2021
  • February 2021
  • January 2021
  • May 2020
  • April 2020
  • October 2019
  • August 2019
  • July 2019
  • June 2019
  • April 2019
  • March 2019
  • January 2019
  • October 2018
  • August 2018
  • July 2018
  • May 2018
  • February 2018
  • December 2017
  • November 2017
  • September 2017
  • August 2017
  • July 2017
  • May 2017
  • April 2017
  • March 2017
  • February 2017
  • January 2017
  • December 2016
  • November 2016
  • October 2016
  • September 2016
  • August 2016
  • July 2016
  • June 2016
  • May 2016
  • April 2016
  • March 2016
  • February 2016
  • January 2016
  • December 2015
  • November 2015
  • October 2015
  • September 2015
  • August 2015
  • July 2015
  • June 2015
  • May 2015
  • April 2015
  • March 2015
  • February 2015
  • January 2015
  • December 2014
  • November 2014
  • October 2014
  • September 2014
  • August 2014
  • July 2014
  • June 2014
  • May 2014
  • April 2014
  • March 2014
  • February 2014
  • December 2013
  • November 2013
  • October 2013
  • September 2013
  • August 2013
  • July 2013
  • June 2013
  • May 2013
  • April 2013
  • March 2013
  • February 2013
  • December 2012
  • November 2012
  • October 2012
  • September 2012
  • August 2012

Search

Subscribe

RSS feed RSS - Posts

The right thing to do, is the right thing to do.

The right thing to do, is the right thing to do.

Dion Almaer

Copyright © 2023 · Log in