Thursday, January 25th, 2007
JDA Emulator: Spring for JavaScript
Peter Svensson liked what he saw in MAYA Design Inc.’s JDA implementation, but wanted an open source alternative.
He created a free LGPL implementation of Javascript Dataflow Acrhitecture (JDA) called the JDA Emulator.
What is JDA?
JDA is basically a javascipt microkernel along the same lines as Spring or Hivemind for Java. The wiring of the js components are done in the HTML page, inside div’s (or whatever) with special attributes, that’s all! So yuo don’t need any stinking XML anymore.
- HTML-based black box composition specification
- Javascript black box packaging specification
- An asynchronous message-passing microkernel written in Javascript
- An attempt to promote evolutionary design and to bring about seamless interoperability to the Web
- An attempt to once again give rise to the spirit of tinkerers on the Web!
You can check out the test page.
- <div id="my_button"
- impl="~6B5EAB0E6AD4483e84D3D5EF14C80000"
- properties="name:'Foo'"
- script="Button.js"
- connections=" 'button_out' : [['my_infotron', 'trigger_in']]">
- </div>
- <div id="my_infotron"
- impl="~6B5EAB0E6AD4483e84D3D5EF14C8AEE7"
- properties="greeting:'Hello World'"
- script="Greeter.js">
- </div>
Update from MAYA
After talking to MAYA Design: they do allow use of their upcoming 0.95 implementation of the JDA, even commercially. They are also discussing whether to publish it under some kind of GPL license.





In english please? Can anyone translate in plain terms? Thanks kindly!
test
Matt, what is it that you don’t understand? Please mail me if you want some assistance to start wiring things with JDA.
Cheers,
PS
What Matt (and me) don’t understand is basically everything. It doesn’t say what this does anywhere. It says things like:
An attempt to promote evolutionary design and to bring about seamless interoperability to the Web
Well hey, I’ll tell my boss, he’ll be thrilled. But as a developer I don’t have the faintest idea what it means. Here’s some other examples of this type of language:
enable real-time communities
visualize impactful applications
target real-time convergence
Doesn’t make sense to a lot of people, sorry…
copy that on language use, i guess part of the reason java has so many frameworks is the wonderful use of words.
Instead of an application creating dependencies and managing object lifecycles, a framework like Spring can manage these for you. The poster can probably add what specifically it brings to the table, but I would expect dependency injection at the bare minimum. Basically, theoretically a lot less code to get the job done.
I’m familiar with stuff like this for middleware, but I’m not sure how it will adjust to gui stuff…
More details! :)
Argh! Sorry :) Actually, the best details are in the pdf’s at the site, but for a quick run-up of what DJA does, I’ve posted some clarification on my blog;
http://unclescript.blogspot.com/
But it really does do very little. What little it does makes pages incredibly easy to read, though. It is a standard for wiring together ‘infotrons’. Yes, me neither. Anyway, an infotron is a DOM element with some extra attributes. When you ‘boot’ the JDA “kernel”, it goes through the page and registers all infotrons. An infotron can be defined in a separate .js-file, but it’s more efficient to bunch all definitions together in just one file (obviously). It’s all the same to JDA.
Each infotron declares a number of input and output ‘terminals’. These are then used inside the infotrons when parsing a message (or receiving a startup message from JDA), and when posting something to one of its output terminals.
It sounds horrid and abtuse, but I really, really like it. See the HTML source on some of my examples on the site (I’ve two at the moment and is working on a more complex third);
http://www.mashupstation.com/Wikka/wikka.php?wakka=JdaEmulator
Mail me directly if you have more questions, or comment the blog (or the page)
Cheers,
PS
This is all somewhat humorous. Very soon now someone will notice that inversion of control + dependency injection + autowiring == limited logic programming. Bit by bit the ideas from prolog and other logic programming languages are sneaking into the mainstream.
Infotron == predicate. Input and output terminals == predicate arguments.
I haven’t coded in prolog ever, so I can’t verify what you say. But it’s good that the JDA folks have rediscovered a good thing, then.
psvensson@gmail.com