[Grok-dev] Re: grok reference - AutoFields and Fields
faassen at startifact.com
Tue May 29 08:56:32 EDT 2007
Jan-Wijbrand Kolman wrote:
> Question: do we regard grok.AutoFields() and grok.Fields() to be
> component-like or rather directive-like?
> Most (all) grok component names look like ClassNames, which makes
> sense. Most directive names look like function_names, which I guess
> makes sense too (at least to me, intuitively).
> grok.AutoFields() and grok.Fields() seem to fall somewhere in between.
> You could even argue, there're neither components nor directives, but
> more like (utility) functions, like grok.url().
> Sugggestion: we rename grok.AutoFields and grok.Fields to
> grok.auto_fields() and grok.fields(), but for now, in the reference.
> I'll regards them to be directives, like grok.action().
It's true that these are kind of different. The reason they're not
straightforward directives is that they return values which can then be
manipulated later on.
I agree with your suggestion that for now we regard them indeed as
directives for documentation purposes. They're definitely more
directive-like than component-like. Whether we should rename them or not
is a separate discussion we should put off for now.
More information about the Grok-dev