0
votes
2answers
210 views

how to approach pharmacy software project [on hold]

I would like to complete a pharmacy software proof concept. But I have a few questions I do not know. Physician information In order to refill or dispense a new RX the software needs to have access ...
4
votes
5answers
1k views

Is this a good practice or not?

I have a colleague who has come up with a way of 'genericizing' information from a database so that all his web application's drop-down lists can share the same object in his MVC.NET C# code and ...
1
vote
3answers
100 views

Passing two different types down a chain of calls because of an overload further down

I've got myself into a bit of a mess. I've got code coming from Main, through myMethod and down to OtherMethod. One of the parameters can be either an int or a string, which affects OtherMethod but ...
0
votes
2answers
50 views

Maintaining sequence number for the day while creating file from windows service

I have a windows service which invokes a dll periodically and creates files. The file names should be in sequence. Example files will be myfile1.txt, myfile2.txt....mfilen.txt. The number will ...
0
votes
2answers
213 views

How to design console application with good seperation of UI from Logic

Is it considered an overkill for console application to be design like MVC , MVP or N tier architecture? If not which is more common and if you can link me to simple example of it. I want to ...
2
votes
1answer
185 views

Best practice to collect information from child objects

I'm regularly facing following pattern: public abstract class BaseItem { BaseItem[] children; // ... public void DoSomethingWithStuff() { StuffCollection collection = new ...
0
votes
0answers
102 views

Architecture or Pattern for handling properties with custom setter/getter?

Current Situation: I'm doing a simple MVC site for keeping journals as a personal project. My concern is I'm trying to keep the interaction between the pages and the classes simplistic. Where I run ...
0
votes
1answer
85 views

How to employ amatuer knowledge of software architecture and design in an agile manner? [closed]

I have a problem when designing any application that is either greenfield or a refactored brownfield due to often finding a potential flaw or an uncertainty with the design or architecture that I ...
1
vote
1answer
85 views

Collaboration between a Graphic Designer and Expression Blend developer? [closed]

I'm new to the programming world and also a little bit confused. My brother would like to work with me on some program. I'm a graphic designer so he asked me for UI and all it's elements. I would ...
0
votes
3answers
249 views

How to design an IDisposable that unconditionally needs to be disposed?

Consider a class that implements IDisposable, and that has members in such a way that it will never become eligible for garbage collection when it is not disposed. And as it will not be garbage ...
0
votes
0answers
40 views

Sproc chaining verse discrete calls from OO code

I'm currently working on a change at work to generalize a function that was sloppily coded up to work for a particular use case. The function calls a particular sproc that checks if an entity exists ...
0
votes
2answers
74 views

Container/Item pattern without `friend`

I have a class Container containing objects of type Item. They are different classes, and especially they have no common base class (e.g. a Container does not itself have a Container).: class ...
1
vote
1answer
158 views

Designing software functions which are both pausable and restartable

Consider the following situation: One hardware device, two applications (1 C# application, 1 Firmware). The C# application sends frames to the firmware and the firmware executes scripts. C# -> ...
0
votes
2answers
179 views

Data structures VS Classes and what happens if they merge? [closed]

Alright so I've learned this: Classes have public methods that perform operations on the class's data and they hide away their implementations. Data structures on the other hand, completely expose ...
1
vote
1answer
189 views

Separate namespace just for exceptions?

I was doing a code review and came across something odd which I've never seen before. The developer decided to create a sub-namespace just to contain all the assembly's exceptions. I thought I had ...
2
votes
3answers
431 views

Empty virtual method on base class VS abstract methods

I couldn't find a question that was not too specific to some case, so I'll try to make this very generic. We need an extractor base class to a set of documents, for example. Each document has its ...
2
votes
2answers
206 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 ...
0
votes
0answers
66 views

Inputs and outputs to a method mixed in the UI

I am designing the front end of an WPF application using MVVM where basically all we are doing (for now) is calling a method with some inputs and displaying the outputs. There are two types of ...
2
votes
4answers
236 views

What are some good ways to represent relationship among three numbers

I'm trying to find a clean, intuitive way to implement this problem. Basically, I have three numbers, and based on relationship (less than, greater than, and equal to) among these numbers would change ...
0
votes
3answers
321 views

Interfaces vs Base class [duplicate]

I'm strugging to know when to use a base class with Polymorphism or an interface. Providing my object exposes DoThis() then I can't see why it matters if it's an interface of a base class. Please ...
1
vote
2answers
271 views

What is best software design in creating methods?

I had created a extension method which extended the string type in C#. // actually checks if the string is empty or null and then looks up the default // promotion code which is set in the backend ...
1
vote
1answer
233 views

Unit testing methods with logical dependencies on other classes

Suppose I have an interface declaring the following method signature: SearchResults SearchProducts(string type, string filter, string anotherFilter); Inside a concrete implementation of this, I ...
0
votes
3answers
135 views

Is it better expose a collection or an API to the collection?

Take for example the following: public interface IManager { void AddItem(CollectionItem item); void RemoveItem(CollectionItem item); } public interface IManagerCustomCollection { ...
0
votes
0answers
33 views

C# Code Design Issue [duplicate]

I am building a small application and I am trying to understand the best way to approach the design. I am looking for some guidance/advice how best to approach the following issue. Please bear with ...
3
votes
1answer
309 views

State pattern vs Inheritance

In the following image for the State Pattern from Applying Domain-Driven Design and Patterns: With Examples in C# and .NET I'm trying to persist the SalesOrder entity into the database. Normally I ...
0
votes
0answers
83 views

Script files as resource or solution project?

I've written a program for another group within my company that uses scripts. These scripts are user selected by the use of two drop down lists: category and name. Currently the application uses an ...
8
votes
5answers
609 views

Should I write an interface API before an implementation?

I've been delving into more "organized" programming recently and I've been learning that I should be programming to an interface, not an implementation. With that in mind, would it be better to ...
0
votes
1answer
581 views

Should we always write Defensive null check in code? [duplicate]

Are there any scenarios where we should not write defensive checks for null? Should we write defensive code or check for NULL every time we have passed a parameter or received a value back from a ...
0
votes
2answers
212 views

Is navigate between more than one class a bad practice? [duplicate]

I have the following class with the following function (some implementation details have been skipped): public class TitleScreen : GameScreen { public Texture2D titleScreen; public override ...
0
votes
1answer
501 views

State design pattern: best implementation for my case?

Me and a mate have a discussion about what would be the best way to implement the pattern state for managing several screens for an application we are developing. We have a ScreenManager (I guess the ...
1
vote
1answer
305 views

Interface Dependencies or Abstract Classes

I have a decision to make and I am wondering what would be the better solution. I am refactoring an older application and intend to really get into the nuts and bolts of it. There are 8 report types ...
4
votes
5answers
532 views

How to model an address type in DDD?

I have an User entity that has a Set of Address where Address is a value object: class User{ ... private Set<Address> addresses; ... public setAddresses(Set<Address> ...
1
vote
3answers
421 views

C# vector class - Interpolation design decision

Currently I'm working on a vector class in C# and now I'm coming to the point, where I've to figure out, how i want to implement the functions for interpolation between two vectors. At first I came up ...
0
votes
1answer
5k views

Why would one prefer C# (ASP.NET MVC) or Java (JSP) instead of PHP for web applications/projects [closed]

I'm wondering, why would one (consider it not just a single developer, but a company) prefer C# or Java for web applications? What's their considerations regarding the question. I mean, a company, has ...
0
votes
1answer
86 views

Choosing which application instance will do the updates when dealing with multiple workstations w/o server involved?

So, I've got an interesting design problem and I honestly don't know how to tackle this. I have an application that will be ran on a dozen of workstations. Of those workstations, it is impossible to ...
0
votes
1answer
654 views

C# Design for SQL connection and commands

Currently I'm working on system that works with database, and I would like to have it done elegant way. So I have abstracted DBConnection into one class, DBCommands into another class. (DBCommands : ...
1
vote
1answer
230 views

Task Consumer/Processor architecture

PROBLEM We have various tasks in our system which can take up to 20 minutes. These tasks are generally started from the web interface and run on a new thread. This is obviously a terrible solution ...
1
vote
3answers
216 views

How do I support interfaces for different devices in the same input scenario?

I asked this question on SO but someone pointed out that I would be better off here. He's most likely right. So here I go! So I just wanted an opinion. I have 2 different ways to approach the ...
3
votes
2answers
528 views

Confusion with Factory pattern regarding Liskov's Substitution Principle, code maintainability and Unit Testing?

I have a confusion regarding Factory Pattern there are basically two ways You can implement that. Approach 1: public interface IProductFactory { IProduct GetProductA(); IProduct ...
9
votes
4answers
433 views

How would I design an interface such that it's clear which properties may change their value, and which will remain constant?

I am having a design issue regarding .NET properties. interface IX { Guid Id { get; } bool IsInvalidated { get; } void Invalidate(); } Problem: This interface has two read-only ...
2
votes
1answer
801 views

Building a strong robust client-server system

I need some help with regards to implement a pre-designed system that has 4 components and several constraints. I've spent approximately 50 hours trying to determine the best way to build this system; ...
1
vote
4answers
466 views

How to figure out design pattern for this particular solution?

While working on a project I've come up with some design solution. I am having a hard time relating it to any general design pattern or analyzing this situation in details. This is also prohibiting me ...
3
votes
4answers
665 views

What would the general design for an XSD to C# class converter look like?

I am looking to create a simple code generator to convert XSD definitions to C# classes. This is partly as a learning exercise, but I would also like to get some practical use out of it eventually. ...
1
vote
3answers
379 views

Monitoring App: Client side or Server Side?

I have a monitoring web application which has a .Net Backend and a Silverlight frontend. The application crunchs big chunks of data, process them and presentates to user. Then user can interact with ...
0
votes
4answers
391 views

substitute for static inheritance

I currently have a number of classes (~20) that all do the same thing (abstractly), namely, generate an instance of a particular class from an xml file. The way that they use the content of the xml ...
2
votes
2answers
169 views

Notifying a separate application of an event

I have an application that runs through various tasks as an automated process. My client would like me to create a file in a given folder for each task as a way to flag when each task completes. ...
0
votes
0answers
79 views

How do I explain the importance of NUNIT Test cases to my Colleagues [duplicate]

I am currently working in Software Development for applications including lot of Mathematical Calculations. As a result there are lot of test cases that we need to consider. We donot have any NUNIT ...
2
votes
3answers
377 views

Recommened design pattern to handle multiple compression algorithms for a class hierarchy

For all you OOD experts. What would be the recommended way to model the following scenario? I have a certain class hierarchy similar to the following one: class Base { ... } class Derived1 : ...
0
votes
1answer
160 views

Design question on best option to store data on remote computers

I'm making a windows forms application which I want to install on a few computers that are all connected together on a network. Each of these computers have access to a number of servers on which ...
0
votes
3answers
182 views

How to handle complex conditions? [duplicate]

We are working on project where we have to manage these conditions. i.e.: A User can save an order under these conditions: User has permission "SaveOrder" Order is in state "shipped" Online Shop is ...