Reply to Re: objects of MyClass in array?

Your name:

Reply:


Posted by Michael Fesser on 01/08/08 14:20

..oO(Steve)

>"Michael Fesser" <netizen@gmx.de> wrote in message
>news:a676o3tif3o2rsja45dlc10dphncslb24m@4ax.com...
>>
>> I find it quite useful. In my own framework for example I have a class
>> TSitemap that holds a representation of all the documents on a website.
>> It contains a tree-like structure of simple page objects, which store
>> the name, title, URL path, description, access permissions etc. for
>> nearly every page. This sitemap is mainly used to automatically generate
>> nav bars (main menu, sub menus, breadcrumbs etc.) and such things, but
>> from time to time it's also necessary to directly access a particular
>> page object from the tree or to iterate over all pages, regardless of
>> their relation to other pages. To achieve this I simply implement the
>> ArrayAccess and Iterator interfaces in the TSitemap class.
>
>hmmm...hadn't thought of doing that. do you build that from a db each time a
>page is visited or do you build it once and then put it into a session?

Currently it's rebuilt on every request. Some parts of the sitemap come
from a DB to serve the rather static pages (their content is stored in
flat files on disk and just put into a global page template when the
page is requested), other parts are added by some components of the
framework. My 'admin' module for example adds its own section to the
sitemap as the entry point for all the admin components and plugins.

If this should become a bottleneck one day, then I might implement some
kind of caching, but currently the performance is OK. The bottlenecks
are somewhere else.

Micha

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация