FactoryPattern

From Wiki RB4

Factory Pattern

Instead of calling new X() in java code you use XFactory.get()

Advantages

You have a decoupling of the actual type, which is good for:

  • testing
  • different environments

Disadvantages

  • lots of coding for factory classes