Questions tagged as 'design-pattern'

5
answers

Singleton or class and static members?

I was researching some projects in .Net and Java and from what I understood about the benefits of Singleton , I found it unnecessary to use it. For example: in a project, it was used to instantiate classes that loaded data into memory whe...
asked by 14.07.2014 / 14:54
1
answer

What is the Adapter standard?

What is and how the Adapter pattern works in Java, I am trying to understand this pattern because I will use the same in a project.     
asked by 10.09.2015 / 02:43
1
answer

Listeners are an Observer implementation?

I'm trying to understand the Observer concept and its implementation, and I ended up finding this example where listeners is used instead of the observable and observer classes: Thisgraphichasbeenremovedfrom , where an altern...
asked by 27.04.2016 / 19:31
1
answer

What are the ServiceProvider and ServiceContainer design patterns used in Laravel and Symfony?

In the Laravel 4 ou 5 and Symfony frameworks, I realize that there are two classes that are essential for the operation of the whole system: ServiceContainer and ServiceProvider. It seems to be a way for you to store instances o...
asked by 02.03.2016 / 13:11
4
answers

Database and transaction control in operations with values

In my project I need to develop a system of transactions where the user will put credit and the services that he has contracted will consume these credits. I built the following structure but I do not know if it's the best way to do it: Usu...
asked by 27.11.2014 / 16:00
4
answers

What would be the best way to do a CRUD for a framework in the most generic way possible?

I am studying to do a CRUD for a framework but I am trying some problems to be able to do this in the most generic way possible. For example: I have a class Pessoa() I want to do CRUD passing only the Person object to another class...
asked by 05.02.2014 / 21:04
2
answers

What are the Types of IoC?

Reading the "Pro Spring Security " book by Carlo Scarioni from Apress Publishing, issue 2013, I came across the following text that left me confused about IoC:   The basic idea of DI, a type of Inversion of Control (IoC) , is simply that i...
asked by 07.07.2015 / 02:57
2
answers

How to implement the Standard Repository in C # with EF?

I want to make an implementation of the Repository pattern where I'll be using EntityFramework and have the following: p> Interface IRepository : public interface IRepository<T> where T : class { T GetById(int id);...
asked by 16.05.2014 / 21:37
1
answer

What is the difference between the design patterns Data Mapper and Active Record?

I would like to know the main differences between these two design patterns. I have this doubt because to know the news of CakePHP 3.0 I saw the change of the design pattern used by the framework. Currently in version 2.x Active Record is...
asked by 11.07.2014 / 17:18
1
answer

Multiple Controllers with JavaFX 2, such as referencing the instance of the other

UPDATED. I am creating a new Java application using JavaFX, when programming with Swing I had the custom of creating multiple specialized controllers for the interface, and in Swing I use a controller that is aware of all others and so with...
asked by 03.08.2015 / 02:03