Architecture question: templates

  • Thread starter Thread starter Craig Buchanan
  • Start date Start date
C

Craig Buchanan

I would like to emulate the template/document relationship that MS Word has,
but with classes.

I would like to be able to define a MessageTemplate class (with subject,
body, recipients, etc), then be able to create an instance of the Job class
based on the MessageTemplate's values. The Job would be pre-populated with
the MessageTemplate's values, but its settings could be overridden.
Essentially, the Job is a deep copy of the MessageTemplate, but with a new
unique key.

I would appreciate others' thoughts on the matter. Am I over doing this?

Thanks,

Craig Buchanan
 
One way would be to have the Job Class constructor take an instance of
the MessageTemplate class as a parameter and set its own Public
variables for subject, body and recipients to the same properties of
the MessageTemplate object.
 
Back
Top