7 takeways from the first day of ConFoo

Today it was the first day of ConFoo here in Montreal and, as usual, a conference is always good to wrap your head around solutions, different standpoints and discussions with other nerds :)

Websockets to the rescue

I’ve come to learn about WebSocket quite a while ago but I honestly never found a practical application for our architecture: nonetheless, in one of the talks it was compared to REST in a context where multiple API calls are made, and the idea of re-using the same TCP connection is pretty handy at that point.

For sure, things like SPDY are probably already enough from that point of view, but that’s not a valid excuse for not digging deeper into the WS specification.

Patterns of batch processing

During the same talk, Arun Gupta spoke about JSR 352, a specification for batch processing introduced in Java EE7.

It was really interesting as the specification is quite “obvious” but anyhow efficient, as it structures batch jobs following a few rules:

Dividing batches into jobs of a limited number of items is a golden rule (and I would say your number should be as close to 1 as possible), while the structure that the JSR proposes is very clean.

Xamarin

This tool might be what you were looking for if you’re into mobile development: its aim is to write code once (in C#) that gets converted to native code for both IOS and Android.

If you had to write an app twice, because you needed to go native, you might really wanna have a look at it as, from what I heard, it might really simplify your life.

AppDynamics

My bad for not being aware of AppDynamics, but we’re pretty happy with one of their competitors (NewRelic) :)

AD is an application performance management platform that, just like NR, provides agents for various platforms in order to collect metrics and reports from the stuff that runs on your production servers: definitely worth a look, at least to understand the differences between these guys and NewRelic.

Detach DOM elements while transforming them

Switching to something more browser-oriented, I found out about a very simple but effective tecnique to optimize browser rendering performances when working with DOM elements: instead of applying a bunch of transformations on a visible element you can simply hide it, apply them and then show the element again, so that the browser won’t have to repaint and reflow at every transformation but only when you eventually make the element visible again.

Another way to implement the same tecnique is to clone the element (so that we are actually just working with a virtual DOM node), apply the transformations to that element and then replacing the existing one by calling parent.innerHtml(virtualElement).

Pretty simple but much valuable!

Optimize DOM animations

Another way to optimize browser performance upon rendering is to execute animations on elements with an absolute or fixed position.

Why? Again, because then the browser doesn’t have to reflow the whole DOM.

Lodash

A very handy JS library that seems to be way faster than underscore. It is now considered a superset of underscore and you might want to look into using it from now on, in place of its predecessor.

All in all…

It was a fairly good day and my presentation about OrientDB went pretty well, can’t wait for tomorrow!


In the mood for some more reading?

...or check the archives.