Wednesday, August 16, 2017

This ain't your mama's JavaScript...

This ain't your mama's JavaScript...  Working on the irrigation supervisor software has me doing some JavaScript development again.  It's been a few years since the last time I tried doing anything non-trivial in the web browser environment, so I've been being careful in my assumptions.  It's a darned good thing I'm doing so, because JavaScript has changed so much I can hardly recognize it.  It's all good, too!

I could list lots of changes that I've noticed, but I can convey the flavor of it with a single example.  I wanted to do a SHA-256 digest (of a password) in the browser.  In the past, I'd do a web search for someone's library, download it, and incorporate it in my project.  This time when I did the web search, I discovered the Web Cryptography API, which I'd never even heard of before.  It's supported in every browser I can ever imagine being concerned with, it's open source, and it's been reviewed.  As just one of its bazillion capabilities, it has a digest function that supports SHA-256.  Awesome!

Taken as a whole, the new stuff that's widely supported looks a awful lot like the kind of rich library environment I'm used to in Java programming.  Furthermore, the browsers have moved far closer to a universal standard than they were even just a few years ago.  These changes make JavaScript a vastly more pleasant programming environment that I am quite enjoying...

No comments:

Post a Comment