[TYPO3-dev] New icons to the core or to t3skin?

Dmitry Dulepov dmitry.dulepov+t3ml at gmail.com
Fri Jan 29 16:58:05 CET 2010


On 2010-01-29 15:45:49 +0200, Steffen Ritter said:

> Dmitry Dulepov schrieb:
>> You did not understand the question :) Let me ask it differently. *Why* 
>> > do they have to be generated? :) Because every extension / skin / new 
>> record-type adds new icons to the TYPO3 Backend. That's why there HAS 
>> to be a system which automatically generates ONE sprite for the current 
>> backend.
> It's like cache cleaning on extension install and rebuilding the temp 
> files afterwards.
> After development the images won't change often do they? They just need 
> to generate once a month or so. A load of some ms. Whats this against 1 
> Request for an icon against hundreds (on a list view for example with 
> many different records?
> 
> So I dont get your point. To me looks like just beeing anti because of 
> a bad day...

No, the day is good today :)

By regeneration of sprites because an extension adds an icon you will 
cause more problems. I went through this way already a couple of years 
ago :) It is in the past for me.

You will get a gigantic sprite. You will have to make lots of 
calculations in the CSS or API for offsets of a single image added by 
an N-th extension in random order. Do you imagine how complex and 
lengthy it will be? One bug and all UI goes to hell. Also add caching 
here. If sprite is such cached, you'll have to make special measures to 
force user agent to clear the cache. Would you ask admin to press the 
button in EM *and* clear his own browser cache *and* ask every editor 
to clear browser cache? That's ridiculous! :)

Instead you should use several sprites. Sprites should be for BE module 
groups. It is ok to use several sprites! As soon as images are grouped 
properly, it creates less HTTP requests. Our problem is that for every 
small image we have an HTTP request. By grouping images logically to 
sprites we achieve a lot:
- we have all logically connected icons together in one PSD (and GIF)
- users will get only icons from modules that they really use
- each extension can provide its own sprites to fully or partially 
overwite standard sprites. API will easily handle that
- no complex CSS calculations of offsets
- no issues with missing/buggy ImageMagick or GD versions at different servers

Do you see advantages of my approach? :)

My impression is that there is a technical idea that you like and you 
want to protect the idea regardless of how useful it is or not. It is 
TYPO3, it is for users, not for programmers! :)

-- 
Dmitry Dulepov
TYPO3 expert / TYPO3 core team member / TYPO3 security team member 
Read more @ http://dmitry-dulepov.com/





More information about the TYPO3-dev mailing list