Kevin Newman wrote:[color=blue]
> Hello,
>
> I work at a design studio as the lone programmer/scripter. I would love
> to get some input from some actual developers for a change, on a project
> that I've been working on:
>
>
http://www.unfocus.com/Projects/HistoryKeeper/
>
> The script creates history points with bookmarkable strings from
> javascript so that AJAX (actually it was originally for flash, but it
> will work for AJAX too :-) ) apps can utilize the back button, and
> points within the app can be bookmarked or shared.
>
> These are some specific areas regarding it's implementation:
>
> 1. Is a singleton (I think that's the patter I used) appropriate in this
> case?
> 2. It has some methods for adding listeners (an implementation of the
> observer pattern?) but I'm not sure the interface is quite right. I'd
> love some input on that.
> 3. I've been told elsewhere (where it was off topic) that the way I've
> used an array to store the listeners is an abuse of the array type,
> since I'm mostly using the features of the inherited object class
> instead of the features of an array. I'd love to hear about some
> alternatives - preferably something that lets me keep the code base
> small. I found an example here:
>
http://devedge-temp.mozilla.org/tool.../index_en.html
> but it seems like overkill for the tiny codebase that I'm working with.
> 4. Any other hints or constructive criticisms are welcome.
>
> Thanks,
>
> Kevin N.[/color]
No takers? Hints? Comments? :-)