Click here to Skip to main content
15,903,201 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
AnswerRe: DTO to UI, or not? Pin
Gerry Schmitz3-Feb-23 8:18
mveGerry Schmitz3-Feb-23 8:18 
GeneralRe: DTO to UI, or not? Pin
Single Step Debugger3-Feb-23 8:57
Single Step Debugger3-Feb-23 8:57 
AnswerRe: DTO to UI, or not? Pin
Dave Kreskowiak3-Feb-23 11:39
mveDave Kreskowiak3-Feb-23 11:39 
GeneralRe: DTO to UI, or not? Pin
Single Step Debugger6-Feb-23 5:38
Single Step Debugger6-Feb-23 5:38 
AnswerRe: DTO to UI, or not? Pin
jschell6-Feb-23 6:20
jschell6-Feb-23 6:20 
QuestionMultiple classes calling another same classs Pin
Member 1402131327-Jan-23 9:15
Member 1402131327-Jan-23 9:15 
AnswerRe: Multiple classes calling another same classs Pin
Gerry Schmitz27-Jan-23 11:31
mveGerry Schmitz27-Jan-23 11:31 
AnswerRe: Multiple classes calling another same classs Pin
jschell29-Jan-23 11:05
jschell29-Jan-23 11:05 
The question doesn't make sense.

Presumably "a,b,c" are in fact different classes and not in fact different instances. And in the context of programming (not data) there is no point in having a "primary key". And it is probably a design flaw if you do in fact have 10 different classes and you intend to store then in a single table (for which the 'primary key' would in fact be a type value and not a 'primary key'.)

You do not "save" classes. Instead you save data.
Design patterns apply to programming designs. The term does not apply to data.

Nothing in your description as defines that there is any data at all to save with the "button".

But if you meant the following
1. You do in fact have 10 different classes where the data is the same (guaranteed) but the behavior is different.
2. You have an attribute that differentiates each class. What you are referring to has the "primary key". I will refer to it however as the 'type'.
3. The button has a state of either on or off.

The the persistent storage object (database table) would consist of three columns: Id, Type and ButtonState.

The 'Id' exists because, presumably, you are going to want to store more that one instance of a, and more than one instance of b, etc.
QuestionDebate reactive programming with me! Pin
Mike Nakis18-Jan-23 3:08
Mike Nakis18-Jan-23 3:08 
AnswerRe: Debate reactive programming with me! Pin
Mircea Neacsu18-Jan-23 3:58
Mircea Neacsu18-Jan-23 3:58 
AnswerRe: Debate reactive programming with me! Pin
Richard MacCutchan18-Jan-23 4:41
mveRichard MacCutchan18-Jan-23 4:41 
AnswerRe: Debate reactive programming with me! Pin
Gerry Schmitz18-Jan-23 5:16
mveGerry Schmitz18-Jan-23 5:16 
AnswerRe: Debate reactive programming with me! Pin
jschell22-Jan-23 8:50
jschell22-Jan-23 8:50 
AnswerRe: Debate reactive programming with me! Pin
jochance7-Mar-23 9:38
jochance7-Mar-23 9:38 
QuestionHeap stack allocation Pin
trønderen15-Jan-23 13:10
trønderen15-Jan-23 13:10 
AnswerRe: Heap stack allocation Pin
jschell22-Jan-23 9:08
jschell22-Jan-23 9:08 
GeneralRe: Heap stack allocation Pin
trønderen23-Jan-23 4:26
trønderen23-Jan-23 4:26 
GeneralRe: Heap stack allocation Pin
jschell24-Jan-23 10:09
jschell24-Jan-23 10:09 
GeneralRe: Heap stack allocation Pin
jsc4225-Jan-23 1:15
professionaljsc4225-Jan-23 1:15 
GeneralRe: Heap stack allocation Pin
harold aptroot23-Jan-23 1:03
harold aptroot23-Jan-23 1:03 
GeneralRe: Heap stack allocation Pin
trønderen23-Jan-23 4:46
trønderen23-Jan-23 4:46 
GeneralRe: Heap stack allocation Pin
jschell24-Jan-23 10:12
jschell24-Jan-23 10:12 
QuestionSetting Up Client Test Environments Pin
Kevin Marois28-Dec-22 9:48
professionalKevin Marois28-Dec-22 9:48 
AnswerRe: Setting Up Client Test Environments Pin
jschell17-Jan-23 4:34
jschell17-Jan-23 4:34 
AnswerRe: Setting Up Client Test Environments Pin
jochance7-Mar-23 19:23
jochance7-Mar-23 19:23 

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.