[TYPO3-mvc] Best practise for extdirect and extbase

Dennis Ahrens dennis.ahrens at googlemail.com
Thu Apr 28 16:34:46 CEST 2011


Hi again,

On 28.04.2011 16:03, Kevin Ulrich Moschallski wrote:
> i write a FE plugin. Your getFormat() condition shure works but i think
> this should be the controller logic should be independent from the view.

Do you use the Tx_MvcExtjs_ViewHelpers_Fe_PluginContainerViewHelper to 
render your plugin?

I agree with this point of view - maybe a "magicMethod" like 
initialize[ActionName]View solves the problem and hides a bit from the 
controller logic.

> To my second point:
>
> Yes, i would like to use <f:uri.image /> for example to pass the result
> to Ext.Direct. I thought about adding a _useViewHelper to the
> setConfiguration() array. But in relation to the first point i think the
> best solution would be a fluid like template engine to format the result
> and additionaly use viewhelpers.

Before i had a look at the FLOW3 package i thought in the same way like 
you do. Older versions of MvcExtjs have many ViewHelpers that handle the 
rendering of the JSON view. But in practice most views just called one 
ViewHelper which points back to PHP - where you have to prepare the 
output. When migrating a project from the old ViewHelper approach to the 
JSONView i got rid of many view files with nearly the same content. The 
solution with the JSON View eliminates this detour. And the 
configuration is really powerful to render complex object structures in 
a clean way.

The disadvantage, that you can't use ViewHelpers for the JSON response, 
is not that nice - but mostly you can use the stuff, used inside the 
ViewHelper, to fit your needs.

> One question off topic, or related to the topic, i'm very new to extjs
> and i desperately searching for a carousel extension similar to
> jCarousel (http://sorgalla.com/jcarousel/) with endless loop support in
> combination with Ext.Direct and a store. Do you know something or do you
> maybe have a approach how to do this with an Ext.DataView?

I think using a DataView with a DirectStore that supports paging should 
be a good approach. I found this sample: 
http://superdit.com/2011/01/11/extjs-dataview-with-pagination/ - to 
reach support for endless loop, you have to extend or rewrite the 
PagingToolbar.

regards
Dennis

FYI: i've added some piece of documentation for MvcExtjs on forge today.
http://forge.typo3.org/projects/extension-mvc_extjs/wiki


More information about the TYPO3-project-typo3v4mvc mailing list