Thoughts on scalable UI in the world of JSX, SASS, React, Styled Components and the likes.

Those of you who read my blogs regularly, already know that I have been coding for the better part of the past decade.

A fair bit of that time has gone into building beautiful and usable UI components for projects built for scale. (e.g. Fab, Hem, Tavisca)

So it was not a surprise for me when I saw that RoR community came up with SASS a preprocessor for CSS which allowed you to dynamically create your style-sheets. Eventually, developers could use functions (mixins, extend, import), variables, nesting and create UI components in a much elegant fashion.

All was well, the UI developers were still writing their styles in a separate file which would compile down to CSS and be included into the HTML as required.

But eventually, with Angular and React, users started writing their styles in the HTML directly. It felt natural to new developers who liked keeping their HTML/JS for a component in a single JSX file. They had no qualms about using CSS in the style attributes of their DOM nodes.

Even though in my opinion (please note the term ‘Opinion’) inline-styles pollute the DOM and get in the way of development.

Also, keeping styles for each component in its own JSX makes it difficult to use the power of SASS and visualize the entire hierarchy that we get by looking at a SASS file (if done properly.)

Enter, styled-components which lets you write CSS as JSON objects and auto assigns a unique class name to every component. It also auto links the class to every instance of the component.

What I dislike about this approach is the fact that we are adding inline-style nodes and the browser has to generate the same class during every execution of the app/page. This does not play well with the fact that browsers can easily create the class, pre-process its properties and cache it for future use across reloads.

What are your takes?

Atlassian’s HipChat user data breached.

This morning I received an e-mail on my HipChat linked account.

According to Atlassian, they have detected an incident that may have resulted in unauthorized access to my user account information which very well includes the username, email address and hashed password.

They go ahead to mention that there is no evidence for other Atlassian products having been breached. They also claim that they did not detect any unauthorized access to financial data.

While Atlassian may have already deleted your password to force a reset, my recommendation is to change your password across other websites if you happen to re-use your password.

I invest with Goalwise. Here is why.

Last week I was discussing with my bunch of close connections about a new investment platform Goalwise. The most common question was what does Goalwise do and how could it help them. (questions like Why Goalwise or Why not a competitor)

In this post I try to explain in brief what Goalwise does and how it does it better than it’s competitors. Continue reading I invest with Goalwise. Here is why.

JavaScript and “First-class functions”.

js-minJavaScript is one of the languages which claim to feature “First Class Functions”. So, what does it mean to be first class function? Let’s explore.

I like to compare it to being a first class citizen. Basically the right to freely move across boundaries in the country without being questioned of your purpose.

In the programming context, being first-class, gives JavaScript functions the ability to be saved in variables, passed around as arguments or even returned from other functions. Taking this a step further, functions can reside inside objects as one of the properties. Continue reading JavaScript and “First-class functions”.

Parse Shutdown – What Next?

In a recent mail the Parse team mentioned January 28th 2017 is when Parse APIs would stop responding.

If your app uses Parse, the best immediate course of action is to host a private instance of the Parse Open Source Server on a Cloud Instance (or Dedicated Instance if you choose). Migrate the data to the new server.

There are simple ways to ensure there is no downtime during this activity. You could follow the migration guide here. I am available on a pro bono basis to help with the migrations.

The real meaning of UX.

UX, short for User eXperience has suddenly come to the forefront of the technology driven startup era.

Everybody is talking about providing the best interface possible to make any user’s journey on their platform as friction-free as possible.

But what exactly does UX comprise of? Is it the improvement of visual appeal, the increase in page load speeds or slick animations? Continue reading The real meaning of UX.