You are viewing the Articles published in

Chuck Norris on Polymer

For the past several months I have been evaluating potential frameworks which could facilitate the implementation of context aware Web Components such that each component can be assembled declaratively into recombinant features and higher-level applications. After a focused period of prototyping each candidate framework, Polymer 1.x has proven to be the most effective approach to satisfy these particular design goals, and many others as well.

While I have also been leveraging Angular 2 for implementing self-contained Web Applications which need not be composed outside the scope of the application’s root component / template, the requirement to provide elements which can be arbitrarily composed within an html document declaratively or imperatively independent of using any one particular framework is one which proves somewhat challenging; yet, can easily be satisfied by leveraging Web Components, and Polymer simplifies the process of doing so considerably.

Polymer 1.x

On a high-level, Polymer provides some much welcomed sugaring over the four Web Component specifications; HTML Templates, Shadow DOM, HTML Imports, and Custom Elements, respectively. The higher level abstraction and API offered by Polymer significantly simplifies the process of Web Component development, while reducing the time and effort required to meet both simple and complex use-cases alike.

Features provided out-of-the-box embrace that which developers have come to expect from a modern library or framework, such as one-way and two-way binding annotations, template helpers, a Local and Light DOM API, declarative and imperative event mappings, declared properties with observers and attribute reflection, and much more.

Add to this the growing Catalog of Elements provided by the Polymer Project, a complete Web Component Testing solution via WCT, optimization features such as Vulcanization with tooling support for Gulp, API Documentation components via Iron Component Page (though still pending ES6 Support) concise documentation with easy to use examples, and developers are afforded a rather elegant solution for building high quality, future facing Web Components, today.

In addition, Polymer comes in three specific layers, each of which builds upon the previous lower-level implementation. This allows for a nice level of flexibility in choosing the most appropriate implementation based on your specific needs. Depending on what is required, one can choose from the mirco-implementation for providing basic custom element sugaring, the mini-implementation for more advanced local DOM and life-cycle hooks, and the standard-implementation which provides the full suite of Polymer features.

Given the capabilities Polymer has to offer, as well as the growing number of organizations using Polymer, and some rather interesting applications being built with Polymer, if you haven’t already, I highly recommend given it a try.

Chuck Norris!

So what does any of this have to do Chuck Norris?

Well, nothing actually.

Except, like Chuck Norris, Polymer is cool – very cool, and so after accidentally coming across the ICNCB service, I thought a simple Web Component which displays some comical facts about Chuck Norris could serve as a useful Polymer example.

And so, if you like to laugh a bit while learning something new, feel free to clone the repo over on Github to get familiar with a few of Polymer’s general capabilities, or simply check out the app here and have a few laughs.

Coming up, Chuck Norris on Angular 2 …

NET::ERR_CERT_INVALID Trick

So here is an utterly ridiculous trick that may actually prove to be quite useful should you ever need it.

With recent Chrome updates, hosts which fail to provide a valid SSL certificate are blocked via a NET::ERR_CERT_INVALID error. This essentially is the result of a secure site failing to provide a valid SSL Certificate in some way. In Chrome, when this occurs, you will see a screen similar to the following:

NET::ERR_CERT_INVALID

Previously one could circumvent this by clicking on a link which would allow you to override the error. However, such links in current builds of Chrome are no longer provided.

Interestingly, the work around for this is simple, bordering the ridiculous. Just focus on the page and type “danger“. The page will then automatically refresh and load as if the certificate was valid from that point on.

Obviously you want to be mindful of this work around (e.g. only using it for known hosts, such as a dev environment, etc., as was the case in my example).

Back from the Peripheral

Hello again…

Indeed, a greeting may be appropriate here as it has been quite some time since I have actively blogged which, for all intents and purposes, has been for good reason.

After a decade of continuous blogging with a minimum of at least one (hopefully) informative article per month, I had made a conscious decision to take a step back, re-evaluate, and, on the peripheral, dedicate my otherwise allocated writing time towards focusing on the many aspects of future Web Development.

With that in mind, my time spent has been put to good use, and so, I’ve decided to begin sharing my experiences here more frequently once again; both trivial and non-trivial alike.

The fact is, I miss writing, and outside of day to day writing of general API docs and the occasional technical spec, I haven’t had a dedicated space to share my more subjective, creative thoughts about modern Web Development. Enough about me, though, I’ll get to the point…

Before I delve into the specific topics I plan to discuss, I think it makes sense to first outline an underlying theme which will permeate throughout my future articles. Specifically, I plan to to focus on topics and technologies which I believe will, to a certain extent, transcend the more immediate trends within the Web Development landscape that tend to come and go with the times. I strongly believe it is essential for our community to continue on a path of sustainable growth, and the path of least resistance will more than likely be in our ability to move from library to library, framework to framework, easily and with minimal transition. This is imperative as the rate at which technologies are changing has grown exponentially in the past few years, perhaps no where more so than in the Web Development space. As such, the ability to identify and focus on core underlying concepts, principles and technologies which will remain relevant for some time to come becomes ever more important.

The simple fact is, we need to pay particular attention to what we dedicate our time to learning, and ensure our learning is focused on key aspects that can carry over as each new technology increases in adoption, and then makes way for the next in line.

With that in mind, I plan to focus this space on my findings and most recent experiences with current Web Development technologies of interest, particularly, but not limited to, the recent work of the TC39 Committee, all things ES2015 / ES2016, React / Redux, Webpack, Web Components, Polymer, Angular 2, and the many other complimentary tools and technologies surrounding modern workflows.

So stay tuned, as always, there’s a lot to talk about! Good things to come …