Previous Entry Share Next Entry
Release 0.10.7 -- the beginnings of the new client
jducoeur wrote in querki_project
I just cut release 0.10.7. From your POV this release looks essentially trivial: the only real change is a bugfix for the Terms of Service, which were interacting poorly with the recently-introduced caching. But it's a huge change from my POV, because it introduces Scala.js to Querki.

Those of you who follow my personal LJ (which is most of you) will have seen previous burbles on this subject; suffice it to say, Scala.js is a Scala-to-Javascript compiler, which lets you write your code in Scala (my language of choice, which the entire server is written in), and compile it so that it runs in the browser. My plan is to replace more or less all Querki pages with a relatively sophisticated client app, written in Scala.js. This won't look so very different to you, but it'll make it easier for me to write really complex and interesting stuff -- in particular, the new Model Designer, which has been on my to-do list for most of a year now, but has been too daunting to tackle in plain Javascript.

Frankly, the techie in me is really enjoying this: you can do pretty wild-and-crazy things using Scala.js. Just as one good example, there is the initial test page (currently the only Scala.js part in place). Feel free to play with this: it doesn't require any login, since it doesn't do anything real.

What's neat about it is that big text box on it: that's a live, interactive QText editor. You can type any QText you want (here's the QText Reference page), and it live-updates, rendering the wikitext as you type. For example, try typing "This is **bold** and *italic*" into the box.

Why is this cool? Because it is using *exactly the same code* as on the server. And mind, this is a massively complex parser involving seven large classes, which I simply moved from the "JVM" side of the code to the "Shared" folder. The folks who maintain the underlying Parser Combinators library (which QText is based on) were good enough to release a Scala.js version of it for me, and *poof*, I can now do live rendering. More importantly, it means that the server can simply send QText to the client and let the client do the rendering, instead of building all the HTML server-side; this is likely to allow us more flexibility in the future, and lets the server run faster. It's just a proof of concept, but it demonstrates that most of the code that I wrote for the server can be used on the client, as needed.

This is also going to benefit the system for all the reasons that Scala is, for complex problems, a much better language than Javascript. It's strongly-typed and compiled, so most errors will be caught quickly and automatically. I'll be able to use the powerful testing tools available to Scala -- indeed, there's a lot of browser-test-automation brewing up quickly around Scala.js, which should make it much easier for me to write proper test suites for the client, tightly integrated with the server. (Which, in turn, should help me break the world less often.) It should even help pages load faster, since most Querki pages will simply be bundles of data being fed into a static client that you load once.

Anyway, expect things to be fairly quiet on the new-features front for a while, as I focus on rewriting the client. Once that is far enough along, I'll begin to do cool things with it, and it should pay off in a better experience for you...


Log in

No account? Create an account