Click here to Skip to main content
15,887,214 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
GeneralRe: Object Oriented Data Marshalling Pin
R. Giskard Reventlov29-Apr-08 21:40
R. Giskard Reventlov29-Apr-08 21:40 
GeneralRe: Object Oriented Data Marshalling Pin
Adam Jasper29-Apr-08 22:34
Adam Jasper29-Apr-08 22:34 
GeneralRe: Object Oriented Data Marshalling Pin
led mike30-Apr-08 4:24
led mike30-Apr-08 4:24 
GeneralRe: Object Oriented Data Marshalling Pin
Adam Jasper30-Apr-08 4:32
Adam Jasper30-Apr-08 4:32 
GeneralRe: Object Oriented Data Marshalling Pin
led mike30-Apr-08 5:04
led mike30-Apr-08 5:04 
GeneralRe: Object Oriented Data Marshalling Pin
Adam Jasper30-Apr-08 5:38
Adam Jasper30-Apr-08 5:38 
GeneralRe: Object Oriented Data Marshalling Pin
led mike30-Apr-08 7:31
led mike30-Apr-08 7:31 
GeneralRe: Object Oriented Data Marshalling Pin
Adam Jasper30-Apr-08 23:01
Adam Jasper30-Apr-08 23:01 
Yes, enums do violate the open/closed principle as they cannot be extended. However, as long as you only add new values to the end of the enum and do not change any existing values I think it is generally considered to be acceptable to use enums in OOD. I have yet to see a design pattern that solves this problem completely, what design patterns are you referring to?

You are correct to say it is a design decision. I do make some rules that I adhere to myself regarding enums i.e. I never cast to another type to iterate through the values because this could break existing code if I add a new value to the end. I do need to modify classes to check for a new enum value, however, I only add code, I don't change existing code. Therefore, if I cannot say my design is object oriented then so be it. It is a lot simpler than any of the other alternatives I have seen. Smile | :)

Thanks for your comments,

Adam
GeneralRe: Object Oriented Data Marshalling Pin
R. Giskard Reventlov30-Apr-08 4:32
R. Giskard Reventlov30-Apr-08 4:32 
GeneralRe: Object Oriented Data Marshalling Pin
led mike30-Apr-08 4:52
led mike30-Apr-08 4:52 
GeneralRe: Object Oriented Data Marshalling Pin
R. Giskard Reventlov30-Apr-08 21:16
R. Giskard Reventlov30-Apr-08 21:16 
GeneralRe: Object Oriented Data Marshalling Pin
Leslie Sanford8-May-08 18:23
Leslie Sanford8-May-08 18:23 
GeneralRe: Object Oriented Data Marshalling Pin
Adam Jasper8-May-08 22:11
Adam Jasper8-May-08 22:11 
GeneralRe: Object Oriented Data Marshalling Pin
Leslie Sanford9-May-08 6:31
Leslie Sanford9-May-08 6:31 
GeneralRe: Object Oriented Data Marshalling Pin
Adam Jasper11-May-08 23:39
Adam Jasper11-May-08 23:39 
GeneralNeed suggestion Pin
Cryptogrpahy29-Apr-08 1:41
Cryptogrpahy29-Apr-08 1:41 
GeneralRe: Need suggestion Pin
Member 9630-Apr-08 6:25
Member 9630-Apr-08 6:25 
GeneralRe: Need suggestion Pin
Cryptogrpahy30-Apr-08 6:37
Cryptogrpahy30-Apr-08 6:37 
GeneralRe: Need suggestion Pin
Member 9630-Apr-08 7:03
Member 9630-Apr-08 7:03 
GeneralRe: Need suggestion Pin
Mark Churchill1-May-08 17:20
Mark Churchill1-May-08 17:20 
GeneralNeed suggestions to define architecture Pin
pranabdas25-Apr-08 9:11
pranabdas25-Apr-08 9:11 
QuestionRequirements gathering tools Pin
Pawel Krakowiak24-Apr-08 4:49
Pawel Krakowiak24-Apr-08 4:49 
GeneralDesign pattern - Exporting results to different formats Pin
jonnyvargazz24-Apr-08 3:44
jonnyvargazz24-Apr-08 3:44 
GeneralRe: Design pattern - Exporting results to different formats Pin
PIEBALDconsult25-Apr-08 6:12
mvePIEBALDconsult25-Apr-08 6:12 
GeneralRe: Design pattern - Exporting results to different formats Pin
jonnyvargazz28-Apr-08 0:34
jonnyvargazz28-Apr-08 0:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.