[TYPO3-dev] extJS library

Steffen Kamper info at sk-typo3.de
Thu Feb 5 00:10:57 CET 2009


Hi Masi,

Martin Kutschker schrieb:
>> * a global Data-store that delivers result in json format, easy to
>> configure, working with DB-class
> 
> You mean something like a JSON-view for TCA-based tables? This could
> also be used for other AJAX-frameworks. Though care must be taken
> because extJS uses special GET variables for remote sorting and paging,
> which are probably incompatible with other frameworks. But maybe we can
> make a base class with a derived extJS class.
>

The data store object of extJS is a very nice object, i don't know it 
from other JS libs. It allows to bind to data in general, which can be 
database, xml, array or what ever. It's combined with a reader which 
defines how the data is organized. What i have in mind is  a php class 
which sets the properties for data store. It's an object for often reuse 
whenever datastore is needed. Not deep thought yet.

>> * a wrapper class that create an extJS JS file having a class wrapped
>> with Ext.onReady(function(){ ... });
> 
> I don't get what do you mean.

this is already in core, you have the $this->doc->extJScode which is a 
string that will be wrapped with Ext.onReady(function(){ ... }); in 
doc->startPage.

> 
>> * a set of validation rules
> 
> Should these replace the home-grown JS validations that TCEforms now
> uses? I had the idea to check all TCA validations and make sure that all
> checks that can be done client side are done there. Additionally all
> checks that may be done with AJAX are done before saviing the record.
> 

i really like the vtypes - you have a set of validation rules and use it 
in the objects (forms) for validate like
vtype: email
It's more easy to maintain, easy to extend etc.
Sure, only makes sense if forms use extJS, but a basic set of validation 
rule should be there.

>> * an easy object for creating nested layouts
> 
> In PHP or in JS?
>

in php. Have a look at http://php-ext.quimera-solutions.com/ where it's 
done completely in php. Nested layouts are not easy to build, so an 
"Autogenerator" would be a great help, but this is just a future vision.


>> * a bridge between LANG and JS for use localized labels
> 
> Sounds good. But I have to dig into extJS localization yet.
> 

as i brought the "#10144: enable JS-Libs in BE" to core list i would 
like to enable language support there. but this is only for the labels 
coming from extJS, eg the paginator for grids.

The idea here was something that generates the labels dynamic with php 
as inline JS ready to use, like
Ext.lang{
   label.ok = "OK",
   label.cancel = "cancel"
}

vg Steffen




More information about the TYPO3-dev mailing list