by noblethrasher · 14y ago · 0 comments
In fact, REST specifically lets systems grow organically since each object never assumes knowledge about either state or state transitions, all knowledge is contingent and empirically discovered.
Okay. I'll let Alan Kay argue the exact same point then.
http://video.google.com/videoplay?docid=-2950949730059754521
The whole video is worth watching but the relevant part starts at 43:00. This video was made three years before Fielding submitted his dissertation.
(note: this isn't an appeal to authority fallacy since he's making an actual argument.)
But now that I think about it, I realize why people have a hard time understanding REST. It's not a "design" constraint any more than OOP is. It's an implementation constraint. In the case of OOP I think people confuse those notions because they conflate designing a system with designing class heirarches. But OOP doesn't have anything to do with classes. A system is object oriented when the state is private, objects communicate by passing messages and methods are late-bound. Similarly, you don't really design a system to be RESTful, you simply commit to the idea that you never know — a priori — what methods will be available on a resource. You determine them by asking the object and those methods are only valid as long as the cache-control header says they are. Just about everything else follows from that.
> the point is that the network imposes limitations and you often need a domain-specific design to get around them
That's why REST emphasizes caching, stateless communication, the appropriate use of status codes, and the appropriate use of VERBs (idempotent vs non).
> for example, HTTP is awful for soft real-time applications.
I wouldn't write an OS kernel in Ruby either.
[1] The Smalltalk variety of OOP which is about encapsulation, message passing, and extreme late binding.