• 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

Application design for rapidly changing formulae

 
Greenhorn
Posts: 16
Eclipse IDE Firefox Browser Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello!

Here's an application design question... there are no wrong answers, but just different ways of implementing this. I wanna know the most feasible one so feel free to post your suggestions.
Here goes:

This application makes calculations based on formulae which changes every week. And currently there are Calculator classes which have hardcoded these formulae in methods. So every week when it changes, someones oughta dig into the code to figure out what needs to be changed.

I'm looking for a way to change this in a way that the formulae can be changed without changing the code.

Here's the general idea of what I wanna do - Store the formulae and the application code in different layers.
The application is modified and made smarter such that it recognises everytime the formulae change and adapts accordingly.

Any suggestions? Which is the best way of storing such formulae? XMLs? How would you go about doing this?

Cheers!
 
Ranch Hand
Posts: 41
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can even use a property file and extract the formula from it.
reply
    Bookmark Topic Watch Topic
  • New Topic