Heya guys. Some of you know that i've written a nifty little rpc
doodad over the last few days called Legs (yeah, i'm soooo
creative...). So, here's what i've got to work with:
I can define a class, put public methods in it.
And, I can create an object, and when I call a method on that object,
it marshals it all up in a warm gooey JSON wrapping and flies off
through the internet to the server, which also has a class with a
bunch of methods in it, calls the method, the response comes back down
the wire.. Super duper magical nifty rpc thingo makes it like i'm
calling an instance of the class on the server, but remotely. I can
also do Notification calls which require no response, and asynchronous
ajax style calls that pass the response off to a block when it gets
back.
And the app I want to build (in time for shoes day, no less) is a
simple replication of IRC, so sure, I can make some requests, get a
list of available channels, join, part channels... but then what? How
do I make this class that exists outside of the scope of the
Shoes.app, to update shoes when events happen? Should I try to build
some kind of a thing where the Legs class thingo tries to maintain an
object representing the server state and then the Shoes UI somehow
subscribes to the object and completely refreshes itself when the
object changes? Could I do that with Observable from the standard
library? does it have any ability to automatically make stuff like
hashes observable or would I need to reinvent the hash, the array, the
string, all to have observable functionality to make that work?
Gosh it'd be nice if Shoes could somehow one day do Flex-style
bindings and automatically work with stuff like this.