Posted By: JohnAskew | Aug 18th @ 3:38 PM
page 1 of 1
Comments: 2 | Views: 614
JohnAskew
JohnAskew
9 girl in pink sweater

I am to provide a proxy or adapter or facade - I'm unsure what pattern to use - in providing import and export routines from one file format to another.

 

If you have an opinion on what design pattern best fits this, I would appreciate your feedback.

 

Thanks.

W3bbo
W3bbo
The Master of Baiters

Why use any particular pattern? Wouldn't an interface do?

 

interface IFileFormat {

 

String Name FileFormatName { get; }

 

InternalFileFormat Import(Stream stream);

 

void Export(InternalFileFormat internalRepresentation, Stream stream);

 

}

Dr Herbie
Dr Herbie
Horses for courses

I would have through strategy would be the best bet, with a different concrete strategy for each format.

 

Herbie

 

page 1 of 1
Comments: 2 | Views: 614
Microsoft Communities