[TYPO3-project-4-3] ExtJs - augment or extend

Martin Kutschker masi-no at spam-typo3.org
Wed Jun 17 12:08:44 CEST 2009


Steffen Kamper schrieb:
> Hi Masi,
> 
> Martin Kutschker schrieb:
>> Hi!
>>
>> Most of the ExtJS widgets/components come with nice defaults, but some
>> of the I think could be changed for easier use in the TYPO3 (BE) context.
>>
>> In some cases it makes sense for me to creatte (ie extend) new widgets.
>> For other cases I have the feeling it would be easier if we would
>> augment the ExtJS classes. Of course not by hacking the sources, but
>> with standard JS ways (like chaning the prototype of the classes).
>>
>> What do you think? Should we create a whole bunch of classes just to
>> modify defaults and add minor featires (very clean) or is it ok to
>> augment the classes?
>>
> 
> Nils and i also talked about this, and result was to pre-create some
> xtypes that can be reused specially for TYPO3. This could be done with
> Ext.extend and Ext.reg. There we can set the main defaults we need.
> 
> If we really need some changes in components we could augment them by
> creating own ux.

That is in your opinion it is better to extend than to augment. I agree
that this is for many case the best way. A problem with this approach is
that you cannot modify base classes of ExtJS this way. You need to
extend all components/widgets if you want to add a tiny feature or make
a slight adjustment.

Maybe this can be decided on a case by case basis.

Masi


More information about the TYPO3-project-4-3 mailing list