Hey Brit
Its really funny you should mention this - I actually just started
playing around with making Sammy server side this weekend. I didnt
really get anywhere (besides just some simple tests) but I'm really
excited by the idea. I checked out Jack and it seemed pretty neat (and
there seems to be a bunch of projects around it) but I was more drawn
to the Node project:
http://tinyclouds.org/node/
Whats cool about node is
- its C and V8 based (instead of Java/Rhino) which means its a little
easier to install and get up and running quickly
- its extreeeeemly fast.
- its really a different model of request handling which seems more
apt for JS. Instead of being rack like, its truly evented. The
potential of having long running requests that 'push' events back to a
client side sammy app is really intriguing to me.
That said, I havent really gauged how much work it would be to port
Sammy. I would love some help/feedback and if you want to give a stab
at implementing it on Jack/Narwhal I'm happy to help however I can.
Something I was thinking about was instead of creating an entirely
different framework, maybe giving the ability to 'mount' sammy apps in
different environments, something like
var app = function() {
get('/', function() { ... })
....
}
// client side
$.sammy(app).run()
// server side
sammy.node(app)
// or
sammy.jack(app)
The basic idea being, that there could be a basic top level spec of
what methods a sammy implementation would need to have/implement. I
dont know If I like the idea of an 'abstract' class. I'm sure theres a
bunch of code that could be shared by all of them, though obviously
relying on the DOM isnt possible on the server.
I'd love to brainstorm about this more, lets keep this thread going.
--AQ
Aaron Quint
http://www.quirkey.com