• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

A diff instance design

 
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey,

I want to write a diff instance class.
The DiffInstance will get two instances of the same class and will return a collection of difference between the instance.

This is done because there are a lot of services that triger by changes in the model.
For example - audit need the diff between previoues state to new state, businees trigers that are intresting in changes in the model state and etc.
So i plan to get the new state in the fron service compare it to the old state and sent the diff to any registered service (like audit).

1. are you agree with me that its better to take the diff in central place and avoid compute the diff in each of the registered services?

2. what do you think will be a good structre for the diff result? my first thought was something like jxpath (or any other navigation expression like -http://java-source.net/open-source/expression-languages ), but i have two problems with this:
a. sets
b. what if one of this tools need to get the field for annotation info?

any ideas?
reply
    Bookmark Topic Watch Topic
  • New Topic