[TYPO3-mvc] Few proposals for mvc_extjs view branch

Dennis Ahrens dennis.ahrens at googlemail.com
Wed Jun 9 14:35:37 CEST 2010


Hi Dmitri,

Dmitri Pisarev wrote:
> Dear Dennis and others who are interested in mvc_extjs,
> 
> As I have already said a couple of times, I really love the new view 
> branch (btw, how shall I call it?) of mvc_extjs extension. But there is 
> a certain concern: ExtJS has tones of parameters, with more and more 
> being added at each version.
> Some of this parameters require special treatment in the viewhelper code 
> (i.e. columns parameter), while most(like 90%) of the others just dump 
> some js code like(autoLoad, paramNames etc).

I've also thought about this in the past. In our last project the gui 
code becomes really unclean in the end. That's why i'm integrating 
Ext.Direct (prototype is nearly finished).
I think ViewHelpers should only be used for js code which is related to 
  informations based on the PHP Domain Model, like the 
JsonReaderViewHelper and the ColumnDefinitionViewHelper.

I also think that the SettingsViewHelper is handy and useful.

The other stuff contained in the jsCode package may become deprecated, 
if we find a better solution.

In our new project i'd like to have another gui architecture - with 
classes which are responsible for (extjs) object creation and 
application flow inside the gui.

> My proposal is to do it more generally, I see two basic aproaches:
> 1)See if the parameter is registred in fluid, if yes the treat it 
> accordingly, is not the just do ->setRaw('paramName', $paramValue). But 
> I don't know if it's possible in fluid to pass unregistered parameters.
> 2)For every view helper introduce an array() property which would 
> consist of 'paramName'=>'paramValue' pairs. As far as I can see, this 
> implementation has almost no drawbacks, because you surely know what to 
> expect from this kind of property, and use it on your own risk.
Unregistered parameters are not possible AFAIK. The second solution 
feels good i think and may be used as an alternative.

Another approach may be annotation based code generation. Think about 
somthing like this:

ViewHelper-Code:
<ext:includeDomainAnnotations />

Class Annotation:
/**
  * [...]
  * @extjs form gridcolumn
  */

Variable Annotation
/**
  * [...]
  * @validate StringLength(minimum = 2, maximum = 80)
  * @form <configuartion>
  * @gridcolumn <configuration>
  */

Maybe it is senseful to inculde information from TCA, too.

regards
Dennis


More information about the TYPO3-project-typo3v4mvc mailing list