Week 92
21 July 2014A really strong week on Lewesdon/Swarmize, moving closer to a final UI.
That meant a couple of days of staring at markup, Javascript, and the MDN pages for HTML5 drag/drop. I’m building a UI to help editors design a form, dragging fields into it. Drag and drop feels like a sensible paradigm for this, and because I’m building an internal alpha, I’m going to stick to the HTML5 APIs.
We’re building an early alpha, but there’s still a minimum standard of usability to meet, so I spent quite a while working on reducing flickering elements – a bug that emerges because of how drag events propagate through the browser, which makes entire sense if you’re a DOM model, but not much sense to how humans perceive visual elements. Still, some careful work removed almost all the issues here, with a few to solve next week.
I also investigated using Facebook’s React JS to handle the events from the UI and template the form. I was quietly impressed with React: I like that it only really cares about templates and front-end, rather than insisting you build a front-end MVC structure (as Angular or Backbone do).
I stared a lot, but in the end couldn’t see how to apply React to my particular interactions, so I sat down with jQuery, Underscore, and some Underscore templates, and wrote some plain old event-handling Javascript. This turned out to be enough – and quick enough – to get to a satisfying user experience.
I finished up the week building the back-end to store the specification for the form, and then the straightforward server-side templates to generate the form that can be embedded in a web page. I also added a splash of Verify to add some client-side validation. There’ll still be server-side validation, of course, but it feels sensible to maximise the chances of a user submitting useful data to us.
And, finally, I re-used the code from last week to deploy the whole shebang to Elastic Beanstalk and RDS in the final hours of Friday’s working day. I don’t normally deploy on Fridays, but there was no harm done if I didn’t get it done that day, and if I did, it’d be a satisfying conclusion to a busy week.
By the end of the week, UI I’d sketched up as aspirational a few weeks earlier was coming together in its earliest form, and some quick demos at the Guardian got really strong feedback.
So that was a good week on Abberley, and sets up next week nicely.