Bespin, Skywriter, Ace and BlueGriffon
By glazou on Friday 16 December 2011, 17:59 - Mozilla - Permalink
Exactly two years ago almost to the day, BlueGriffon started using Bespin for its source editor.
Two years and two name changes later, not only the project has drastically changed from its original codebase but the documentation for the project is still almost non-existent; lack of doc is already painful for a project like mine, a wysiwyg standalone editor, but it's awful for an embeddable project like Ace.
The complexity of the code and its architecture, it's monstruous size, the crazyness of themes in CSS themselves contained in JS and more make my every day's life with Ace more and more difficult every day.
I am pondering switching to another source code editor because of:
- readability of the code; using Require.js all over the place helps the developer, rarely the user. The other embeddable editor I'm currently looking at is incredibly more readable than Ace. When I want to hack Ace, I'm totally lost and I never know if
the code I'm writing will be correctly exposed to the external
world. Even worse, I never know if a given function I was planning
to use is exposed to me or how.
- size of the code; the other embeddable editor I'm currently
looking at is 4 times smaller than Ace... Sorry, but yeah,
size matters.
- theming is too complex for what it's worth in Ace. I want CSS and CSS only, like in any good web page.
- speed - and I agree Ace is fast - is not an excuse. The other
embeddable editor I'm currently looking at has no problem
whatsoever dealing with a 35,000 lines javascript file.
- embedding a grammar inside another one, and html documents can
contain scripts and css while html file can also contain php,
is vital to me. Doing that in Ace is, to say the least, totally
cryptic to me.
- autocompletion should not be complex to add. With Ace, it is complex. A good autocompletion for html or CSS should not be more than roughly 30 lines of very light JavaScript.
I understand this is not a positive message, but I wanted to share my concerns with you if that can help the project. Even if I may stop using it in the very near future, I wish Ace all the best.

Comments
I am not sure which embeddable editor you're looking at, but I hope you will give Orion a try.
http://www.eclipse.org/orion/
In case you hadn't looked at Orion, here are some pointers for someone looking to embed the editor (like Firefox is doing with Scratchpad):
Sample code:
https://github.com/eclipse/orion.cl...
Editor documentation:
http://orionhub.org/jsdoc/symbols/o...
http://orionhub.org/jsdoc/symbols/o...
To explain up the terminology, Orion has two reusable components depending on the level of complexity you want. The Orion "text view" is a raw editor widget with a low level API. The Orion "Editor" is a higher level API that layers on programming constructs like content assist, rulers, search and replace, etc.
I'm intrigued by the problems with RequireJS. I would have thought that using RequireJS in conjunction with DryIce would give you the best of both worlds: a compact stripped out customizable single deliverable for real world use, and a set of separate files for development.
Is the problem primarily that you find the Ace source hard to navigate, and that this is compounded by the RequireJS package system?
@Joe Walker: exactly. Hacking Ace is too complex because of that. Some design choices do help the componentization of the architecture but harm the ability of newcomers to dive fast into the code and start hacking. Readability of the code is low. When I want to add/tweak something in Ace, I am too often completely
lost.
I heard too often from the Ajax people "yes, doc is coming" and a serious doc for embedders is still not here.
All embedders, including myself, rely too strongly on the mailing-list where rather trivial questions that
should find an immediate answer in a doc or wiki are asked every day.
If I take Orion, the doc is much better; if I take CodeMirror, diving into the code and hacking it is just
trivial. Theming both of them is much simpler, adding even complex features to both of them is much simpler.
All in all, it seems to me Orion and CodeMirror really target embedders while Ace target much more its own
use case in Cloud9 and far less third-party embedders.
Again, I know my message can sound pretty negative. Maybe it is. But it is based on real usage in a standalone
product distributed to a _large_ set of users. Maintainance and hacking is hard with Ace.