[TYPO3-dev] How to make it right?
Christian Opitz - Netzelf
christian.opitz at netzelf.de
Wed Sep 2 14:50:43 CEST 2009
Hi list,
I've been watching the development of 4.3, extBase and FLUID for a while
now. Actually i have to write a bachelor thesis about developing an
extension for TYPO3 and i'd rather write about developing in FLOW3
architecture then the regular one but OTOH i want to use my extension in
4.x installations too.
At the moment i'm using the gimmefive component on which i like that
it's possible to include in an extension and users don't need to install
it before. But to be honest: the view rendering is a real gap compared
to other frameworks or FLUID. Due to that i wrote an own view renderer
that let's me use some logic in templates:
public function assign($varName, $value) {
$varName = str_replace(array('$',' ','/','\\'),'',$varName);
$name = strval(trim($varName));
if (strlen($name) > 0) {
$this->vars[$name] = $value;
} else {
throw new Exception('Name for the assigned variable
"'.$varName.'" is of the wrong type or contains restricted chars.');
}
}
private function renderPHP($templateFile) {
extract($this->vars);
ob_start();
@include_once($templateFile);
$templateContent = ob_get_contents();
ob_end_clean();
return $templateContent;
}
I really want to use a template engine and FLUID seems growing to a good
one.
My major question is if it's possible to use extBase and/or FLUID in
minor versions then 4.3? Probably i could test this by checking them out
and trying it on my own but maybe s.o. already has a clear answer...
I'd apreciate if someone could give me a hint about which of the
concepts arround i should use for development of a stable but future
ready extension.
Thank you a lot
More information about the TYPO3-dev
mailing list