Questions tagged as 'design-pattern'

0
answers

When to use the Builder-based model object builder instead of passing parameters?

When you have Builder to create a model object, the build() method is responsible for the creation of this object, in many examples and materials I have seen this creation done in two ways: Using the model class constructor by...
asked by 12.05.2016 / 14:05
1
answer

Design pattern for WebApi project

I need to create a project with WebAPI to consume some procedures from a remote SQL database, for example: sp_retornaProdutos(1) transforming this to /produtos/1 and returning the result in JSON . I thought about creating mo...
asked by 30.06.2015 / 02:52
1
answer

Change array structure [closed]

How to change the structure of an array? It can be using excel or via programming. I already did my solution with Java but it was a damn gambiarra :). Plus it's not generic enough. Is there a design pattern that solves this? The final goal is...
asked by 28.08.2017 / 20:13
2
answers

Program using the minimum of possible ifs

I'm programming object-oriented, I've been studying design patterns for some time, but I can not develop without using a massive rainfall of ifs. How to do design patterns to avoid ifs ? I have read a lot of articles on the subject bu...
asked by 01.04.2016 / 16:29