Of course the Brits think there's a link between finger length and heart attacks, too.
Thursday, February 17, 2005
Thursday, February 10, 2005
I’ve been playing around with Rails. So far, I really enjoy it. I was able to throw together a build tool for work in one evening. Which is really impressive considering what all it does. Oh, and I developed it on my Mac, dropped it on my PC server and it just worked! Take that Java.
I’ve been using the XMLHttp stuff for a couple of years at work (long before Google made it popular :-P). But I’ve never really looked at JSON until recently. It seems like a really nice format for use with “rich” web applications. It should be faster than XML and a lot easier to handle.
RailsConnector class just calls a Rail Action and returns the results.
JsonConnector acts the same, but evaluates the results as JSON. There is also support for asynchronous calls. They’re working great on Safari and Firefox, I haven’t tested on Internet Explorer.
JsonConnector(controller, action[, callback]) RailsConnector(controller, action[, callback])
callback is optional, if you pass it a function the
Connector will execute asynchronously.
.add(key, value) .get(key) .remove(key) .clear() .execute()
Both classes have the same method signatures. The
.add() .get() .remove() and
.clear() methods are used for setting parameters to send to the Rails action.
I’ll probably post some examples pretty soon.