[Zope-CMF] Re: Method Aliases

Dieter Maurer dieter at handshake.de
Wed Oct 1 16:06:44 EDT 2003


Kapil Thangavelu wrote at 2003-9-30 11:46 -0700:
 > ...
 > looking over the thread i still don't see the problem that this is 
 > trying to solve..

Method aliases add an additional level of indirection to
URL resolution.

Tres has pointed out that this provides for more meaningful
names.

It also provides for more flexibility and ease of maintainability.

  Assume, you create a new type by deriving from "Document", say
  "MyDocument". This means a new set of
  "mydocument_view", "mydocument_edit", ... templates.

  If "document_view", "document_edit", ... have been cluttered
  all over the application, you need to find all such occurrences
  and replace them with the corresponding "mydocument_...".

  However, if you always use the action ids "view", "edit", ...
  then, you need to remap them at a single place: the action definition.
  Nothing else to touch.



Dieter



More information about the Zope-CMF mailing list