CMB JS: The Third

Team ReadMe
7 Min Read

Walking into the new WSO2 office for the first time is a lot like walking into a small oasis of awesomeness. It’s the polar opposite of the cramped and nondescript cubicle-spaces that make up the usual Sri Lankan office. There’s a large, open atrium. There’s cushy seats. There’s a giant fish tank. There’s a table tennis table.

But *cough* what we were really there for was the Third Colombo JS meetup. The JS meetups, for the uninitiated, are where Javascript developers, students and hobbyists meet to talk code, share tips and generally get their collective geek on. We counted around eighty devs taking their seats: some students, a smattering of 99X T-shirts, a few WSO2-ers in “21 / 12 /2012: The world didn’t end” T-shirts.

This JS meetup kicked  off with Pasindu De Silva and Chathu Vishwajith explaining what the JS meetup was. Over half of the audience turned out to be newcomers to JS meets: once the loosely informal nature of the meetup was explained, it was time to begin.

JS-meetup-3rd-01

Hasith Yaggahavita of 99x Technology took the mic. “I welcome you to the JS meetup – and you can also welcome me, because it’s my first day here,” began this veteran developer, modestly explaining how at first he had misgivings about speaking here, as he had been under the impression that people would already know what he had to teach them.

That was a far cry from the truth. Hasith is the author of Boilerplate.JS, arguably one of the first large scale Javascript development frameworks in history: first released in 2010, it still sees active use in thousands of Jasvascript apps each month.

JS-meetup-3rd-02

Hasith’s speech – “SPA (Single Page Architectures) – started off as an MCQ-based run-down of some basic Javascript concepts (if it helps, most of us failed the questions). He then proceeded to outline his list of what every JS coder should know – in his words, “I wouldn’t let you touch any Javascript if you don’t know these”, explaining how inadequate knowledge of each might lead to disaster in an industry/team environment. For convenience, we’ll repeat his list here:

  • Behaviour of variables
  • Semicolon injection
  • Function scopes
  • Variable / function hoisting
  • Parameter passing
  • Operators
  • Reference errors
  • Lambda nature
  • Closure and static scoping
  • Module pattern
  • Prototypical inference

He then proceeded to outline Javascript’s critical Dom API, on which Jquery is based, and how both the DOM and the Jquery way of doing things is bad. That done, the stage was set for his topic: the principles of SPA programming.

  1. Move state out of DOM (Because DOM isn’t that great performance-wise – and it’s global)
  2. Know the core tenets of structure, behaviour, logic: the key components of any JS program. Keep the code for these separate and easily distinguishable.
  3. Don’t build large apps. Build small components and let them communicate with each other: this makes large apps manageable.
  4. Use URL to capture the state of your app: this makes data and states sharable by people.

Having spent almost all his time on a thorough run-through of the basics, he had little time to spend on this part. In any case, it seemed self-explanatory after his walkthrough. Of course, there were a few questions asked – not as many as hoped for, but enough to tease out some interesting answers.

Nadeesha Cabral (@nadzmc) of WSO2 came next, clutching a Macbook and bursting with a great deal of enthusiasm. Nadeesha started off explaining how MV / MVC / MVVM / MVM worked, and the problems inherent to all the frameworks that fall under this bundle. Just when we were wondering if this was a critique or a pitholes lesson, Nadeesha pulled out React.js: a library introduced by Facebook and Instragram to  build user interfaces.

JS-meetup-3rd-03

“And that’s all it does: nothing more. But get this: this is how it works,” he said, gesturing at the screen, explaining how React works with the DOM in a completely different way to what we’ve seen so far – doing it faster while making things easier on the user. “Unlike before, you don’t have to specify how a thing should happen. Like this, you simply say what should happen and React will figure out the most efficient way of doing it.”

Now, unlike Hasith’s concepts, this is way into the geekspeak of Javascript – but Nadeesha’s speech served to stoke up a fair amount of interest in React. He also mentioned how javascript had just changed for the better: the hitherto feared, un-testable html DOM API is now apparently available as a javascript file, opening up a whole new range of performance and critical codetesting capabilities. It seems Nadeesha’s got some interesting projects of his own on the back burner: we’ll be looking at some of them on Readme pretty soon.

JS-meetup-3rd-04

The last item for the day was Jaggery.js, a heavy coding example that the techheads in the crowd absorbed. We didn’t: we wandered around the place snapping pictures and chatting up people. And gobbling up eclairs while we were at it. Somewhere along the line we met Janith Leanage (yes, from Yamu.lk) and a few others making a beeline for the Sprite.

Colombo certainly has an interesting Javscript scene. Here’s to CMB JS.

Share This Article
Leave a comment

Leave a Reply

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

GIPHY App Key not set. Please check settings