[TYPO3-50-general] Beer3, really a good solution?

Sebastian KurfŸürst sebastian at typo3.org
Wed Oct 22 12:36:01 CEST 2008


Hi Falk,

> May i ask a blunt question: Why not use php templates?
> They are more flexible and wether you write {$user.email} or 
> <?=$user->getEmail()?> doesnt change much.
> Are there other reasons i cannot currently see, that make a template 
> engine more useful than using php directly?
My rationale was the following:

1) Not so easily readable:

Imagine a "foreach"-Loop in PHP:

<ul>

<?php foreach($posts as $post) { ?>
	<li><?php $post->getTitle(); ?></li>
<?php } ?>
</ul>

I think the readability is quite bad in this example...
And it's not really easy to do an autocompletion on this, I think.


2) Enforce clean separation

Besides, I think we should enforce a clean separation of view logic 
(which should reside in a view helper), and HTML/Styling - that's why we 
did not allow full PHP syntax f.e. in {}. We want to make sure people's 
code will be really readable.


Greets,
Sebastian


More information about the TYPO3-project-5_0-general mailing list