(fab) - A pure javascript DSL for building async web apps
1–10 of 27 posts
Re: (fab) - A pure javascript DSL for building async web apps
#2I just launched a dead-simple web framework on top of node.js. It uses (abuses?) a lot of the dynamic nature of javascript to create a jQuery-inspired DSL that's pure javascript, allowing you to create really concise web apps like this:
( fab )
( "/time", function(){ return "the time is " + (new Date).toTimeString() } )
( "/date", function(){ return "the date is " + (new Date).toDateString() } )
( fab )
I'd love to hear any feedback from the folks here, so check it out and let me know what you think.Re: (fab) - A pure javascript DSL for building async web apps
#3Hey all, I just launched a dead-simple web framework on top of node.js. It uses (abuses?) a lot of the dynamic nature of javascript to create a jQuery-inspired DSL that's pure javascript, allowing you to create really concise web apps like this: ( fab ) ( "/time", function(){ return "the time is " + (new Date).toTimeString() } ) ( "/date", function(){ return "the date is " + (new Date).toDateString() } ) ( fab ) I'd…
I think I can say that this is the best (ab)use of the syntax I've ever seen, well done. :)
Re: (fab) - A pure javascript DSL for building async web apps
#4Hey all, I just launched a dead-simple web framework on top of node.js. It uses (abuses?) a lot of the dynamic nature of javascript to create a jQuery-inspired DSL that's pure javascript, allowing you to create really concise web apps like this: ( fab ) ( "/time", function(){ return "the time is " + (new Date).toTimeString() } ) ( "/date", function(){ return "the date is " + (new Date).toDateString() } ) ( fab ) I'd…
I did a double-take looking at that syntax. I assume that fab (and all of the other bracketed expressions) return functions that chain together? Pretty ingenious. Plus you can detect the end of the chain when one of the methods is passed in "fab" again. I think I can say that this is the best (ab)use of the syntax I've ever seen, well done. :)
Re: (fab) - A pure javascript DSL for building async web apps
#5Hey all, I just launched a dead-simple web framework on top of node.js. It uses (abuses?) a lot of the dynamic nature of javascript to create a jQuery-inspired DSL that's pure javascript, allowing you to create really concise web apps like this: ( fab ) ( "/time", function(){ return "the time is " + (new Date).toTimeString() } ) ( "/date", function(){ return "the date is " + (new Date).toDateString() } ) ( fab ) I'd…
Re: (fab) - A pure javascript DSL for building async web apps
#6Hey all, I just launched a dead-simple web framework on top of node.js. It uses (abuses?) a lot of the dynamic nature of javascript to create a jQuery-inspired DSL that's pure javascript, allowing you to create really concise web apps like this: ( fab ) ( "/time", function(){ return "the time is " + (new Date).toTimeString() } ) ( "/date", function(){ return "the date is " + (new Date).toDateString() } ) ( fab ) I'd…
The syntax looks cute for one-lined request handler functions. I wonder how it stacks up for larger, multi-line functions. Heck, you're pretty close to sexps (I kid!).
Multi-line functions work okay, but it's definitely cleaner to name them and put them somewhere else so that your code ends up looking like a site map:
Re: (fab) - A pure javascript DSL for building async web apps
#7Re: (fab) - A pure javascript DSL for building async web apps
#8Re: (fab) - A pure javascript DSL for building async web apps
#9Re: (fab) - A pure javascript DSL for building async web apps
#10Unfortunate name: The Fabric Python deployment tool uses the fab binary and uses fab files for configuring deployments: http://docs.fabfile.org/