Questions tagged as 'design-pattern'

1
answer

What is CircuitBreaker?

I've already seen some definitions about CircuitBreaker , but I still do not understand the background how to use it and I have my doubts. What is the best scenario to apply? What should be aborted to be fully implemented? Can it be us...
asked by 04.08.2017 / 13:57
1
answer

What are web workers and how to use them

Through searches I understand that Web Workers allow the concurrency of processes in JavaScript. It would be like firing a thread JavaScript that updates the View . Can you consider the adaptation of the MVC pattern to JavaScript? I woul...
asked by 14.01.2015 / 20:36
2
answers

Using ';' before starting a [duplicate]

It has become common for me to find codes in github that start like this: ;(function(window){ 'use strict'; })(); I just never understood the following. What is the purpose of using ';' before starting the function declaration?     
asked by 19.03.2015 / 15:14
2
answers

Singleton in JavaScript

How to implement the Singleton pattern in JavsScript in a simple and correct way - what assures me that the instance will be unique? I've seen some rather complex implementations, but would not that be enough? var xyz = xyz || (function (){...
asked by 15.11.2014 / 19:12
1
answer

What is ViewHolder Pattern?

I am implementing a RecyclerView on Android and I noticed that it is necessary to create a class called ViewHolder . This class seems to be a design pattern called ViewHolder Pattern, and my doubts arise exactly at this point....
asked by 17.09.2017 / 17:40
2
answers

How does the (anti) standard EAV (Entity Attribute Value) work?

I would like a working example, as I do not quite understand this dynamic relationship of creating a type table, with a data table, a dynamic relationship, which many find confusing.     
asked by 04.07.2016 / 15:04
1
answer

Am I using the design pattern Bridge correctly?

I am studying project patterns and would like to know if the following approach is correct for the bridge pattern and if you can improve it:     
asked by 19.03.2018 / 02:00
1
answer

Observer can be considered a break in encapsulation?

Observer uses abstraction and interfaces . Let's suppose that a Observer "watches" the changes of state of certain classe and informs them to another external agent, we can consider this a break of encapsulation, since...
asked by 15.09.2016 / 16:25
1
answer

Application of more than one design pattern

I've been studying design patterns and thought it was cool, but there was one thing I did not understand. Regarding design patterns , can I apply more than one of them in the same project? Regardless of which one (eg, Singleton, Observer, Bui...
asked by 20.11.2015 / 14:10
1
answer

Authorization in class libraries

Doubt I have a project where the entire business rule is encapsulated in a set of DLLs with 3-tier architecture. I wonder, what is the best approach for authorization control in these dll's. Is it possible to use Identity? Is there a des...
asked by 06.01.2015 / 17:15