Re: new listGalleries code
Ben Chavet <[email protected]>
| Newsgroups | gmane.comp.horde.ansel |
|---|---|
| Message-ID | <[email protected]> |
I was trying to come up with a unified format for a list of galleries, no matter what type of grouping was desired by the user. I thought I had done so, but it may need a bit of refinement... I realize the new format is a bit more complex than before, but I think it allows for more flexibility. It doesn't really matter what the user's preferences are, by calling listGalleries(), we are receiving an array of groups of galleries. If there is one group...so be it, just display the one group. If there are 300 groups, no need to change the code, just deal with it. I made the current code capable of dealing with the currently defined groupings (byOwner, and none), but leaving it wide open for any other type of groupings. If we wanted to add a grouping of groupByPurpleTofu, we could with minimal effort (considering galleries had a purpleTofu attribute). Heath and I had expressed interest in making gallery listings a bit more unified, and there was no opposition, so I implemented what I thought would be best for the project in the long-run. If you have a better idea on how to implement this, I'm all ears! I only want what will be best for the project in the long-run, because I plan on using the ansel code-base for my personal photo album for as long as possible. I hope that clears things up a bit. I'll be glad to explain further if necessary. --Ben Quoting Chuck Hagenbuch <[email protected]>: > Quoting Ben Chavet <[email protected]>: > >> The idea behing my new grouping scheme was to avoid special cases. >> listGalleries returns an array of groups. > > This seems to me, having not quite dug into all of the code, but > looking at just > the listGalleries function, to really complicate using listGalleries, and to > require an awful lot of knowledge of the user's preferences > anyways... can you > explain where it saves code? > > -chuck > > -- > "Regard my poor demoralized mule!" - Juan Valdez > -- > ansel mailing list - Join the hunt: http://horde.org/bounties/#ansel > Frequently Asked Questions: http://horde.org/faq/ > To unsubscribe, mail: [email protected] -- ansel mailing list - Join the hunt: http://horde.org/bounties/#ansel Frequently Asked Questions: http://horde.org/faq/ To unsubscribe, mail: [email protected]