Click here to Skip to main content
15,890,438 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: how to remove these bugs? Pin
Southmountain12-Oct-21 10:06
Southmountain12-Oct-21 10:06 
GeneralRe: how to remove these bugs? Pin
Eddy Vluggen12-Oct-21 10:24
professionalEddy Vluggen12-Oct-21 10:24 
GeneralRe: how to remove these bugs? Pin
DerekT-P12-Oct-21 11:56
professionalDerekT-P12-Oct-21 11:56 
GeneralRe: how to remove these bugs? Pin
Gerry Schmitz12-Oct-21 8:14
mveGerry Schmitz12-Oct-21 8:14 
GeneralRe: how to remove these bugs? Pin
David Crow12-Oct-21 17:25
David Crow12-Oct-21 17:25 
GeneralRe: how to remove these bugs? Pin
BillWoodruff12-Oct-21 18:09
professionalBillWoodruff12-Oct-21 18:09 
GeneralIBM Contact Manager Pin
  Forogar  12-Oct-21 6:00
professional  Forogar  12-Oct-21 6:00 
QuestionDuplication vs. Complexity Pin
Jacquers11-Oct-21 23:29
Jacquers11-Oct-21 23:29 
Rubber ducking here... Wink | ;)

I'm working on a project that has a form which the user must fill in to submit a request. This form is used for various request types (+- 4) and shares common functionality (about 70%) between them.

I have the choice of duplicating the form (UI and probably Logic) for the various request types or having one form with sections and columns that will be shown or hidden based on the request type. Either approach has pros and cons...

Duplication: More maintenance if the common sections / logic change. Each request type's form will need to be updated.

Complexity: Potentially many if else statements and more complex to understand and maintain e.g. changes in the common sections could break it for multiple request types.

Which approach would you use? Maybe there is a hybrid approach?

Edit: This is an Angular project, but I think the question applies to development in general.


modified 13-Oct-21 4:14am.

AnswerRe: Duplication vs. Complexity Pin
Peter_in_278011-Oct-21 23:54
professionalPeter_in_278011-Oct-21 23:54 
AnswerRe: Duplication vs. Complexity Pin
Jon McKee12-Oct-21 0:13
professionalJon McKee12-Oct-21 0:13 
AnswerRe: Duplication vs. Complexity PinPopular
Kornfeld Eliyahu Peter12-Oct-21 0:37
professionalKornfeld Eliyahu Peter12-Oct-21 0:37 
AnswerRe: Duplication vs. Complexity PinPopular
Mircea Neacsu12-Oct-21 0:57
Mircea Neacsu12-Oct-21 0:57 
GeneralRe: Duplication vs. Complexity Pin
Jacquers12-Oct-21 1:01
Jacquers12-Oct-21 1:01 
GeneralRe: Duplication vs. Complexity Pin
Kornfeld Eliyahu Peter12-Oct-21 1:08
professionalKornfeld Eliyahu Peter12-Oct-21 1:08 
GeneralRe: Duplication vs. Complexity Pin
Mircea Neacsu12-Oct-21 1:18
Mircea Neacsu12-Oct-21 1:18 
GeneralRe: Duplication vs. Complexity Pin
Daniel Pfeffer12-Oct-21 3:33
professionalDaniel Pfeffer12-Oct-21 3:33 
GeneralRe: Duplication vs. Complexity Pin
gggustafson13-Oct-21 7:11
mvagggustafson13-Oct-21 7:11 
GeneralRe: Duplication vs. Complexity Pin
Mircea Neacsu13-Oct-21 7:25
Mircea Neacsu13-Oct-21 7:25 
GeneralRe: Duplication vs. Complexity Pin
gggustafson13-Oct-21 7:56
mvagggustafson13-Oct-21 7:56 
GeneralRe: Duplication vs. Complexity Pin
Mircea Neacsu13-Oct-21 8:32
Mircea Neacsu13-Oct-21 8:32 
JokeRe: Duplication vs. Complexity Pin
Maximilien12-Oct-21 1:48
Maximilien12-Oct-21 1:48 
GeneralRe: Duplication vs. Complexity Pin
Jacquers12-Oct-21 2:02
Jacquers12-Oct-21 2:02 
AnswerRe: Duplication vs. Complexity Pin
Nagy Vilmos12-Oct-21 1:54
professionalNagy Vilmos12-Oct-21 1:54 
GeneralRe: Duplication vs. Complexity Pin
Nelek12-Oct-21 4:31
protectorNelek12-Oct-21 4:31 
AnswerRe: Duplication vs. Complexity Pin
GuyThiebaut12-Oct-21 2:21
professionalGuyThiebaut12-Oct-21 2:21 

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.