Search code examples
guidewiregosu

When to use gosu enhancements?


I've seen the usage of gosu enhancements a lot within Guidewire application. However, it seems to me it is being overused. Like the following examples:

  • An entity querying another entity (i.e. looks to me an entity modeling problem).
  • An entity calling a webservice (i.e. its beyond the purpose of the entity).

Are there any recommended use cases when to use enhancements?


Solution

  • Yes, Enhancements are supposed to be used only for straight forward calculations which the business does not want to store in Database tables. Instead of using the enhancements, I think its better to have a helper Gosu class Where we shall execute the complex queries and some logical calculations.