Re: [Maypole] Why is moniker used instead of of table name when looking for table specific templates?

From: Peter Speltz (peterspeltz at yahoo.com)
Date: Thu Dec 30 2004 - 05:57:23 GMT


--- Dave Howorth <Dave.Howorth at acm.org> wrote:

> Simon Cozens wrote:
> > I think, from the Maypole point of view, the cases for using ->table
> > and the cases for using ->moniker have both been made, and it's up to
> > Simon F as far as that's concerned.
>
> FWIW, I agree. But I what I haven't seen agreed yet is that Maypole uses
> moniker for two completely separate purposes: (1) to generate
> identifiers for use in code and (2) to generate human-readable strings
> in HTML pages. The two need to be separated. The U::m docs claim the
> second use but the reality is the first use. IMHO, we should remove
> classmetadata.moniker and replace it with a proper human-readable string.
>

That's right. We haven't agreed on the real issue -- How should maypole use
moniker. I looked at how its used currently.
I searched for "moniker" in : Maypole.pm, Apache/MVC.pm, CGI/Maypole.pm,
M/Model/Base.pm, M/Model/CDBI.pm, Maypole/View/Base.pm, and Maypole/View/TT.pm.

It's only used in View/Base.pm. Hmmmmmm, Imagine that. :)
1. Its used as the directory name for class specific templates. ( I tested out
a moniker "Service Type" and plural "Service Types". It was a pain to make the
Service Type directory and put stuff in it but once i did, Maypole::View found
the templates fine. )

2. Its used to fill the classmeta{moniker} and {plural_moniker} slots so
templates can use it for pretty display (headings and such). ( I was thrilled
to see "Add a new Service Type" instead of "Add a new servicetype")

*Its used as a template variable that is populated with the objects -- a simple
niciety so you can say "[%FOR b in beers . . .%]. ( [% FOR s in Service Types
%] didn't work. And i was very happy about that too. )

moniker is used througout templates for pretty display. So primary purpose for
moniker in maypole is for view by humans. I changed all my "TwoWord" class
monikers to "Two Word" and can add, edit, delete, search just fine.

hth

> _______________________________________________
> maypole mailing list
> maypole at lists.netthink.co.uk
> http://lists.netthink.co.uk/listinfo/maypole
>

=====
pjs

                
__________________________________
Do you Yahoo!?
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250

_______________________________________________
maypole mailing list
maypole at lists.netthink.co.uk
http://lists.netthink.co.uk/listinfo/maypole



This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:57 GMT