[pLog-svn] r2091 - plog/branches/plog-1.1-ben/class/dao

Benjamin Krause ork at orkland.de
Mon May 30 11:25:05 GMT 2005


Oscar Renalias wrote:

> On second thoughts, we really need all the parameters.
> ViewArticleActions uses them all at some point, take a look...

you're right.. i see that these parameters are passed. are you sure all 
of these parameters are really used?
i see the status and the hiddenFields are not important, date, category 
and userId are preset with -1, but might be added to the request.

i guess categoryId is important, maybe we should add a 
getBlogArticlesByCategory()

i guess date is important as well, maybe we should add a 
getBlogArticlesByDate()

if both are present, we might add a getBlogArticlesByDateAndCategory()

i know it is nice to have one mighty method to handle all sort of 
requests, but i prefer small methods that are maintainable.

on the other hand we might want to include another cache only object 
like blogArticles, that will fetch all articles of a blog and sort them 
by some criteria like category and date. instead of fetching articles 
via Articles()->getBlogArticles() (which will do the db stuff), we might 
fetch them via BlogArticles->getArticles(), and this method will decide 
whether to look in the cache or to ask the db.

i've already done this for BlogLinks, instead of selecting all type of 
links from the db, i've added this class as a preparsed collection of 
all links of a blog. like some sort of search-index :)

we might want to implement something like that as well for BlogArticles,
e.g. having just some arrays mapping categories and dates to articleIds.

Ben




More information about the pLog-svn mailing list