Skip to main content

Questions tagged [design-patterns]

For questions requesting extra attention to be paid to the usage of design patterns in the code.

81 votes
6 answers
233k views

I would like to know if my approach is correct and how could it could be improved? Also, is there a way to get rid of the relation between the Piece and the ...
SummerCode's user avatar
70 votes
4 answers
59k views

I am about to >explode< :) due to amount of reading on this subject... My head hurts, and I need some honest opinions... There is a similar question/review that I noticed, but I believe my approach ...
zam6ak's user avatar
  • 811
51 votes
3 answers
109k views

I use the Repository/Service design pattern in my projects and I have found something that might be a bit redundant. Am I writing any unnecessary code? With that in mind, here is my structure: <...
user avatar
38 votes
2 answers
3k views

I've seen many, many UoW+Repository implementations. Whenever one was built on top of Entity Framework, I'd cringe at the added complexity. Sure the complexity buys you (sometimes) full decoupling ...
Mathieu Guindon's user avatar
37 votes
2 answers
106k views

Thought 1 ...
ashutosh raina's user avatar
33 votes
5 answers
1k views

I'm creating a system to generate math problems. As you know in mathematics, there are several different kinds of problems: Binary problems, fractions, decimals, comparating two numbers, etc. I'm ...
Darf Zon's user avatar
  • 561
29 votes
2 answers
91k views

In this new project I'm working on I need to create objects on runtime by data from the DB, right now I have two groups of classes, each group implementing a different interface. I started working on ...
Mithir's user avatar
  • 403
28 votes
2 answers
16k views

Given my IUnitOfWork interface using System; public interface IUnitOfWork : IDisposable { void Commit(); } I then ...
Issa Fram's user avatar
  • 409
27 votes
3 answers
2k views

I am trying to learn PHP in depth by creating this personal CMS. I try to utilize OOP concepts and do best I can... The way I am trying to design this CMS is to keep including 'modules' within a page ...
HelpNeeder's user avatar
26 votes
4 answers
2k views

Inspired by this question, but hopefully not a duplicate. I understand that the Law of Demeter is very useful in case of services interacting with other services, for example it's much easier to mock ...
Bolo's user avatar
  • 588
25 votes
6 answers
2k views

I am trying to create a library of my own which contains (among others), a class called Point. As the name suggests, it is intended to encapsulate a point ...
Hungry Blue Dev's user avatar
25 votes
1 answer
11k views

I've recently picked up the Head First Design Patterns book in an effort to become a more efficient and better Python programmer. Unfortunately, the code examples in this book are in Java. I'm not ...
PythonJin's user avatar
  • 505
25 votes
1 answer
5k views

I wrote a simple, 2-player Pong game for a Udacity Nanodegree in C++. The program has the following class structure (relatively new to UML so any tips on here would be very much welcome too): ...
Eon's user avatar
  • 351
25 votes
4 answers
14k views

I'm trying to design a well defined yet simple interface for the unit of work and repository patterns. My UoW's are exposed to services and services then "get repositories" that it needs to query. I ...
TheCloudlessSky's user avatar
24 votes
1 answer
17k views

I am writing a WPF application that needs to access information from a database (I am currently using Entity Framework code first, so data access is via DbContext). ...
Benjamin's user avatar
  • 453

15 30 50 per page
1
2 3 4 5
96