Friday, August 22, 2008

Textual Input / Graphical Output - the best of both worlds?

Textual vs. Graphical representation was a recurring theme at this years Code Generation Conference. Thankfully, we seem to have moved beyond the “models are graphical, code is textual” misconception. The discussions were more focused on the relative strengths and weaknesses of each.

Arno Hasse and Sven Efftinge categorised it really nicely: graphics are best for visualisation, text is best for editing. There's been some work to integrate the two; for example, it's now possible in Eclipse to generate both graphical and textual editors that act on the same underlying model simultaneously. Marcus Volter has also demonstrated generating graphical visualisations automatically from models using a couple of auto-generation tools (graphviz and prefuse).

Outside of software development tools, this is nothing new: Autocad has for years allowed designers to create drawings with textual commands. Whilst users can draw directly on the canvas, they can also use a textual dsl enter commands - such as lineto(20,100) - with the results rendered graphically.

It would be good to think software tooling will catch on to these possibilities - and it looks like Openarchitectureware may be in the vanguard.

WebDSL and the missing abstractions

“drinking from the firehose” must be on everyone's buzzword bingo all-time greats list. Nevertheless, it's a very apt description of how I felt in Eelco Visser's talk on WebDSL during the code generation 2008 conference.

The core subject matter has been occupying my thoughts in the last few months; there are myriad lightweight web frameworks around now, all of which offer easy definition of the core domain objects and most of which will generate a standard CRUD GUI. All good stuff. But move beyond the auto-generated GUI into something custom and you're on your own. It's down to hacking some form of web template language (JSP/RHTML/Django templates/...) and patching up the link to the domain model through controllers.

I'd been thinking there must be a better, higher level set of abstractions for describing the UI – which could in turn be mapped onto the underlying technology. WebDSL addresses exactly that problem. At least I think it does. There was so much good stuff in Eelco's talk that I couldn't take it all in. I'll need to dig deeper – but right now it looks promising.