I have been procrastinating about this post for almost a month. Over that period, I have tinkered around with NoFlo and Angular.js. Earlier, I was creating components for Node-red at my workplace. However, as it is more inclined towards the Internet of Things, whereas NoFlo is more oriented towards Web applications, we started some work on NoFlo.

NoFlo is exponentially harder to use than Node-red. It is divided into so many components, that it gets really confusing to someone who has never worked on it. Moreover, as components are developed in CoffeeScript, I had to actually learn the language before starting my work.

CoffeeScript makes a lot of stuff easier by exposing the parts of JavaScript, while trying to take out the bad. I really liked some of the syntactic sugar in CoffeeScript. However scoping is a major major problem in CoffeeScript, something which it actually tries to address. If you are not careful with the scope, major errors will creep in, which can cause nightmares.

Comparing NoFlo to Node-red wasn’t really easy. I really liked both the frameworks, but there are some things which stood out for both the frameworks:

1.) The NoFlo developers are super accessible. I used to get in touch with them on IRC, and they were interested in what we were trying to do. They gave suggestions, pointed us to the right stuff so we could solve our problems. In one particular instance, when my component was not working, they even submitted a pull request to fix our code. Now that was really impressive.

2.) Complexity wise, Node-red takes the cake. Not only do you write code in plain old JavaScript (and jQuery), it is much easier to get someone up and running. NoFlo has it’s own architecture, components, and even a Domain Specific Language to write your graphs (though not terribly complex, it will put off many people). The flow editor of Node-red is pretty easy to use as well, whereas NoFlo’s editor (FlowHub) is not that straightforward to understand. It took me a long time to get comfortable with the FlowHub editor.

Overall, it was fun learning about Flow Based Programming, and getting to use these frameworks.

My next task involved learning Angular.js for an IDE we are developing at the university. I took some online tutorials and read some books to get comfortable with the architecture and nitty gritties of an Angular app. I was pretty impressed with the framework, as it makes a lot of stuff simple. Previously I used jQuery a lot and most of the times I used to do a lot of hacky DOM manipulations to get my work done. Angular gives a lot of structure to the code if designed properly and makes it more readable, maintainable, and testable. I experimented with writing unit tests and E2E tests using an array of tools like Karma, Jasmine and Protractor. This was my first experience with writing unit tests and I plan to write them in my future work as well.

Overall, this last month has been great for learning. I have settled well into grad school and I am learning stuff every day. A great experience so far. Until next time 😉

Advertisements