0
votes
1answer
77 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
4answers
245 views

Circular dependency and object creation when attempting DDD

I have a domain where an Organization has People. Organization Entity public class Organization { private readonly List<Person> _people = new List<Person>(); public Person ...
2
votes
2answers
131 views

Refactoring sought for replacing shared data types in .NET component

I am in charge with updating a software product that is made up of two components the Controller process and the UI process. The Controller and the UI communicate via XML messages. Furthermore, the ...
2
votes
2answers
230 views

Pattern for multiple datasources

I've already read this question on CodeReview. I was hoping for general advice. I'm writing a service which will go to numerous data sources. Each source requires getting copious amounts of data ...
6
votes
4answers
658 views

.NET Programming and POCO classes

I was having a think tonight while pondering over some application I need to change and it got me thinking. Entity Framework Entities are POCO (Plain old CLR Objects) and models used in ASP.NET MVC ...
2
votes
7answers
508 views

Is there a pattern to restrict which classes can update another class?

Say I have a class ImportantInfo with a public writable property Data. Many classes will read this property but only a few will ever set it. Basically, if you want to update Data you should really ...
0
votes
2answers
546 views

Memory allocation of Classes that don't have any global data and locks

static void Main(string[] args) { var c2 = new Class2(); var c3 = new Class3(); var c1 = new Class1(c2, c3); c1.Method1(); } class Class1 { ...
1
vote
4answers
537 views

How do you evaluate learning C# from videos for a beginner? [closed]

I have an idea about programming in general so I know what a variable and a method is but I didn't program before. I liked C# because of Visual Studio and I only tried Hello word program in it. I ...
8
votes
3answers
401 views

Using a Public Property AND a Public Field

Where I work, using Properties are discouraged. We have code generation tools to "speed things up". All object data ends up being Public fields. If you request properties anyway, you get something ...
4
votes
6answers
712 views

Do delegates defy OOP

I'm trying to understand OOP so I can write better OOP code and one thing which keeps coming up is this concept of a delegate (using .NET). I could have an object, which is totally self contained ...
2
votes
3answers
692 views

what's a good approach to working with multiple databases?

I'm working on a project that has its own database call it InternalDb, but also it queries two other databases, call them ExternalDb1 and ExternalDb2. Both ExternalDb1 and ExternalDb2 are actually ...
3
votes
2answers
550 views

MVC framework that uses classes instead of methods for actions

In most MVC frameworks, Controller class contains multiple methods, each representing one action. Then annotations and reflection is used to call those methods appropriately. But from OOP point of ...
2
votes
2answers
157 views

Exposing a Disposing event

I'm implementing a .NET class which implements IDisposable. After being disposed, the object's state is invalid and so nobody should be accessing it, of course. There are some situations where two ...
0
votes
2answers
159 views

Implenting ActiveRecord with inheritance?

I recently converted an old application that was using XML files as the data store to use SQL instead. To avoid a lot of changes I basically created ActiveRecord style classes that inherited from the ...
2
votes
5answers
1k views

I feel unprepared to start my first job out of college… how can I improve? [closed]

I just graduated from university with a degree in Computer Science/Engineering and was fortunate enough to land a job working in the pharmaceutical industry as a developer. My title is System ...
6
votes
6answers
884 views

How is encapsulation used for safety?

I am learning OOP. I have studied much about encapsulation but the more I read the more I became confused. I understand we hide (by making private) data and expose it to user of class (other ...
7
votes
3answers
3k views

websites that show real world scenarios for OOP beginners so that they can implement them

Since programmers learn more by implementing the real world scenarios rather then by gaining theoretical knowledge and concepts about programming, I wanted to know that is there any website that tells ...
3
votes
4answers
300 views

As a tooling/automation developer, can I be making better use of OOP?

My time as a developer (~8 yrs) has been spent creating tooling/automation of one sort or another. The tools I develop usually interface with one or more API's. These API's could be win32, WMI, ...
1
vote
1answer
723 views

Cheat notes for telephone interview (.NET /DBs, OO)

I am preparing for a telephone interview. I am thinking that instead of trying to memorize SOLID or ACID for example I could have some cheat notes ready. So: Any tips on how to organize them? Where ...
2
votes
2answers
253 views

Putting it all together

I've been reading a few books on c# development over the last few months (clr via c#, architecting applications for the enterprise, c# 4 in nutshell just to give you an idea). I really feel it's been ...
5
votes
3answers
442 views

Architecture Question

I am writing a rules/eligibility Module. I have 2 sets of data, one is the customer data and the other is the customer products data. Customer data to Customer products data is one to many. Now I ...
2
votes
3answers
324 views

Want to know performance issues of Class types & access modifiers

Someone suggested me to mark classes as SEALED that are not being inherited anywhere. I was using default style and was not concerned with the type of class. At present I don't have a benchmark tool ...
4
votes
2answers
187 views

Is it better to load up a class with methods or extend member functionality in a local subclass?

Which do you like better? Class #1: public class SearchClass { public SearchClass (string ProgramName) { /* Searches LocalFile objects, handles exceptions, and puts results into m_Results. ...
12
votes
6answers
3k views

Convert from Procedural to Object Oriented Code

I have been reading Working Effectively with Legacy Code and Clean Code with the goal of learning strategies on how to begin cleaning up the existing code-base of a large ASP.NET webforms application. ...
7
votes
12answers
854 views

Any recommendations on a good Objected-Oriented book [closed]

I'm looking to really grasp OO once and for all. Any recommendations on a good Objected-Oriented book? I program in .Net, so if it's .Net oriented all the better. Regards,
8
votes
5answers
3k views

Why C# doesn’t support multiple inheritance?

Even if it could be bad practices, I would say that there is time that it would fulfill its purpose.