Tuesday, November 20, 2012

Xtext in the web

Based on Orion & Xtext we are now able to provide rich-featured DSL editors for the browser. The editors not only support the basic features known from Orion's JavaScript editor but also come with some additional goodies :
  •     Lexical and semantic highlighting
  •     ContentAssist
  •     Hover
  •     Formatting
  •     Organize Imports
  •     Validation

We were even able to integrate fun stuff, like compiling & executing Xtend code on the fly. I've recorded a screencast to show off what's already working.
Please contact us if you are interested in this.



Sponsored by

7 comments:

  1. Hey Holger, this looks great :) I am curious: Which component does the heavy lifting? Did you somehow migrate Xtext's core to JS or do you need a Java-based backend the editor constantly talks to? Is the state of the editor then completely mirrored to this instance? How well does this scale if you want to deploy this editor to a number of users (e.g. do you need one Java process per editor)?

    ReplyDelete
  2. Hi Heiko,
    thanks.
    The major work is done on a Java-based backend. The backend does not hold a state yet. Every call to the server needs one Java process BUT in some cases there is a need for the UI stuff (e.g. images) and this will cause delays when many clients are working on it. Because of the fact that all things are done async on the client it should scale but I am afraid that in the current state of the prototype this is only true for a small group of clients. For some features like lexical highlighting a user is not willing to wait for. For thsi reason it should be handled on client BUT then the edtitor would not be generic any more.

    ReplyDelete
  3. This is very interesting. Is there a way to get hold of the software?

    ReplyDelete
  4. Hi Holger,

    this is just great! I would like to use it to manage our server/cloud configuration management. It is hard to explain to an administrator to download Eclipse/XText and then push changes to a git repository. With a web-based editor like you show, I could build admin tooling like I always wanted to.

    Is there any progress on this project? Will you share your work at some point?

    Thank you!

    Cheers
    André

    ReplyDelete
  5. Holger, I'm the ex-Eclipse 4 Dev lead and I've recently moved on to the Orion team where I'm currently enhancing the tooling support for the Orion editor, adding mechanisms for 'quick fixes' and rich hover support (and whatever else we can identify). I'd be very interested in opening a conversation on how we can use this to augment your XText implementation...I'm 'emoffatt@ca.ibm.com'.

    ReplyDelete
  6. Based on Holger's prototype, a web integration for Xtext is now being developed and will be available with the 2.9 release. See http://spoenemann.blogspot.de/2015/05/editing-dsls-in-web-browser.html

    ReplyDelete