object-design

Is a static class appropriate when state is immutable?

Let's say I have a simple class called WebsterDictionary that has a function that can take a word and return its definition. Perhaps there is another function that can take a definition and return a word. The class is used all the time by many clients. To facilitate the lookups, the class contains a member variable that is an in-memo...

Advice on Linq to SQL mapping object design

I hope the title and following text are clear, I'm not very familiar with the correct terms so please correct me if I get anything wrong. I'm using Linq ORM for the first time and am wondering how to address the following. Say I have two DB tables: User ---- Id Name Phone ----- Id UserId Model The Linq code generator produces a bun...

Object Design: How to Organize/Structure a "Collection Class"

I'm currently struggling to understand how I should organize/structure a class which I have already created. The class does the following: As its input in the constructor, it takes a collection of logs In the constructor it validates and filters the logs through a series of algorithms implementing my business logic After all filterin...