Posted on December 3, 2014

Progress with the Ember reimplementation is painfully slow. The results are nice when I get there, but it’s taking me a long time. (Partly this is because Real Life is so hectic, and I’m not getting much time to spend on the project. Largely it’s because I am far from grokking Ember.)

I also may have chosen the wrong place to start, since the conf pages have the most complicated interactions with the database. (On the positive side, the REST APIs for the AJAX calls on the Yesod side have been really, really simple.)

I’ve got as far as the addresses page. The complication here is that the list of possible mailboxes to which an address can deliver is also fetched with AJAX. This works fine, but the binding to the select box is failing. My theory is that Ember sets up the binding before the data has arrived; finds that the existing mailbox values don’t appear anywhere in the (empty) list, so sets that end of the binding to null, and then it all goes pear-shaped.

So my current plan of attack is to find some way to make sure that the mailbox list is fetched before the page is rendered. I expect I’ll get there eventually.

It has crossed my mind to wonder if Ember is just a complete mistake. Of course, it takes time to get to grips with any new framework; think how slowly my early Yesod projects progressed! And I’m hardly an expert at Javascript, nor the style of OO that Ember espouses. Still, it all seems a long way from what the flare project is supposed to be, and it ain’t much fun.

Should I look at fay or GHCJS instead? Michael Snoyman posted about them recently…