[dojo-contributors] SVG/VML/Canvas API discussion
mail at dylans.org
Tue Apr 18 21:24:37 EDT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Sorry for the long post....
Time for me to step in a bit since I haven't said anything, and I'm an
svg fan boy :)
I prefer to think about the problem from the perspective of, what type
of apps would I want to build with SVG, rather than what APIs do I need.
In general, I believe we want the ability to build application
interfaces with SVG. Currently, these are heavily skewed towards maps,
floorplans/CAD, charts (static and real-time, status indicators,
sliders, data modeling, and drawing tools. But they could also be used
for many other app interfaces that are heavily hacked to get working...
things that currently require lots of background image and markup hacks
to get a decent looking UI that would be easily replaced with SVG.
DOM events seem to be the major drawback with canvas. But the
TabPreview firefox extension has given a lot of people the cool idea of
building a number of new things. For example, imagine being able to
send a screenshot of the page in memory as part of a tech support
request, or when a script error happens (there's a ticket in bugzilla
somewhere to support this).
A major problem with SVG is constraints... without a good constraints
and coordinates API, it's near impossible to build good SVG widgets.
Mostly this is because of SVG's layout model, which is position based,
and not flow-based. We can "cheat" somewhat by relying on nesting
Let's make sure we know what sorts of things people want to build before
we think about how we're going to replicate the language.
Bill Keese wrote:
>> I think probably we should discuss the needs before the API (which is
>> my fault, since I threw out API at first). Any other thoughts on needs
>> and goals?
> Well, something like the chart widget might be satisfied with a
> canvas-like api (like drawRectangle(0,0,50,50,blue); ), but if you get
> into stuff like interactive charts (click on a bar and something
> happens), then you would want something more like the dom api, where you
> can create a node (such as a circle or rectangle) and then set
> properties on it, such as the onclick handler. You might also want to
> delete previously created nodes, or change properties (such as the size)
> of an existing node.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the dojo-contributors