Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Open source framework for observable collections?

 
Ken Blair
Ranch Hand
Posts: 1078
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In other words a framework for Collections, Lists, Sets, etc. that notify interested parties of mutations? I have a need for some data models that are for all intents and purposes just Collections that need to be observed. Looking at Jakarta there's some work on the subject but it's not released and Google isn't turning up anything. Am I stuck rolling my own API and decorators here?
 
Alan Moore
Ranch Hand
Posts: 262
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this what you're looking for?

http://publicobject.com/glazedlists/
 
Ken Blair
Ranch Hand
Posts: 1078
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nope. I'm interested in mutations in the Collection not mutations in the elements, what I want to do is far easier. I'm well on my way to finishing a reasonably simple API now, I was hoping to avoid the hassle and find something more robust but it doesn't look like there's anything out there.
 
Jesse D. Wilson
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Glazed Lists tracks structural changes to collections, check out the API doc for BasicEventList for details.

Alternatively, there's Jakarta Commons Events: http://jakarta.apache.org/commons/sandbox/events/
 
Ken Blair
Ranch Hand
Posts: 1078
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jesse D. Wilson:
Glazed Lists tracks structural changes to collections, check out the API doc for BasicEventList for details.


Agreed, but I don't see any equivalent for any Collection, it opens up the possibility of breaking List's contract and the API is a little big for my very limited usage.

Originally posted by Jesse D. Wilson:
Alternatively, there's Jakarta Commons Events: http://jakarta.apache.org/commons/sandbox/events/


Yeah, that's the unreleased work at Jakarta I mentioned. The API there is getting awfully big too. I understand why but personally it feels like trying to be too robust at the expense of an easy to use, light API.

I've implemented what I needed to in two interfaces and two classes. I'll keep an eye on your GlazedLists and what Jakarta is working on, I certainly think your API looks attractive if I needed to model tabular data. However, this particular case seems just "too simple" and using it would be massive overkill at the expense of readability and understanding.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic