Design pattern - Exporting results to different formats
-
Hello everybody! I'm designing an application that generates some results after doing analytics processes. Then the results can be saved into different formats (like TXT,XML,EXCEL,etc...) and with different formats, deppending user options and the format of data file selected. How do you think is the best way to dessign this part? I'm thinking about using the Factory Pattern, about creating and passing the data to each especific class (one per each file format), and a Decorator pattern that adds the optional data configured by de user. But I don't know if I'm thinking in the best way. Could you bring some ideas? Thank you.
-
Hello everybody! I'm designing an application that generates some results after doing analytics processes. Then the results can be saved into different formats (like TXT,XML,EXCEL,etc...) and with different formats, deppending user options and the format of data file selected. How do you think is the best way to dessign this part? I'm thinking about using the Factory Pattern, about creating and passing the data to each especific class (one per each file format), and a Decorator pattern that adds the optional data configured by de user. But I don't know if I'm thinking in the best way. Could you bring some ideas? Thank you.
I produce XML, then XSLT can transform it to other formats, such as HTML and CSV. Excel can read CSV so don't bother writing XLS directly.
-
I produce XML, then XSLT can transform it to other formats, such as HTML and CSV. Excel can read CSV so don't bother writing XLS directly.
Thanx for your reply. Y will consider this option.
-
Thanx for your reply. Y will consider this option.
Keep the analytical data in Director. Give format to your data using Builder. Builder pattern.