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.
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.
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.
- Behaviour of variables
- Semicolon injection
- Function scopes
- Variable / function hoisting
- Parameter passing
- Reference errors
- Lambda nature
- Closure and static scoping
- Module pattern
- Prototypical inference
- Move state out of DOM (Because DOM isn’t that great performance-wise – and it’s global)
- Know the core tenets of structure, behaviour, logic: the key components of any JS program. Keep the code for these separate and easily distinguishable.
- Don’t build large apps. Build small components and let them communicate with each other: this makes large apps manageable.
- 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.
“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.”
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.