[TYPO3-mvc] extbase_pager usage.

Franz Koch typo3.RemoveForMessage at elements-net.de
Sat Aug 7 04:39:33 CEST 2010


Hey,

> I think that PHP is already a templating language, therefore why create
> another (and learn another)? In fact Smarty 3 has a new PHP mode that
> let's one to write PHP templates. CakePHP has also PHP templates,
> helpers are just PHP objects and when a helper is not available it is
> very easy to do what one needs (there is all the PHP functionality). Of
> course, some people will not like this and argue against it (therefore
> maybe it is a matter of taste, however that does not eliminate the fact
> that PHP is a templating language, a very good one).

just for clarification. You don't have to use Fluid with Extbase. 
Extbase will by default search for a php view if there is no HTML 
template found for Fluid. Franz Ripfel explained that quite nice recently:

> if Extbase cannot find a fluid-template (which you mean probably by html view) for your Controller/Action/[Format], it will automatically try to find an php-based View.
> The naming conventions used for that search are
> Tx_ at extension_View_@controller_ at action_@format (_ at format is optional)
>
> So if you have an "UserController" with an "ajaxAction" your View should be called automatically.
> Your class-files needs to be at the currect location however:
> yourExtension/Classes/View/User/Ajax.php


And by creating a custom viewHelper (which is so easy to do) you also 
have all the PHP functionality inside to achieve what you like to do, 
but in a abstracted way, so that it's reusable and even templaters can 
deal with it when working on a template.


Just as side note - not meant for starting a discussion:

Template engines are mostly there for templaters, not developers. If you 
are a One-man-show like me, you're already familiar with many advanced 
programming languages and don't really care what language templates are 
written in, but you most likely prefer the language you know best and 
that gives you the best flexibility (thus php). But for HTML-Templaters 
(which are people in teams working on a project, only there for building 
templates) learning a language like PHP would simply be to much. They 
are familiar with HTML/CSS/JS and probably XML and they need a 
tool/language that's giving quite some flexibility but still is 
relatively easy to learn and uses paradigms they already know - thus 
template engines. Fluid even has the advantage that the syntax can be 
validated (at least with FLOW3 AFAIK).

That just for some of the reasons why Fluid was created. IIRC there is 
even a short article by Sebastian Kurfürst somewhere, where he explained 
the intentions behind Fluid - and they sounded quite reasonable to me.
-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list