3
votes
2answers
99 views

Design Pattern Question/Violating OCP

Is there a design pattern I can use for a situation like below. This is an example I made up to try and explain the situation I'm dealing with currently. I keep having to add new DeviceScript ...
5
votes
0answers
148 views

Doubts about the quality of an API designed for use with minimal effort

This is going to be long, and I do hope it is going to make some kind of sense; I apologize if it doesn't. I'll try to provide exactly the amount of context that is necessary to understand the ...
3
votes
0answers
524 views

Review of Fluent LinkedIn REST API client interface design

There is a handful of LinkedIn clients written in C# on the NuGet package library, but afaict most only do authentication via LinkedIn. I found a couple which offer a linkedin rest api interface. Of ...
3
votes
2answers
461 views

Business Layer - UI communication

Taking the following cases in consideration. Witch one would you prefer and why? Suggestions appreciated. Using Delegates private void cmdDelete_enterClick(object sender, EventArgs e) { ...
4
votes
1answer
305 views

Is this a good design for a Factory Pattern?

I'm creating a system to generate math problems. As you know in mathematics, there are milles of kinds of problems: Binary problems, fractions, decimals, comparating two numbers, etc. I'm creating an ...
3
votes
1answer
240 views

How to add a new feature to this factory model?

The factory should only have the responsibility of creating instances and knowing what types of instances to create, without having the added overhead of knowing about configurations. With that in ...
1
vote
1answer
141 views

How to add a random feature for a factory design

I'm creating a factory design for math problems. The purpose of the factory is: The problems must be generated with a certain difficulty (or level). To do this, I've got an abstract method called ...
3
votes
1answer
113 views

How to model this design: BinaryProblem

I'm creating a model for Math Problems. This contains always two properties, and has a CorrectResult method which returns the addition of the two numbers. The propeties data types can be decimal, int, ...
5
votes
1answer
665 views

How to improve my factory design?

I'm creating a factory design for math problems. The purpose of the factory is: When the factory initializes, creates in a list some problems (20 initially) If the program wants more than 20, the ...
2
votes
2answers
2k views

Is this implementation of an Asynchronous TCP/UDP Server correct

I am trying to implement a TCP/UDP server so all I have to do is something like this: var server = new Server(Type.UDP, "127.0.0.1", 8888); server.OnDataRecieved += Datahandler; server.Start(); I ...
7
votes
2answers
299 views

Creating simpler fluent interface

I have the following: public interface IBehaviour { event EventHandler Completed; void Execute(); } public interface IBehaviourA : IBehaviour { // Some specific stuff here object A { ...
2
votes
0answers
426 views

MVC folder structure

I currently have a folder structure on my MVC .NET website that I am completely at a loss as to whether it is acceptable or not. Here is an outline of the structure [Areas] [Area1] ...
0
votes
1answer
495 views

Does my Entity Framework 4 Model-First design look ok? Any issues?

I'm very new to entity framework and I've found model-first design is a more preferred way for generating a relational diagram, rather than reverse-engineering an existing schema. I've designed my ...
1
vote
1answer
766 views

Advice on approach to organizing my business logic & data access?

I've been researching various patterns for structuring my business logic & data access, particular in the context of C# and the Entity Framework. I've come up with a basic idea of how I think I'd ...
3
votes
3answers
319 views

Improving the design of this program.

I am trying to design a program that will read a XML file and based on the tag name will perform certain requirements checks. I feel that there is probably a better way of doing this and any comments ...