Feeds:
RSS
Atom

From time to time I notice that many extensions duplicate certain functionality. For example, many extensions have a page browser. Some of them use page browser provided by pi_list_browseresults function from tslib_pibase class. Examples include mininews, indexed search and tt_news. That function is hard to customize, so almost everyone creates a new page browser.

I came across it again this week. While creating a new extension I had to use a page browser. I have several page browsers already (in comments and some other extensions). But I do not like copying the code. If error exists in the code I will have to update all places where I copied the code.

Next I thought: it would be great if an extension could provide certain functionality to other extensions. For example, if I make a universal page browser, it could be used from any other extension.

Therefore I sat down and coded universal page browser. It is alpha state now and not yet in TER. I will test it a little more, write a manual, create demo extension and upload everything to TER. I think I will even create a tt_news hook to use this new page browser in tt_news.

After making the page browser I though it would be great if there are more extensions like this. Just imagine: you need to focus only on coding your own functionality. You do not have to care about coding suplemental things like page browser or ratings. You just reuse them! It speeds up your development and makes errors less likely to appear in the your code.

For now I see several extensions that can be reused by other extensions:

  • comments
  • page browser (will be available soon!)
  • ratings

Can anyone propose other entries to this list?

Like it? Then bookmark it! digg.comdel.icio.usgoogle.comMyLink.deYahooMyWebTechnoratiFurllive.comnetscapeTagThatWebnews

4 Comments

  1. on Tuesday, 29-07-08 17:58 Frank
    Hi Dmitry,
    I think this is a very good idea, but why do you wrote a new extension? I think recoding the pi_list_browseresults is a better way. What did you think?

    _Frank
  2. on Wednesday, 30-07-08 11:11 Michael
    I think this is the right way. But if i'm using 5 different things like your pagebrowser, the admin have to install 5 additional extensions. Maybe the way like api__macmade is used is better. But it's your choice. ;-)

    It will be nice if there is a one extension with all additional features from you in the TER.
  3. on Wednesday, 30-07-08 11:37 Christian
    There were discussions about a general pagebrowser in the Extension Coordination List last year (http://lists.netfielders.de/pipermail/typo3-team-extension-coordination/2007-July/subject.html#star[..] result of the discussion can be found here: http://wiki.typo3.org/index.php/MVC_Framework/ResultBrowser

    Maybe you find examples from other PHP-Source helpful too:

    http://www.alberton.info/pear_pager_tutorial_database_results.html
  4. on Friday, 01-08-08 23:22 Dmitry Dulepov
    Christian, I am not a big fan of MVC frameworks for TYPO3. I saw some of them but I did not really find any simple and effective. I did not look to ECT proposal. May be it is better than others :) But my page browser is for traditional plugin architecture (tslib_pibase -based).

Leave a Reply