I am in the process of completely rewriting a fairly large application to take advantage of some newer things such as using SQL and coding with a more "object oriented" approach. I have recoded some of the data structures in the old code as objects where the elements become properties and methods are added for loading / saving / searching etc the individual records. So in essance I have converted some of my older TYPEs to smarter versions by using objects.
My problem is this; I have a structure (TYPE) in the older code that used DWORD elements as bit arrays for options toggles. I have updated this to a more readable form using the AS BIT identifiers and making each option its own element in the structure. This data is used throughout the program during run time as read-only data to determine how it should perform certain tasks. My question is this;
* Should this new TYPE BLOCK of BIT elements be placed inside of an object with similar properties for each element (there are a lot of them) or should the object simply return the entire type? Which way is the best practice in the OOP world?
I am relatively new to OOP concepts so I wanted to run this by some of you guys who have more experience in this department. I know it is only a minor design concept, but which way is the best and why?
I look forward to your replies... thanks in advance!
My problem is this; I have a structure (TYPE) in the older code that used DWORD elements as bit arrays for options toggles. I have updated this to a more readable form using the AS BIT identifiers and making each option its own element in the structure. This data is used throughout the program during run time as read-only data to determine how it should perform certain tasks. My question is this;
* Should this new TYPE BLOCK of BIT elements be placed inside of an object with similar properties for each element (there are a lot of them) or should the object simply return the entire type? Which way is the best practice in the OOP world?
I am relatively new to OOP concepts so I wanted to run this by some of you guys who have more experience in this department. I know it is only a minor design concept, but which way is the best and why?
I look forward to your replies... thanks in advance!
Comment