1
vote
3answers
139 views

Am I violating LSP if the condition can be checked?

This base class for some shapes I have in my game looks like this. Some of the shapes can be resized, some of them can not. private Shape shape; public virtual void SetSizeOfShape(int ...
0
votes
1answer
81 views

Passing in config values to a method using SOLID principles

I have an email helper class that has a method that sends email: private static class EmailHelper { public static void SendEmail(string from, string to, string subject, string message) { ...
1
vote
3answers
257 views

Gathering IP address and workstation information; does it belong in a state class?

I'm writing an enterprisey utility that collects exception information and writes to the Windows Event Log, sends an email, etc. This utility class will be used by all applications in the corporation: ...
1
vote
0answers
121 views

How much segregation is too much in this design?

We are working on ASP.NET webforms application developed using WCSF (MVP pattern). In the application, there is a search screen that allows the user to enter some fields and display the results. We ...
3
votes
2answers
364 views

Implementing the Interface Segregation Principle

Does this IConvertible interface satisfy the Interface Segregation Principle (ie. the "I" in SOLID)? Here is the definition: public interface IConvertible { TypeCode GetTypeCode(); bool ...
2
votes
4answers
230 views

Why should IQueryProvider implementations throw NotSupportedExceptions?

Searching the web, we can find plentiful examples of various ORMs (nHibernate, EF, LinqToSql, etc.) that implement but don't actually support the full IQueryable<T> interface, throwing ...
3
votes
3answers
1k views

SOLID Application Structure and Design

A one possible structure for an application is to have it broken down into modules such as Data Access, Core, Services, UI. Now depending on what type of ORM you are using Data Access layer will have ...
112
votes
6answers
10k views

SOLID Principles and code structure

At a recent job interview, I couldn't answer a question about SOLID -- beyond providing the basic meaning of the various principles. It really bugs me. I have done a couple of days worth of digging ...
2
votes
1answer
211 views

Creating an interface of interfaces

Background: We have a class that both listens on a socket and sets values on itself based on what it reads off the socket. I believe that adheres to SRP. To adhere to ISP we created one interface ...
0
votes
1answer
113 views

What are the reasons for rebuild and redeployment libraries?

It's difficult to understand the meaning of the question from the topic's name. Here is what I mean. I'm watching Uncle Bob's Clean Code Episodes. In many episodes where he is talking about SOLID ...
3
votes
2answers
276 views

Can I apply SOLID concepts to entire solution designs rather than just the internal components?

So maybe the quick answer is 'Yes' absolutely (or no I suppose), but let me explain my question angle to get a better derived answer. We all commonly use SOLID design principals when making up the ...
5
votes
3answers
1k views

What should I name this helper class? [closed]

Usually when writing unit tests I create a helper class with extension methods. I use these methods exclusively for generating generic data for things that I am too lazy to type out. I usually name ...