diagrams

Open jACOB Draw2D

Andreas Herz has added diagramming features (connectors, ports, tool selection) on top of Walter Zorn's famous DHTML graphics library to create Open jACOB Draw2D. There are several interactive demos that let you create simple diagrams. There is also javadoc style documentation (though it mostly documents the class hierarchy).

I think a discussion of the underlying wz_jsgraphics library (which Depicter.com currently also uses) is in order. First of all, the good: this approach works in all Javascript-enabled browsers (in particular, Flash is not needed). But wz_jsgraphics is rather inflexible: it's merely a compiler for a few graphics primitives (lines, filled rectangles and XY-alligned ellipses) to an "assembly" language consisting of stacked DIVs. Because the library doesn't keep track of the DIVs associated with each primitive, there's no way to undo a shape (short of clearing the entire drawpad). wz_jsgraphics can also be slow (anything but rectangles and horizontal / vertical lines requiring large number of DIVs). However, these shortcomings aren't fatal for a diagramming application.

Open jACOB is supposed to be a bigger framework, including a server-side part, though at the moment there isn't much to see besides Draw2D. Overall, this is a promising start; hopefully this project will stay active and yield (further) useful results.

mxGraph diagramming library released

JGraph Ltd. has released mxGraph, a cross-browser javascript-based diagramming library (so, no Flash is required). The demo looks impressive, though the cross-browser part does not include Opera (and don't draw anything you actually need, because you won't be able to save or export).

Another sticking point is the licensing. You need to contact JGraph to obtain a copy of the Javascript source (simply downloading the files used by the online demo does not give you a license). While non-commercial licenses are free, a commercial license will run you into the thousands of dollars, depending on the number of end-users.

As far as technology, a quick look in mxClient.js reveals that mxGraph seems to use either SVG or (for Internet Explorer) VML:

isBrowserSupported:function(){
return mxClient.IS_VML||mxClient.IS_SVG;
}

This begs the question of why mxGraph does not work with Opera, which supports SVG just fine.

Overall, I think that, while mxGraph might be a fine bit of work, it suffers in terms of cross-browser support and licensing restrictions. You may want to hold your breath before basing your project on this library. It's possible that something more convenient will come out (or that mxGraph itself will address its shortcomings).

Subscribe to RSS - diagrams