Historically operating system directory-structures have been trees:
- C:
- Windows
- System32
- Program Files
- Common Files
- Internet Explorer
- Windows
And the REST architecture emulates the same thing:
- http://...//Thomas/
- http://...//Thomas/Mexico/Year2003/Photos
- http://...//Thomas/Mexico/Year2007/Photos
- http://...//Thomas/Finland/Year2005/Photos
- http://...//Thomas/Finland/Year2010/Photos
- http://...//Thomas/Finland/Year2010/Videos
- http://...//Thomas/USA/Year2005/Photos
But, looking the current structure, I need to make searches:
- All pictures that are not from Finland?
- All pictures taken in 2005?
- All pictures in timeline?
It is not efficient to do a REST-interface with every tree-hierarchy combinations. You need more efficient information management; you need an attribute-system rather than a tree-structure. (Oh, why the operating systems are not based on attributes?)
StackOverflow and Google seem to use attributes and syntax with "+"-marks like:
Today's frameworks like WCF and ASP.NET MVC have a good support for RESTful tree-structures. But is there support for attribute-structures? Wouldn't you call an attribute-structure still REST?
I would like to make an attribute-WebService and use it with a LINQ in Silverlight-client... Which is the best way to start? :-)