Loading ...
Sorry, an error occurred while loading the content.

5036RE: [rest-discuss] The role of queries in REST?

Expand Messages
  • Roger L. Costello
    May 10, 2005
    • 0 Attachment
      Hi Folks,
       
      Many thanks for your replies.  I am still assimilating your comments.
       
      A question arose in my mind as I read the comments from Mike and Jan:
       
      To what level should the "rules for constructing resource identifiers" be hidden from clients?
       
      Allow me to elaborate upon this question.
       
      Consider these fundamental REST tenets:
       
      1. A Web site is comprised of resources.
       
      2. Each resource has an identifier, i.e., a URL
       
      3. A client uses an identifier to retrieve a resource. 
       
      3.1 Corollary: if a client doesn't have the identifier then he can't get the resource.
       
      4. "A form is a way to generate a resource identifier based on user input." [Mike]
       
      Jan spoke about the importance of ensuring that clients are decoupled from a Web site.  [Paraphrasing] If a client uses information about how a Web site structures its resources (i.e., the Web site's domain model) then the client is coupling itself to the Web site - if the Web site reorganizes its resources then the client's applications will break.  [Jan, have I summarized your argument correctly?]
       
      Isn't there a paradox here?  On the one hand, identifiers to resources must be made available, else clients can't access the resources.  On the other hand too much knowledge of resource identifiers leads to coupling.
       
      In my original message I proposed that a Web site make visible to clients this hierarchical model of resources:
       
      Mission
          Plan1
               ...
          Plan2
              Aircraft
                  AA36
                      ...
                  BB06
                      Payload
                          Bomb1
                              ...
                          Bomb2
                              Fuze5
       
      My intent is that clients can utilize this hierarchical model to construct resource identifiers - a client can retrieve any resource in this hierarchy by simply creating an XPath expression to the desired resource.  For example, to retrieve BB06 in Plan2 the client would construct this identifier:
       
       
      Has this Web site exposed too much of its model?  Have I exposed too much of the rules for constructing resource identifiers?  Will clients become dangerously coupled? 
       
      To what level should the rules for constructing identifiers be exposed by a Web site?  To what level should they be hidden?  Is it the purpose of forms to shield clients from the rules for constructing identifiers?  /Roger
    • Show all 20 messages in this topic