I was working on a project in C. A big portion of my project code is files that each control a single type of Object. Each Object type has different formats and options for how to manipulate it in the kernel.
As a result, project has grown with each Object added, but its code hasn't been carefully designed to avoid duplicate code. I want to improve the design, so that I can more easily add new Object types in the future.
I want to reduce code duplication and simplify the code of each Object controller, which is the best choice?
1) to push the code for each principal into a dynamic object.
2) create an internal library .
Aucun commentaire:
Enregistrer un commentaire