[Progress Communities] [Progress OpenEdge ABL] Forum Post: RE: Class newbie - How to

  • Thread starter Thread starter Rutger Olthuis
  • Start date Start date
Status
Not open for further replies.
R

Rutger Olthuis

Guest
You can still do the same with the factory pattern since it is a good way to instantiate the bong implementation at run time. You still need an interface to create the blueprint for your various bong classes to be able to define an object handle for the objects that will be created by the factory. Perhaps the words template and contract are the best ways to describe an interface. You must submit to the contract that is set by an interface. Then when you have defined the variable as that interface, all classes that implement that interface can be assigned to the variable. Within the factory you can for instance (least fancy solution) build a case statement where you return an new Bong of the type you want.

Continue reading...
 
Status
Not open for further replies.
Back
Top