Questions tagged as 'design-pattern'

0
answers

Javascript Flyweight object with WeakMap or WeakSet

I want to create Flyweight objects, so I create the object and store its instance in a Map like this: const FlyweightNumber = (function(){ "use strict"; const instances = new Map(); class FlyweightNumber{ constructor(nu...
asked by 19.05.2018 / 16:28
1
answer

Project Command Pattern has no purpose in Python?

The Command Project Pattern provides a way to undock two objects, one that invokes an action from the one that knows how to execute it, but my question is: In python and other languages which functions are first class objects what is the utility...
asked by 25.03.2018 / 07:13
0
answers

Should file addresses be kept in a database when there is a default directory structure?

I have a table where I keep references to files, the columns are: id (auto-incremental) version (char size 3) title description cover (layer address) file (file address) Considering that at most 1 file will be upload...
asked by 20.03.2018 / 00:29
0
answers

About connection class pdo

I'm developing a small project using php with standard mvc and the smarty template engine. I made a connection class without applying any pattern and it looks like this: Class Conexao extends Config { private $bd_host; private $bd_use...
asked by 20.03.2018 / 01:05
0
answers

How to define a type instance in the class diagram?

Assuming there is a class that needs to have an object such as instancia of another class to be true, how to represent it as 'tipo' in a diagram? I tried the following: Is this a good representation? Or is there a cl...
asked by 08.03.2018 / 04:56
1
answer

Doubts Abstract Factory

I have this exercise to do but I am not able to do the implementation Using the Abstract Factory Pattern, deploy java Process Manager and Memory Manager products to Linux, Mac, and Windows operating systems So far I've just been able to do...
asked by 09.11.2017 / 18:20
0
answers

Best way to build a class to execute a SQL package

I am mounting a database access layer and need to access the functions inside a package on the oracle server. The orm already connects to the database and accesses tables and procedures through their respective repositories and entities. I...
asked by 22.09.2017 / 17:33
4
answers

What is dependency injection?

I've heard a lot about dependency injection. The question is: How, when and what to use?     
asked by 10.06.2014 / 15:47
0
answers

objects sharing the same copy of a variable

The goal is to put into practice the concepts I'm learning at MALA GUPTA, 2015 . So the way I found in contributing is to ask the community to implement the concepts in practice. So whoever is interested and wants to contribute and wants to dem...
asked by 03.04.2017 / 02:12
0
answers

How do I define names for system entities?

How to best define names for the entities in my system. I have a user table. And I have a reset_password table where I relate information from the password reset process (id, hash, link_expiration_date, password_refined, new_password, is_user, s...
asked by 29.12.2016 / 17:51