Peer review, developer input...

K

Kevin Newman

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/toolbox/examples/2003/CSimpleObservable/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.
 
K

Kevin Newman

Kevin said:
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/toolbox/examples/2003/CSimpleObservable/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.

No takers? Hints? Comments? :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top