I've got an application that creates and sends packets. A packet consists of one or more document objects. e.g.
Packet1 = [ DocA, DocB, DocB, DocB ]
Packet2 = [ DocB, DocB, DocC ]
Packet3 = [ DocC, DocB, DocA ]
Document objects vary in the number and type of input parameters used to query a database; they return unique datasets to fill specific document fields.
Both packet and document types are expected to grow.
Packets use different transport protocols. One might send() via fax server, another SMTP, FTP, save to PDF file, etc.
I think the strategy pattern could be utilized to isolate variances in the send() methods.
I'm wondering if the factory or builder pattern could be applied here to create the documents and then packets? My goal is make the application extensible in regards to adding new packet and document types. Any suggestions or insight would be appreciated. Thanks.