On Dec 11, 2008, at 3:52 PM, Philipp Bracher wrote:


Hi,

Now that we are using the new objects I think that some of the object names are too long or confusing:

For those of you who wonder what Philipp is talking about, since we haven't really clearly communicated about this yet, have a look at
  
http://confluence.magnolia-cms.com/display/DEV/Roadmap+4.0#Roadmap4.0-Newtemplatingfeatures

- parameters: ${templateDef.parameters.name}
- parent definition: ${model.parent.renderable.name}

I propose to rename templateDef and paragraphDef to config and the parameter map to params. I would also rename the "renderable" property of the model to "config"

The example from above
- parameters: ${config.params.name}
- parent: ${model.parent.config.name}

Please provide your opinion.

Couple of remarks:
# With this naming, how do you get the "templateDef" when rendering a paragraph ? # Isn't "config" too vague ? i.e isn't that confusing with, perhaps, a module's configuration bean, magnolia's configuration in general, ... ? Also, I think there is a differenciation to be made between "definition" and "configuration", where the latter implies that things in there can be customized, while the way I see it, it's more a way of reusing templates (ftl) than providing configurable behavior. # I always we'd have "params" as an implicit map: ${config.foobar} would return either config.getFoobar() if such a method existed, else it would do config.getParameters().get("foobar"). This actually looks like the same issue we have with ctx right now (MAGNOLIA-2509), so this could maybe be solved the exact same way - if "config" is a Renderable, it should pretty straightforward, once 2509 is fixed.

Other than that, I agree that these names are too long. But as always, even though size supposedly does not matter, I favor clarity over concision.

Cheers,

-greg


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to