design-patterns Questions
3
I was recently reading the series on the C++ Source, “A Pause to Reflect: Five Lists of Five”. In Part V, Scott Meyers discusses the Barton and Nackman solution to the units problem. As an embedded...
Stewardess asked 24/2, 2015 at 14:36
6
Solved
I am basically trying to implement a Strategy pattern, but I want to pass different parameters to the "interfaces" implementation (that inherit from the same object) and don't know if this is possi...
Nude asked 24/12, 2009 at 17:29
7
Solved
I am learning STL and design patterns .
i wanted to know is there any document or link that explains how design patterns are implemented in STL
i did the google but not able to get much data
...
Amaryllidaceous asked 23/4, 2010 at 12:34
5
I want to ask about Architectural pattern. I write two snippet code to demo what I ask.
The first way is:
//a method on controller layer (in Spring framework)
@RequestMapping(...)
public ShopDTO f...
Roshelle asked 23/11, 2017 at 13:44
11
Solved
Can/Should I use a LIKE criteria as part of an INNER JOIN when building a stored procedure/query? I'm not sure I'm asking the right thing, so let me explain.
I'm creating a procedure that is going...
Inefficient asked 21/8, 2008 at 16:45
8
Solved
I am struggling to understand how the Single Responsibility Principle can me made to work with OOP.
If we are to follow the principle to a tee, then are we not left with many classes, many of whi...
Fronton asked 3/10, 2017 at 9:19
5
Solved
Basicly I have the following structure in my app:
It would be straightforward to implement such a structure without the abstract class ProjectItem, but in this case I don't know how to implement...
Cleres asked 22/3, 2014 at 11:0
7
Solved
I'm trying to follow the MVVM pattern in a WPF application as good as I can, mainly to be able to create unit tests for my ViewModel logic.
In most cases data binding between ViewModel properties ...
Taxicab asked 2/4, 2011 at 16:34
4
Solved
I want to make class A friend of class B. I want to do this as these interact very much and A needs to change internals of class B (which I don't want to expose using public). But I want to make su...
Equinox asked 22/10, 2009 at 19:34
4
Let us consider following pySpark code
my_df = (spark.read.format("csv")
.option("header","true")
.option("inferSchema", "true")
.load(my_data_p...
Burnie asked 28/3, 2022 at 4:27
15
Solved
// opt_options is optional
function foo(a, b, opt_options) {
// opt_c, opt_d, and opt_e are read from 'opt_options', only c and d have defaults
var opt_c = 'default_for_c';
var opt_d = 'default_...
Editorial asked 7/3, 2012 at 13:31
4
I am pretty much aware about builder pattern. Also already gone through with the builder pattern described in Item#2 in effective java of Joshua Bloch.
Here my question is - Is there any specific ...
Rachealrachel asked 23/7, 2015 at 6:3
9
Solved
So I'm learning about design patterns in school. Today I was told about the 'Prototype' design pattern.
I must be missing something, because I don't see the benefits from it. I've seen people onl...
Boiler asked 14/12, 2012 at 23:30
7
Solved
I have a few questions about the Adapter pattern. I understand that the class adapter inherits from the adaptee while the object adapter has the adaptee as an object rather than inheriting from it....
Anthocyanin asked 29/3, 2011 at 1:41
7
Solved
I have a Python module that contains a number of classes, each representing a particular physical material with its properties (e.g., density, specific heat). Some of the properties are just float ...
Crinkumcrankum asked 19/2, 2014 at 14:31
10
Solved
What is the preferred way to work with Singleton class in multithreaded environment?
Suppose if I have 3 threads, and all of them try to access getInstance() method of singleton class at the same ...
Keelby asked 17/6, 2012 at 14:59
4
I’m currently learning about the Actor design pattern, or model, and it seems quite interesting. However, I’m struggling to find any decent real-world examples of how, or where, this model could be...
Intradermal asked 11/2, 2021 at 11:45
4
Solved
I have been learning about modular monolith project structure in this article: https://codewithmukesh.com/blog/modular-architecture-in-aspnet-core
Most of it makes sense to me but something I don't...
Denitrify asked 7/6, 2022 at 20:10
7
Solved
I am currently working on a project where I have a BankAccount entity for some other entity.
Each bank account is a reference to a bank entity, an account number, and optionally an IBAN.
Now since ...
Spyglass asked 5/1, 2010 at 14:7
3
Solved
What is the Android Compose approach to tile an image to fill my background with a small pattern?
A naive approach for Bitmaps without rotation could be like this:
@Composable
fun TileImage() {
va...
Scrimmage asked 14/5, 2021 at 14:19
4
Solved
As the title states when would you recommend the use of the mediator design pattern and where do you see it used incorrectly?
Aymer asked 17/12, 2008 at 3:46
8
Solved
Recently we had a discussion regarding Data and Behavior separation in classes. The concept of separation of Data and Behaviour is implemented by placing the Domain Model and its behavior into sepe...
Medarda asked 9/7, 2012 at 6:22
30
Solved
Since I started learning F# and OCaml last year, I've read a huge number of articles which insist that design patterns (especially in Java) are workarounds for the missing features in imperative la...
Huang asked 29/11, 2008 at 20:8
40
Solved
Inversion of Control (IoC) can be quite confusing when it is first encountered.
What is it?
Which problem does it solve?
When is it appropriate to use and when not?
Atalya asked 6/8, 2008 at 3:35
7
As a thought experiment on a hobby project, I've been thinking of a way to ensure that this sort of subtle bug/typo doesn’t happen:
public void MyMethod(int useCaseId)
{
// Do something with the ...
Crosseye asked 10/8, 2010 at 11:46
1 Next >
© 2022 - 2024 — McMap. All rights reserved.