[ZCM] [ZC] 1740/ 2 Reject "Human Readable URL's"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Sun Mar 27 02:07:43 EST 2005


Issue #1740 Update (Reject) "Human Readable URL's"
 Status Rejected, Zope/feature medium
To followup, visit:
  http://www.zope.org/Collectors/Zope/1740

==============================================================
= Reject - Entry #2 by ajung on Mar 27, 2005 2:07 am

 Status: Pending => Rejected

You can already access parameters passed as /path/to/method/arg1/arg2/.... as REQUEST/traverse_subpath.

On the other hand provides all necessary informations and functionalities to deal with your issue. Everything else is pure
application logic and 99% outside the scope of the Zope core.
________________________________________
= Request - Entry #1 by Anonymous User on Mar 26, 2005 8:37 pm

Try to make URL human readable and try to eliminate "?" in URLs. 
Instead of having a URL "/courses/listing?year=2003&sem=win", how about a URL like 
"/courses/listing/year/2003/sem/win" or 
"/courses/listing/2003/win". 

They can be implemented easily as follows: 
* translate handler
  - There is nothing inside "listing" 
  - So call courses.listing("year/2003/sem/win") 
    or courses.listing("2003/win") as the case may be.
* Inside courses.listing code
  - params = ["year","sem"]
  - The constructor parses the input string and 
    checks if it is of the form
    NAME/VALUE/NAME/VALUE... or not. 
  - If so, it interprets it as keyword arguments
  - If not interpret as positional argument (order given in params) 
  - If interpreted as keyword arguments, then order does not matter.
* Our website (based on mod_python/apache) does this and 
  it makes all URLs human readable, and more importantly all URLs
  can be bookmarked for future use.
* For example, if you have a simple search form the result 
  of the search will lead you to the URL
  "/courses/search/year/2003/dept/cs". The user can bookmark this
  URL and everytime he/she visits this URL, you get the 
  latest result of the search.

* Since this is easy to implement, Zope should probably add this feature as well. 
==============================================================



More information about the Zope-Collector-Monitor mailing list