Requesting feedback on a new javascript library

32 views
Skip to first unread message

cl...@ratiosoftware.com

unread,
Jan 10, 2013, 11:27:19 AM1/10/13
to js-t...@googlegroups.com
Hi all,

 I'm working on a new js chaining/execution flow library and would like everyone's feedback and suggestions. I just finished the initial core release (0.1), and am starting to work on some planned plugins. The lib and brief overview can be see here: http://chainsjs.org repo is here: https://github.com/claytongulick/chains I have a bunch of tests that illustrate usage as well: https://github.com/claytongulick/chains/blob/master/test/script/tests.core.js 

 The concept is a little different from the current chaining/execution flow libs, and supports some pretty advanced execution patterns (asynchronous looping, conditional branching, nesting chains while maintaining context, etc...).

 I'm working on a set of planned plugins for glsl, threading, dom events, and module loading.

 I'd love to get everyone's suggestions, while the current version works pretty well, it's still very early and not too late to change direction.

Thanks!

Jake Verbaten

unread,
Jan 10, 2013, 4:24:12 PM1/10/13
to js-t...@googlegroups.com
The weird DSL API distracts me from any valuable stuff your module might have.

I recommend you separate useful features from opinionated DSL

John J Barton

unread,
Jan 10, 2013, 4:37:45 PM1/10/13
to js-t...@googlegroups.com
Perhaps you can give us a hint of the API on the intro. I had to ponder the examples to try to deduce what it might be.
HTH,
jjb


On Thu, Jan 10, 2013 at 8:27 AM, <cl...@ratiosoftware.com> wrote:

cl...@ratiosoftware.com

unread,
Jan 11, 2013, 1:12:41 PM1/11/13
to js-t...@googlegroups.com
Good point, thanks. I've had my head into this so I didn't realize how odd it would be for fresh eyes. I'll rework the intro to make it more clear, thanks!

cl...@ratiosoftware.com

unread,
Jan 11, 2013, 1:23:21 PM1/11/13
to js-t...@googlegroups.com
Hi Raynos, thanks for the feedback, but I'm not entirely sure what you mean by DSL, do you mean "domain specific language"?

Are you saying you don't like the method I use for chaining, o_o(...)(...)(...)? The intent was to keep the api as limited as possible.

The expectation is that you can pretty much put whatever kind of function you want into a "link" in the chain, and it will work as you'd expect.

So:

o_o
(
  someFunction
)(
  anotherFunction
)();

Will just work, but in the case of advanced execution models, you can alias anonymous functions and map their flow with a pseudo-orchestration:

o_o
(
 "anAlias",
 function() { ... }
)(
 "anotherAlias",
 function() { ... }
)(
  "finish",
  function() { ... }
)(
 //this is the execution map
 {
   "anAlias":"anotherAlias",
   "anotherAlias":"finish"
 }
)();

Thanks again,
-Clay
Reply all
Reply to author
Forward
0 new messages