Language String Namespaces

789 views
Skip to first unread message

Ercan Özkaya

unread,
Aug 9, 2009, 6:48:35 PM8/9/09
to Joomla! CMS Development
Hi,

As it has been stated before, we are planning to start using PHP's own
INI parser and it means using standard keys (no spaces or special keys
etc.)

But before replacing the keys, we should first decide for a pattern.
What we mostly used till today is Component_View_Key which seems good
to me. But I don't have much idea as to how to handle other parts. For
example tasks in controller, common keys (yes, no, enabled, disabled
etc.), classes in the framework.

Thoughts?

Andrew Eddie

unread,
Aug 9, 2009, 7:03:35 PM8/9/09
to joomla-...@googlegroups.com
It's actually somewhat judgement related because it also depends on
the usage. Certainaly a component prefix is necessary but after that,
well what I've done is tended to go by usage.

For backend I don't think you always need the view, eg:

Content_Param_Show_Title_Label (a label in a form)
Content_Title_Heading (a table heading)
Content_Option_Title_Ascending (an option in a list)

Though for the toolbar titles something like this is possible:

Content_Articles_View_Title

For frontend though, the view context is more relevant:

Content_Cateogry_Title_Heading (the heading of the title column in the
category view if a table is used)

For the XML files strict rules are certainly possible:

Content_Category_View_Default_Layout_Title
Content_Category_View_Default_Layout_Desc

And then you come across a case that totally doesn't fit any rules :)

Regards,
Andrew Eddie
http://www.theartofjoomla.com - the art of becoming a Joomla developer




2009/8/10 Ercan Özkaya <ozkay...@gmail.com>:

Torkil

unread,
Aug 11, 2009, 4:14:33 AM8/11/09
to Joomla! CMS Development
Enforcing namespacing rules in some way would be great, instead of
just having a standard that 3rd party devs can choose to ignore.

In that regard, trying to ensure that component names are unique is
something that should be looked more closely at. For instance by
having to register it at extensions.joomla.org and/or joomlacode.org,
like a joomla domain name :)

Continuing on that idea: Take for instance com_jce. If jce was it's
registered component name, we could also get a direct url shortcut to
the component at extensions.joomla.org/jce for instance. That would be
sweet :)

- Torkil


On 10 Aug, 01:03, Andrew Eddie <mambob...@gmail.com> wrote:
> It's actually somewhat judgement related because it also depends on
> the usage.  Certainaly a component prefix is necessary but after that,
> well what I've done is tended to go by usage.
>
> For backend I don't think you always need the view, eg:
>
> Content_Param_Show_Title_Label (a label in a form)
> Content_Title_Heading (a table heading)
> Content_Option_Title_Ascending (an option in a list)
>
> Though for the toolbar titles something like this is possible:
>
> Content_Articles_View_Title
>
> For frontend though, the view context is more relevant:
>
> Content_Cateogry_Title_Heading (the heading of the title column in the
> category view if a table is used)
>
> For the XML files strict rules are certainly possible:
>
> Content_Category_View_Default_Layout_Title
> Content_Category_View_Default_Layout_Desc
>
> And then you come across a case that totally doesn't fit any rules :)
>
> Regards,
> Andrew Eddiehttp://www.theartofjoomla.com- the art of becoming a Joomla developer
>
> 2009/8/10 Ercan Özkaya <ozkayaer...@gmail.com>:

Andy Wallace

unread,
Aug 11, 2009, 11:41:25 AM8/11/09
to Joomla! CMS Development
Attach a file I sent to Sam and Andrew just with some suggestions for
this discussion for people to consider, rip apart or ignore! This is
based on a project I was working on to standardise the 1.5 language
files because of the mess they have got into.

Andy
http://groups.google.com/group/joomla-dev-cms/web/language_files_suggestion_paper-AW-100809.pdf?hl=en-GB
> > Andrew Eddiehttp://www.theartofjoomla.com-the art of becoming a Joomla developer
Reply all
Reply to author
Forward
0 new messages