378 reputation
111
bio website
location Wales, UK
age
visits member for 1 year, 11 months
seen Aug 20 at 8:10

Sep
11
awarded  Popular Question
Jul
2
awarded  Curious
Apr
25
comment Inheritance/OO design question
Your approach came to mind when I first started this application. Rather than strictly adhering to the rule that a class should contain both data and behaviour, I wanted another class to be responsible for turning switches on and off. This seemed a more natural fit for my scenario - there are various dependencies involved in controlling a switch (e.g. writing to a serial port), and passing these to a whole load of "model" classes didn't feel quite right. Unfortunately the OO purists where I work won out, so I'm stuck with putting the behaviour in the class.
Apr
25
comment Inheritance/OO design question
I toyed with the idea of generics but it's likely there could be further levels of inheritance (e.g. something inheriting from TemperatureSwitch). While it's still possible, it does result in an explosion of <TConfig> parameters everywhere. Something to bear in mind though.
Apr
25
accepted Inheritance/OO design question
Apr
25
comment Inheritance/OO design question
@Euphoric see my comments on the answer from Geerten below.
Apr
25
asked Inheritance/OO design question
Mar
18
awarded  Tumbleweed
Mar
11
asked OO design for client-server/RPC/n-tier data transfer (specifically SignalR)
Mar
7
accepted Object behaviour or separate class?
Feb
24
accepted OO design for a Windows application that communicates with an external machine via RS232
Feb
24
comment OO design for a Windows application that communicates with an external machine via RS232
Some useful comments thanks. It's funny how one can get bogged down over-thinking a design. I was dead-set on having a "SystemController" class (mirroring the physical entity) that contained the logic for reading and writing registers - hence the second part of my question asking if the "Register" class was necessary. Couple this with some kind of "register provider" that lets a consumer retrieve an instance of a Register based on a given string alias, and I should be sorted.
Feb
21
revised OO design for a Windows application that communicates with an external machine via RS232
added 39 characters in body
Feb
21
asked OO design for a Windows application that communicates with an external machine via RS232
Jan
14
awarded  Popular Question
Nov
4
awarded  Popular Question
Oct
15
awarded  Yearling
Sep
4
comment Is a NoSQL database suitable for me?
I started with SQL and EF as this is what I know best, but I'm finding EF to be painful with regards to loading and saving one big graph. In answer to your questions, yes it's a very deep hierarchy with a single root that will be retrieved and saved all at once. My only speed concern is with regards to the search functionality. Not fully understanding how NoSql works, I'm assuming they employ some kind of indexing rather than have to load each graph in order to search. The users wouldn't want to be waiting "seconds" for search results to be returned.
Sep
4
asked Is a NoSQL database suitable for me?
Jul
10
comment When to use interfaces (unit testing, IoC?)
@Spoike so are you making your VM methods public just to make them accessible to our unit tests? Perhaps that's where I'm going wrong, trying to hard to make everything internal. I think that my hands might be tied with Moq though, which seems to require classes (not just methods) be public in order to mock them (see my comment on Telastyn's answer).