Skip to main content

Timeline for Redesign a module to be generic

Current License: CC BY-SA 3.0

10 events
when toggle format what by license comment
Jan 17, 2013 at 14:30 comment added Bobson Create a single function: RunCalculations(). Inside that is a giant switch statement which does the right calculation for your Enum value. Everything which needs a calculation calls that one function. Thus, if you modify the possible values, you only have one place to change it.
Jan 17, 2013 at 10:30 comment added VIckyb Can you please explain me more on this "but with that many options you're going to need to centralize all the logic which changes based on the value, so you only have to maintain it in one place"
Jan 16, 2013 at 14:25 comment added Bobson There's no limit on the number of values in an Enum, but with that many options you're going to need to centralize all the logic which changes based on the value, so you only have to maintain it in one place.
Jan 16, 2013 at 7:06 comment added VIckyb Thanks Bobson , only problem i have is that there could be about 100 traits is this feasible to do.
Jan 15, 2013 at 14:25 comment added Bobson @VIckyb - Here's the Enum documentation, and I added an example of the values that you'd put into the enum.
Jan 15, 2013 at 14:24 history edited Bobson CC BY-SA 3.0
Adding example of enum
Jan 15, 2013 at 10:04 comment added VIckyb Can you please explain more on Enum Bobson
Dec 13, 2012 at 7:42 comment added VIckyb Just added some more things to clarify
Dec 7, 2012 at 5:28 comment added VIckyb I have implemented it it my own way but what i thought this module could be case study where developers can think from extensebility maintainbility point of view so any design pattern suggestion will be helpfull
Dec 6, 2012 at 15:01 history answered Bobson CC BY-SA 3.0