I recently had a question regarding String Object with fixed length C# . (Please read this question first)
Some of the answers, which were given, pointed out that my design might be flawed.
Since the last question was about Strings with a fixed length this one is about the underlying principle. This question might be a little bit long so pleas bear with me.
Requirements:
I have a plain textfile with values in it with a specified fixed length. The standard for this textfiles is from the 90's. I have to create such a file.
- A File may contain 1-60 Rows.
- There are 10 different types of Rows.
- A Row has between 10-40 values.
A Row is specified like this:
Back in the 90's there was an application which created those files placed it on a Server and the server then read the File and did something with it like writing it to the database or informing somebody that something went wrong etc.
This application isn't usable anymore due to recent legal changes.
Suggested design
The new Application that is in its place doesn't provide any data in the form of an export but it has a database with the values inside. I have the responsibility to write a converter. So I have to get the data and write an exported text file. The Data is only send and never received !
Question
Since a A DTO's only purpose is to transfer state, and should have no behavior(POCO vs DTO) Is there something like a "Data Conversion Object" which has the purpose of converting data which is transfered ? Is there a design pattern which is applicable ?