On Jan 15, 2010, at 7:25 AM, Andy Somogyi wrote:
I think javascript is actually a pretty nice language. It has some
really nice functional features, is resembles Scheme in certain
ways. The only problem I have with javascript is that it is not the
same language as sage (python). If sage were written in Javascript,
then of course it would be natural to write the UI in Javascript.
BTW, A patch was just submitted to WebKit that enables MathML
rendering! This means that a front end could have all the
mathematical typesetting and layout that Mathematica has!
But back to the question, is it better to write the UI in Javascript
which implies that there needs to be a Python <-> Javascript glue
layer (not too big of deal, just develop some glue that does dynamic
binding, or use remote invocation), OR write the UI directly in
Python which implies a bit of WebKit <-> Python glue? The WebKit <->
Python glue is again not too big of a deal, it already exists in
Appcelerator Desktop (Again, Apache license), I'm not sure how
efficient it is as I've never used it. Or, have native bindings to
WebKit (generated via the WebKit idl files).
Personally, I like the single language approach (all Python), makes
things SO MUCH simpler.
Any thoughts?
The advantage of the Python <-> Javascript glue layer is that you can
share more code with the existing notebook. Otherwise, whenever you're
implementing something the notebook already has, that's duplication of
effort (and future maintenance), and when you're implementing
something the notebook doesn't have, it won't benefit remote use. In
the long run, I think that makes using Javascript for the UI a better
option.
Also, you have the advantage that the Javascript code already exists,
rather than starting from scratch. It seems like the biggest drawback
is not the UI itself, but rather that it isn't a "normal" desktop app
with its own window, menu, etc.
- Robert
--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org