[Seaside] Graphing in Javascript

Lukas Renggli renggli at gmail.com
Fri Dec 16 15:56:52 CET 2005


On 12/16/05, Philippe Marschall <philippe.marschall at gmail.com> wrote:
> 2005/12/16, Lukas Renggli <renggli at gmail.com>:
> > In my opinion it would be more portable
> Portable to other browsers, yes. Portable to other Smalltalks no.

Buhhh, I don't know about compatiblity, but the Form class is there
for about 30 years, in Squeak, VisualWorks and probably many other
dialects. A JavaScript solution, that does not work reliably on all
browsers is useless, most of our customers still use IE.

> > (and probably also much faster),
> On the client side yes, or until at least the drawing speed gets much
> accelerated which seems to be something on the todo list of most
> browser vendors.
> But not on the server side.

Caching.

> > to port the JavaScript (it is not even that much code) to
> > Squeak. This would give us a nice graphing library with a native
> > object-framework. I think we already have most of the
> > graphic-primitives and could easily draw similar graphics to forms ...
> I'm not sure about antialiasing but yes if someone does it should not
> be rather simple.
>
> An other advantage is that you can save images generated on the server
> simpler than canvas content.

Maybe there is a reliable JavaScript engine supporting the Canvas API
that could be interfaced from Squeak to draw the graphs on the server?
That would avoid the porting from JavaScript ;-)

> A general issue that pops up again is javascript generation.
> Scriptaculous generates javascipt, liveupdate does it, and right now
> seachart does it too. I don't know for the other cases but my
> javascript generation code is not very nice. The problem is there is
> no general way in seaside to generate javasciprt besides the
> serialization of basic objects like numbers, strings, and collections.

I once saw a demo of a JavaScript parser/visitor that worked on the
Smalltalk AST, I don't know if that would be useful?

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch


More information about the Seaside mailing list