[TYPO3-ect] MVC and image rendering...

Elmar HInz elmar.hinz at team.MINUS.red.DOT.net
Sun Mar 4 10:55:43 CET 2007


> By doing it that way image rendering get's extremely simple
> and I have full GIFBUILDER options available. Using tx_lib_image
> I have to copy values from TS config and call functions to tx_lib_image
> which will take up to much of my precious resources, and takes
> all my flexibility away.

Objects need more resources. But in TYPO3 the mayor question of
performance is to do caching right or wrong. The question of objects or
arrays is comparingly tiny. If your problem is performance of
totally dynamic applications TYPO3 4.x may be the wrong tool. It is not
optimized for that, because caching happens on the page level. Maybe 5.x
will bring improvements for this.

> 
> Currently it feels like that tx_lib_object and phpview are a married couple.

tx_lib_object is the granfather of all and everything. Unlikely he marries
his grandchild. :-)

> and that tx_lib_object and smarty are like water and fire....

I would not subscribe that.



> May be it's the whole SPL thing I don't like, I am not sure yet but it 
> looks
> like a wrapper around PHP's variables. Properly it's just me, but 

Object orientated programming is defined as making a wrapper around data
and adding functions related to that data. If you don't like it you have
problems with OOP in general. If you come from a PHP/TYPO3 background that
would be typical because neither PHP nor TYPO3 are designed OO. TYPO3 in
general uses objects as simple function containers but doesn't make use of
real OO features.

We need time to learn and discover the advantages of new technics. In
history the farmers didn't see the advantage to send their children to
schools ... 

(OT: And they where right ... children learned to construct aeroplains
... now we die by aeroplain air pollution and we are killed by people that
travel round the world more than once in 5 years. 33% percent of climate
effect of the traffic is caused by aeroplanes and the rate is fastly
growing. Only a few percent of humans profit by it, but all humans
and plants and animals suffer. A small minority amuses itself on the costs
of the rest. Sell airplain holidays or sell weapons. What is the
difference? Weapons don't kill that sustainable. What is a war comparing
the foundation of an aeroplane line?)

> currently I
> see it as a resource hook...
> 
> 
> What I normally do is get a dataset from a DB and store it in a 
> associate array.
> Then I pass that dataset directly to smarty (often as a reference) and I let
> smarty render the whole thing.
> 

Somthing in this direction will do the trick:

$smarty->setData($model->getArrayCopy());

I don't know the API of smarty.


Regards

Elmar




More information about the TYPO3-team-extension-coordination mailing list