Questions tagged as 'design-pattern'

2
answers

What is "granularity level" and how to identify it?

In Erich Gamma's Project Defaults - Reusable Software Solutions    "Designing object-oriented software is difficult, but designing reusable software   object-oriented is even more complicated. You must identify pertinent objects,   factori...
asked by 12.03.2015 / 00:50
2
answers

Is it really necessary to use mutator and accessor methods (setter and getter) in PHP? And the performance?

I have come to realize that most other libraries use the setters and getters methods (hereafter referred to as mutator and accessor in>), to change the ownership of some class. For example: class User { protected $name; public...
asked by 29.01.2016 / 19:36
2
answers

Is it wrong to leave business rules in controllers?

I see in several code examples this, and even in the "default" project that is created in visual studio, they leave a good part of the rule in the controller Is it wrong? When to use this? What is the advantage and disadvantage?     
asked by 16.09.2014 / 22:40
1
answer

Inheritance in relational database

One of the great challenges in developing object-oriented software is to abstract the data from its object base in order to better manipulate it, nowadays the available ORM frameworks facilitate this abstraction a lot, the problem is when we begi...
asked by 06.10.2014 / 22:40
1
answer

Is there any technical reason for the Observer pattern or the like not being used independently of the observed object?

We often use things we do not even think about because it's like this. I do not like to place mechanism pendants on an object that is domain specific. If I have a screen control or a client that has some action that triggers an event my no...
asked by 30.07.2018 / 15:16
3
answers

How do objects created following singleton work?

I would like to understand how objects created following the singleton design pattern work in javascript. My main doubts are about the methods and attributes of this object, where and how to create them, and where and how to access them. I...
asked by 24.12.2015 / 19:23
2
answers

What's the difference between Simple Factory, Factory Method, Abstract Factory?

What are the main differences between these design patterns? In which situation can one pattern be better than the other?     
asked by 08.10.2016 / 05:33
3
answers

Which application layer is geared towards processing of broader and more complex business rules?

I have been reading some questions and answers about the MVC standard and I have seen that it is correct to treat business rules in the Controller layer, for example: Verify that a record already exists in the database before persisting i...
asked by 08.10.2014 / 01:41
3
answers

Design Pattern for Filters

First, filter in my current context is a list of objects to be used in ComboBox type controls so that the user can choose from the options. My scenery: Screen 1 - It has filters of companies, stocks, customers, forms of payment. Screen 2 - It...
asked by 04.08.2015 / 18:52
1
answer

What is the default Null Object?

I asked this question in SOEN,
asked by 24.09.2015 / 16:12