I'm looking for some good ideas on software design for this problem: A server sends an array of Steps: type StepTypeEnum = 'SECURITY' | 'PERSONAL_DETAILS' | ...
My Factory has dependency on Repository. It calls many methods from Repository. Lets say something like this: class CarFactory { private Repository reposito
My controller looks like this: public function store(Request $request) { $validateData = $request->validate([ 'name' => 'required|u
I am trying to implement an interface and this interface is taken by two concrete classes say class First and class Second, I have another class that takes thes
Leaders in DDD cite the Application Layer as the appropriate place for Transaction Management. For example, from Vince Vaughn: Application Services reside in t
So let's say I have a product order system. I have several classes that may look like this. data class CreateOrderCommand( val productId: String, val produ
I wanted to know the exact difference between method chaining and fluent interface. As I understand it, method chaining is just running the methods of previous
I am trying to build an object that gets its data from external APIs. I will try to explain it with an example: First of all, I get a POST body in my API to cre
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Creational.Builder { public c
Currently I have code like this: for (each item) { if (item == 'x') { print } if (item == 'y') { print } } Now, there is an additiona
I have been looking into cloud firestore as my backend infrastructure. Ive been using realtime database but feel the switch is vital. I have looked at the fireb
I'm trying to model blood flow. As simple as it gets I am trying to have an event (TimerTick) trigger the transfer of a resource object from unit A to unit B, B
Many Architects and Engineers recommend Dependency Injection and other Inversion of Control patterns as a way to improve the testability of your code. There's n
Gang of Four sums up the difference between Template Method and Strategy as follows: Template methods use inheritance to vary part of an algorithm. Strat
I'm trying to implement a Labview-like system (in Java) where some blocks are capable of - Sourcing - Sinking - Passing-through the data. Eve
The internet is full of information about UnitOfWork pattern; even SO is not an exception. I still do not understand something about it. In my understanding Uni
In JavaScript/TypeScript, we have this pattern that is often used in libraries where you have one optional parameter as the last function argument which default
I'm constructing a set of filter-classes which will all have the same method 'Applyfilter'. How should I define the interface which contains apply filter? The o
I am looking at different options for persistence modelling in Windows Phone using Isolated Storage. One of the ideas I have come up with was
I am trying to understand how the context introduced in Golang 1.7 works and what would be the appropriate way to pass it to middleware and to a HandlerFunc. Sh