Monday 11 June 2012

Web based code editors

Looking for a nice web based code edit component. I wanted XQuery and  Sparql  in addition to the usual suspects. The choice seems to be between Codemirror and Ace.

Codemirror supports both Sparql and XQuery out of the box.

Ace has very nice XQuery support initially developed for the eXide feature of eXist by Wolfgang Meier and then enhanced, and pushed back to the main  Ace project, by William Candillon. Ace currently has no official Sparql mode, but I spotted Callimachus  has the code  for a slightly earlier Ace release.

For me the deciding factor is that ACE is built with  AMD support, whereas Codemirror is not. There is a project to convert/wrap Codemirror for use with Dojo, which means using AMD,  but it looks like a lot of work.
Related projects to watch:   Treehugger and Dojo Widget for Ace

4 comments:

  1. The XQuery highlighting in ace is getting more and more fancy. You can check it out at http://ow.ly/bgtYP

    ReplyDelete
    Replies
    1. Are you sure that is valid Xquery, it looks a little perverse to me :-) Are you working on a code folding option?

      Delete
  2. Curious why you want a web based code editor.
    Are you not worried about the internet or the site going down right when you hit the last "}"

    ReplyDelete
  3. No, not too worried. My code is always better for a forced rewrite. But I do think a web based IDE, which might be running on localhost will lead to lots of interesting possibilities.
    https://github.com/ajaxorg/cloud9

    ReplyDelete