Thursday, January 25th, 2007

JDA Emulator: Spring for JavaScript

Category: JavaScript, Library

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.

  1. <div id="my_button"
  2.     impl="~6B5EAB0E6AD4483e84D3D5EF14C80000"
  3.     properties="name:'Foo'"
  4.     script="Button.js"
  5.     connections=" 'button_out' : [['my_infotron', 'trigger_in']]">
  6. </div>
  8. <div id="my_infotron"
  9.     impl="~6B5EAB0E6AD4483e84D3D5EF14C8AEE7"
  10.     properties="greeting:'Hello World'"
  11.     script="Greeter.js">
  12. </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.

Posted by Dion Almaer at 9:22 am

3.5 rating from 25 votes


Comments feed TrackBack URI

In english please? Can anyone translate in plain terms? Thanks kindly!

Comment by Matt — January 25, 2007


Comment by hoapham — January 26, 2007

Matt, what is it that you don’t understand? Please mail me if you want some assistance to start wiring things with JDA.


Comment by Peter Svensson — January 26, 2007

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…

Comment by Mike — January 27, 2007

copy that on language use, i guess part of the reason java has so many frameworks is the wonderful use of words.

Comment by nm — January 28, 2007

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! :)

Comment by Ivan — January 28, 2007

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;

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);

Mail me directly if you have more questions, or comment the blog (or the page)


Comment by Peter Svensson — January 29, 2007

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.

Comment by Jeff — March 1, 2007

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.

Comment by Peter Svensson — March 2, 2007

Leave a comment

You must be logged in to post a comment.