I'm working on an important project, we're a IT services provider and we have a project where we have to build a new system to process data from a specific client.
The problem is, that usually we process their data, but they send us a pre-processed data that's easy to parse, but this time around, they're trying with a new format, which is extremely weird.
Anyways, there were two senior programmers that didn't want to mess with the project, and it's been on hold for one whole year, I'm a Junior programmer and I managed to build a system that kind of works as intended but I want to improve on it, I don't like the way it ended up, even if it works.
The thing is, this format is for generating Account Statements for a local bank, and they're sending in RAW data, I managed to read and parse the data by using a configuration file that's able to read the data from it's position on the file, which can have up to 500 MB of text data. I build a loadInfo() method that uses Reflection to fill in the data in the different classes.
The data comes grouped in Registers, which have many Fields, each Register holds specific information, like transactions, client info, balances and stuff. I created a Superclass called Register, and then made the other corresponding types of register extend from this superclass, the thing is that there are 17 different kinds of registers, an a Register can have from 1 to more than 30 members.
I only use one loadInfo() from the Register super class, and using reflection I can set the member variables for all the other registers.
I feel that my approach is kind of stupid, even if it works, and I'd like to improve it and make it more clean, and I don't know where to start, right now the whole system has like 25 different classes and I feel that my solution is too disorganized. Any advice on how to improve on my design?
PS: The two seniors got promotions and don't work in my department anymore...so I'm on my own now.
Aucun commentaire:
Enregistrer un commentaire