[TYPO3-core] RFC: #15094: Refactor of content objects of tslib_content

Steffen Kamper info at sk-typo3.de
Mon Jul 19 11:14:20 CEST 2010


Hi Ingo,

Ingo Renner schrieb:
> Steffen Kamper wrote:
> 
> Hi Steffen and all,
> 
>> Create class with following name scheme:
>> class tslib_content_my_ce extends tslib_content_abstract (use lower case
>> only)
> 
> I think this is a great improvement, but I'm sorry to having spoil the 
> party. There are severe issues with the naming of classes in this patch, 
> according to class naming guidelines the classes must be named as 
> follows: 
> lowercase_namespace_devided_by_underscore_UpperCamelCaseClassNameWithNoUnderscore 
>

that's right, thanks for pointing to that. I first ensured that the 
split is working as expected, the correct naming can be done now.

> 
> tslib_content_Abstract
> 
> tslib_content_Case
> tslib_content_ClearGif
> tslib_content_Coa
should we now use ContentObjectArray ?
> tslib_content_CoaInt
see above - btw, what does Int means originally?
> tslib_content_Columns
> tslib_content_Content
> tslib_content_Ctable
have no idea what C stands for
> tslib_content_File
> tslib_content_Form
> tslib_content_Hmenu / tslib_content_HMenu / tslib_content_HorizontalMenu 
> (cleaned up name)
the latest is the best imho
> tslib_content_Hruler / tslib_content_HRuler / 
> tslib_content_HorizontalRuler (cleaned up name)
same as above
> tslib_content_Html
> tslib_content_Image
> tslib_content_ImgResource / tslib_content_ImageResource (cleaned up name)
> tslib_content_ImgText / tslib_content_ImageText (cleaned up name)
> tslib_content_LoadRegister
> tslib_content_Media (since when do we have this BTW?)
this was introduced with the new Media Element, and it takes care of the 
type of media rendering with SWFobject/QTobject/Multimedia
> tslib_content_Multimedia
> tslib_content_Otable / tslib_content_OTable / what does the O stand for 
no idea what O stands for
> to clean up the name?
> tslib_content_PhpScript
> tslib_content_PhpScriptInt (do we need these two, maybe deprecate them?)
> tslib_content_QtObject (should it extend tslib_content_Media?)
no, you can use it independent. i would go for QTObject or QuickTimeObject
> tslib_content_Records
> tslib_content_RestoreRegister
> tslib_content_Searchresult / tslib_content_SearchResult
> tslib_content_SwfObject (should it extend tslib_content_Media?)
same as QTobject, maybe ShockWaveFileObject
> tslib_content_Template
> tslib_content_Text
> tslib_content_User
> tslib_content_UserInt
same with Int
> 
> 
> Further more that one now can add own content elements is great, but the 
> way is not completely right yet, also violating naming conventions.
> 
> If I have a new CE in EXT:mynewce it must be named 
> tx_mynewce_MyWhateverNamedNewContentElement, it is in the extension's 
> namespace, not in the namespace of tslib_content ...
> 

We also have this obts right now, i'm not sure if it's still used, but 
it's also not following the naming conventions. This way adding own 
elements is now like a "gap" as tslib_content try to hint the class name 
with tslib_content_[object], but without any official guide, just a side 
effect. I would appreciate any suggestions how to deal that ;)
> 
> Keep this up, it's going to lead to more flexeblity when finished. We 
> should do it right though.
> 
yeah, i'm looking forward. Thanks for your comments.

vg Steffen

> 
> all the best
> Ingo
> 


More information about the TYPO3-team-core mailing list