Most voted "pattern-design" questions
A design standard, from English design Pattern, is a general reusable solution to a problem that commonly occurs in software design.
Learn more…269 questions
Sort by count of
-
5
votes1
answer109
viewsHave the functional features of Java 8 made any Pattern design obsolete?
It is said that functional programming makes certain design patterns (thinking of the Gof) unnecessary. There’s even a presentation showing it somewhere (I’m not looking now because I’m on cell…
-
5
votes1
answer98
viewsA user model should have all the actions that involve it?
Whenever I research I see that in MVC we should separate well the models so that it becomes more organized and easy for a next developer to understand the system. I have basic actions like login,…
-
5
votes1
answer247
viewsWhat is Atomic web design?
Superficially I found very interesting this approach, but before going deeper I would like to know exactly what it is about, too, if it is possible to use it in short scale projects, or even in a…
css pattern-design software-engineering methodology uiasked 6 years, 11 months ago Felipe Duarte 6,284 -
5
votes1
answer158
viewsHas some real use when implementing non-abstract methods in an abstract class
Have some real use when implementing a method that has a field, (implemented code) in an abstract class that cannot be instantiated, since no compilation error occurs? public abstract class…
-
5
votes1
answer167
viewsTemplated Method - Is it possible to implement with composition rather than inheritance?
To create a Thread we can both extend the class Thread and overwrite the method run(), how to have a class that implements the interface Runnable, implement the method run() and pass the reference…
-
5
votes3
answers464
viewsWhat is a Guard clause?
What is a Guard clause? Possible translations and synonyms: Custody clause Guard status Sentinel clause Prevention clause Protection clause Fuller definition. What are its advantages? The code is…
-
5
votes2
answers163
viewsHow to enumerate bad Smells in a software?
I am working on a relatively large system (considered unworkable rewriting effort) PHP that implements in a certain way the MVC architectural pattern and that has (under a higher point of view)…
-
5
votes1
answer137
viewsHow does the request session work?
An idea arose among the developers to use the standard of Session per request - Session by request. Researching on the subject, I found some topics in the OS that generally said that the indication…
-
5
votes1
answer270
viewsConsume entity repository directly from the application layer
I have a scenario where I need to search for a list of Active Employees with Entity Framework and display them on the screen (I need to convert to Dtos before displaying - what I do through the…
-
5
votes2
answers97
viewsWhat are the consequences of not working on data typing?
I want to create an application where the client can create a new form or table, in which he can choose the data type of the field, such as number, text, binary, etc. An "easy" solution would be to…
-
4
votes1
answer549
viewsWhat is the relationship between MVC and Project Standards?
We know that the MVC Standard (Model View Controller) is not a Design Pattern, but an architecture standard. It’s also not a layered pattern, because it tells you how to group components while MVC…
-
4
votes1
answer471
viewsDesign Patterns - DTO, POCO, MODEL
What’s the difference between DTO, POCO, MODEL? Because I am developing a layered application, DAL, BLL and UI.
-
4
votes2
answers472
viewsMVC and DAO - Data Rules
In a CRUD where at the time of registration it is necessary to verify if a certain field already exists in the bank, in order not to allow duplicate registration, this rule of verification must be…
-
4
votes1
answer1666
viewsProxy project default, why use?
This proxy pattern example can be found on Wikipedia. reference: http://en.wikipedia.org/wiki/Proxy_pattern What I want to know is this: Why should I use this pattern? When should I use it? Why is…
-
4
votes1
answer551
viewsHow to do multiple inheritance in javascript
I’ve seen a lot of ways to do it inheritance in javascript, but do not know how to do inheritance-multiple I will demonstrate an example of the problem: function Transporte() { var nome;…
-
4
votes1
answer393
viewsIs it correct to declare GET/SET methods within a STRATEGY class?
I was left with a question when I went to create a project pattern of the type Strategy. It is correct to declare methods GET and SET in a class that implements an interface Strategy? I do not know…
-
4
votes1
answer786
viewsWhat is an exponential backoff?
What is? What good is? In which situations to use it? There is only one or several strategy? (Example: Fibonacci backoff)
pattern-designasked 6 years, 3 months ago Gaspar 379 -
4
votes1
answer416
viewsHow to implement the Observer standard in practice, with database?
I’m studying some design patterns, and right now I’m learning about the pattern Observer. I’ve read books, I’ve seen some classes on Youtube, I’ve done the examples and everything. But now I would…
database pattern-design software-engineering observer-patternasked 8 years, 8 months ago Fábio Lima 81 -
4
votes3
answers1162
viewscreate objects dynamically
I’m having a problem in college in software engineering which is the following: I have the following scheme when making the payment of a shopping cart I must know if it is BOLETO or…
-
4
votes1
answer66
viewsCan any project be suited to the principles preached by SOLID? What are the steps to this?
I am trying to adapt one of my projects to the standards of SOLID, but I’m not getting out of ground zero. The project in question can be found at: https://github.com/crphp/webservice After some…
-
4
votes2
answers123
viewsHow does a method with the same name return more than one object type?
I am implementing the Google Drive API and I came across the following situation: var fileMetadata = new GoogleDriveAPIV3.Data.File() { Name = "folderTest/testeUpload.jpg" };…
-
4
votes1
answer3026
viewswhat is a service and what is its difference to a controller?
I have read many articles and seen many lessons on Java and lately I come across a lot with the concept of services and controllers, I have the clarity of the role of the Controller within an MVC…
-
4
votes1
answer147
viewsInjection of dependencies into functions and not classes. Is it "wrong"?
It is not new that the concept of dependency injection is almost directly related to classes. Tell me "dependency injection" and I can imagine the following: // services/UserService.ts export…
typescript pattern-design encoding-style dependency-injection iocasked 5 years, 4 months ago Luiz Felipe 32,886 -
4
votes2
answers256
viewsWhat is the relationship between software architecture and Patterns design?
What is the difference and similarities between software architecture and Pattern design? I did some research on Wikipedia and they looked very different: Model-View-Controller Architecture…
-
4
votes1
answer80
viewsUsing the Strategy standard when it affects other parts of the system
... serves to define a family of algorithms, encapsulate each of them and make them interchangeable. Strategy allows the algorithm to vary regardless of the clients using it. Okay, I get it. But…
-
3
votes4
answers671
viewsCan I use Repository to do the BLL part?
I was reading about Repository vs Dao and I saw the following sentence: [...] The Repository standard aims to support the Domain model providing persistence. Unlike DAO, which is an object of…
-
3
votes3
answers849
viewsDELPHI MVC (ECB)
I would like to know if anyone knows how to implement Pattern MVC (ECB) in Delphi. Usage Delphixe5 And I would like to make it as scalable as possible, and I know that one of the solutions is to…
-
3
votes1
answer338
viewsWhat is the design pattern to use to save objects that have similar ways to save?
I have this doubt because if I am not mistaken I have read, seen, or even implemented something of this type but I am no longer remembering, it is the following: I have here an EJB project with…
-
3
votes2
answers46
viewsDoubt with syntax
Simple doubt. Usually I see this syntax: require('../lib/dbconnect')(config); But I don’t understand why I use those parentheses like that (....)(....); Can someone explain to me what this is all…
-
3
votes1
answer257
viewsInheritance with Repository Pattern
I’m studying and trying to implement the Repository Pattern in C# however I am having some difficulties in solving certain problems with inheritance among my classes of Repository, for example the…
-
3
votes1
answer167
viewsMVC# - Mongodb 2.0 dependency injection
I’m starting a project using MVC 4 with Driver 2.0 of MongoDB. I’m used to using Ninject with EF6 and would like to know if there is such a thing as MongoDBor some example architecture standard for…
c# pattern-design mongodb dependency-injection mongodb-csharpasked 8 years, 10 months ago Jhonathan 1,399 -
3
votes1
answer256
viewsDoubts about implementation of Lazy Load and Dependency Injection
The scenario is simple, it has a Personal Physical class that has linked to it a list of Contacts (instances of physical persons), Telephones (instances of an entity Telephone) and a list of…
c# asp.net pattern-design dependency-injection lazy-loadingasked 9 years, 7 months ago Intruso 1,625 -
3
votes1
answer238
viewsHow could I implement Command (Design Pattern) in this work?
I’m doing a work in Java, where we should implement 3 Design Patterns from the software we created earlier. The software I created is basically a CRUD for movies. In one tab, you add (Insert) and…
-
3
votes1
answer47
viewsHow does Pattern Object Linked to Other Objects work?
What is Pattern OLOO? How does it work? What is its difference to Prototype Pattern? What is the advantage of using each one?
-
3
votes1
answer569
viewsjQuery ajax, asynchronous encapsulation
I like encapsulation because it greatly reduces the source code, I have done the following about ajax: custom.ajax=function(obj,funcao,view){ // FUNÇÃO AJAX var data = {'obj':obj,'funcao':funcao};…
-
3
votes1
answer54
viewsFor an unordered set of listeners what is the best java.util.Set implementation to use?
I’m developing a Handle to a data stream, where periodically events will be launched that are to be captured by a small set of Listeners from 1 to 5 listeners. This set of listeners do not need to…
-
3
votes1
answer587
viewsImplementing a CRUD class
I have a class CRUD which has the following methods: Get connection() Insert($object) Update($object) Delete($object) Select($object) Taking into consideration the SRP (Principle of Sole…
-
3
votes2
answers122
viewsIs it correct in MVC to access data within the model?
In a C# MVC project, it is correct to access data within the model? For example: public class Cliente { public int Id { get; set; } public string Nome { get; set; } //outros atributos... public void…
-
3
votes1
answer222
viewsPage Controller Pattern vs Front Controller
What is Page Controller? What is Front Controller? From what I read, page controller means a controller that is embedded in the html/jsf page facelet. However in the Front Controller the controller…
-
3
votes1
answer141
viewsIs there a pattern similar to Singleton?
It’s really frustrating, a little interesting maybe, but frustrating above all, just yesterday I figured out how and why to use the pattern Singleton, And today, as I was about to finish a little…
-
3
votes1
answer353
viewsAggregation and composition in various relationships
Given a class A, let us say that the relation between this class A and a class B is composition, where A is the class "all" and B is the class "part". Given a third class C, can there be another…
-
3
votes1
answer1118
viewsWhat is the difference between VO (Value Object) and DTO (Data Transfer Object)
What is the difference between a VO and a DTO, and how to identify when to use each one?
-
3
votes1
answer141
viewsWhat is the difference between Strategy Pattern and Specification Pattern
I’m implementing a app CLI in C# of old game and wanted to know which is the best Pattern to use to make the "AI" that would be the player vs computer in the case. I’ve been looking at some Patterns…
-
3
votes1
answer141
viewsWhat to test/implement in a viewmodel?
I am trying to implement a standard MVVM (Model - View - Viewmodel) that is related to MVP. Since Viewmodel, by my understanding, is responsible for "passing" the data from the View layer to the…
-
3
votes1
answer104
viewsDealing with nested objects (nesting) using a ORM
Let’s assume that in a system for a bus company I have entities: Line, car and travel. Each one has three classes: The entity itself, class Linha extends Model { protected $id; // outras…
-
3
votes1
answer336
viewsImplementation of Abstract Factory, Factory Method and Adapter standards
I read the following sentence: Abstractfactory defines an interface for creating a family of related or dependent products without you having to explicitly specify the classes. Consider the…
-
3
votes1
answer83
viewsPossibility of application of design standard
After a login effective in the application I am building I return a boolean[] with all the accesses that the user has. // Armazena o controle de acesso do usuário LoginDAO logindao = new…
-
3
votes1
answer770
viewsStrategy Pattern with Spring Boot
I’ve been looking for solutions for Strategy Pattern with spring boot, but nothing I’ve found so far seems performatic or even functional. I have an interface like: public interface UserService {…
-
3
votes2
answers122
viewsWhat is it for { } inside the main
I came across a situation in C that I do not know and had never seen anyone use before. Within the method main() there are several keys, I believe that to isolate the code but there is a same…
-
3
votes2
answers82
viewsHow to instantiate Strategy objects
Consider the basic implementation of the standard Strategy. public class Context{ private Strategy strategy; } public interface Strategy{ void algoritmo(); } public class ConcreteStrategyA…