Finding the good one: mithril

I have just read this insightful statement on this blog article about congitive load in Javascript

jQuery is undoubtedly useful when dealing with browser quirks, but once an application grows over a few thousand lines of code, unstructured jQuery code simply becomes too difficult to maintain, and you start needing the discipline of a framework to organize code. But when you’re at tens of thousands of lines of code, you start to run out of entity types to CRUD, and your application growth starts to build on top of existing concepts. This is when you need the mental shift from being a library consumer to being a reusable component author,

This clever guy is the creator of Mithril, a very small, well crafted javascript library a friend of mine pointed to (via github…):

Mithril is a client-side MVC framework – a tool to organize code in a way that is easy to think about and to maintain.

From my huble point of view Mithril is a all-javascript library, focused on MVC and minimal AJAX. In Mithril even the html part is built in Javascript. It seems a bad route, but I must admit it rocks a lot when you give it a try.

The second generation (jQuery) and third generation javascript library (ReactJS, AngularJS, knockout, etc) all suffers from a big dichotomy between the html template and the event code. It seems all clear on small use cases. Some library also “compile” templates. Sometime I think: “wait a moment, I am fighting with the GUI, or the GUI is part of my code?”.

It easy to think jQuery is unusable when your interface grows: you need some MVC system. So you pass to AngularJS. But The concept below angular a lot, and the reward seems always a bit less. I have no time and re-learning angular or KnockoutJS every time is a big deal.

Mithril is very easy to remember: a recursive, solid, functional-filter based approach.

I cannot stop to suggest you to give it a try.

Tool Command Language: il papa’ di Java

E’ notizia fresca di stampa il rilascio di Tcl 8.6, che introduce parecchie novità a dispetto del fatto che sia una “minor” release.


In particolatre Tcl 8.6 introduce un motore “stackless”, integra nel linguaggio le estensioni OOP, ed aggiunge le coroutine.

Parliamo quindi diffusamente di Tcl, un linuaggio che ho sempre trascurato perché mi sembrava macchinoso e un po’ brutto/fatto  male…ma mi sono dovuto ricredere.

Continue reading “Tool Command Language: il papa’ di Java”

JavaScript Wars: Xtend

And so Java, the old old King is still alive.

After Scala, Clojure, NodeJS, and Dart, a new hero is knocking to its castle: Eclipse Xtend

Will he succeed? Hard to Say, but Xtend is very similar to CoffeScript: Xtend simplifies writing Java code, but it doesn’t aim take the grab the crown with a night ambush to the King’s IDE.

At the moment Xtend do not spot a strong IDE, but its simplicity could give it a plus.  Xtend gives us less stuff then Scala, and mimics a lot C# feature like extension method and lambda function. But it is still a baby in a world of fighters, so keep an eye on it but do not write too much code with it, for the meantime…

The Javascript world bring to us a deadly news: the planet Flex has been attacked by the Html5 rebels. Adobe seems to retire from the Flex development, and also flash mobile has having a bad day (try to find it on moder android devices!).

And if Flex&Flash are dying, Silverlight is even less lucky!…he is riding in the black forest, during a bad storm.

So it is hard to say what the fucture deserve us…but grab another table, because the last royal feast will be full of new programming languages!



Dart Sith move first

This entry is part 17 of 19 in the series Programming Languages

So Dart Sith has just launched his first DeathStar, my young JavaScript fellow: a site devoted to the Dart language

Because I am a very old Jedi (1974, before ever the first WtartWars trilogy showdown)  I had to rest a bit before talking about it, so the news is 4-days old I know. I needed to think, reflect and write down: but now I am ready, Read on…

Continue reading “Dart Sith move first”