2,557 reputation
717
bio website
location
age
visits member for 3 years, 2 months
seen yesterday

Sep
8
comment Allow entities owned by one user to be referenced by other users' entities
We have some DB-level uniqueness constraints (in addition to the PKs and FKs) and we programmatically verify uniqueness of user entry. So you could do this on name & coordinate , in combination or not. In the UI maybe couple that to a ComboBox of existing EventAreas constrained geographically(?); and/or perhaps dynamically update the list as the user types. Our UI has a custom class - a textbox & popup fusion - the popup is practical for very long lists and is scrollable and filterable.
Sep
8
answered Allow entities owned by one user to be referenced by other users' entities
Aug
16
answered Can't understand on how to implement MVP/MVC for my software requirements
Aug
13
revised Which pattern is suitable to send multiple type of responses through REST web service?
added 5 characters in body
Aug
13
revised Which pattern is suitable to send multiple type of responses through REST web service?
added 284 characters in body
Aug
13
answered Which pattern is suitable to send multiple type of responses through REST web service?
Aug
11
comment Should an abstract class always abstract its methods to an interface?
+1 @Travis comment-link. "abstract classes should always abstract their functions to an interface". By Grapthar's hammer, this shall not pass! It's object oriented Jim, but not as we (should) know it. Resistance is not futile!
Aug
11
comment Inheriting from Abstract class vs Enum Types for custom exceptions
"Inherit from Abstract Class" but we're discussing interface, i.e. the C# keyword yes? So why not a templated abstract class? The virtual methods are called within the abstract "code framework" and give the Director context for knowing what exception to throw. You may have to design a ReturnResult class so the communication is rich enough to make intelligent decisions; that is to say, object oriented. This does not have to conflict with @Magus comment, that I up-voted.
Aug
10
comment Assigning responsibility for cancelling an Order
@cbojar; "OrderProcessor" - fully agree. As for "god object", that was not meant to be technically accurate.
Aug
10
answered Assigning responsibility for cancelling an Order
Aug
7
answered Extending a struct. Using helper classes rather than composition
Aug
7
comment How do you make a service stateless?
@Songo, the goal is to not have any class variables holding onto any objects. But it's being returned and can't set it to null. We could have used ref parameters if we felt that was an issue to resolve.
Aug
6
answered How do you make a service stateless?
Aug
2
comment Why does C# allow properties in interfaces?
+1 Properties are methods! yes! I like writing Propertymethods but code-reviewing co-workers don't see it that way and we really miss opportunities for some nice expressive encapsulations in our programs.
Jul
30
comment What is meant by “OOP hides the state”?
Alan Kay said if you're changing state directly, i.e. exposing properties, you're doing it [OO programming] wrong. Ditto. How many times have a thought, "how was it I was supposed to know to set these properties before I called that method? Thank goodness for copy and paste!"
Jul
29
comment Are null references really a bad thing?
Nulls aren't so bad, they're just coded that way
Jul
29
comment Are null references really a bad thing?
+1 @Huperniketes: you should create a new class of types to implement the semantic model with that meaning. Mega-dittos. We have very wet, and too often broken, string manipulation everywhere. And a domain concept of grouping quantities by "box", "dozen", "each", etc. that has been broken for years that even after a deliberate fix effort there still is not a definitive class! I've observed a prevelent oddity: once a programmer hits primitive types for representing domain stuff, he backs up one thought-level, ram-dumps all OO thinking, and begins coding.
Jul
28
answered Domain-specific Interfaces
Jul
27
comment Generally speaking, is it better to make all the functional parts or get UI working first - or a mix of the two?
+1 to @Alexander comment. But an Agile approach, at least, to developing functional bits. And a "bit" does not have to mean a complete, fully functional, screen.
Jul
23
comment Object Design & Cohesion - Issue & potential refactoring
Wishful Thinking Design: Design data structures and other classes to be the way you wish it was. Then code as needed to transliterate. Once in the optimal form, it's easy-peasy(ish) to code sling cleanly, understandably, and error free. Example: I needed to handle 5 different data formats in a homogeneous way. I wrote a single class, & a single collection class, with the common properties and key value properties for every data form. I implemented IEqualityComparer<T>. Now each object "was a T" and yet had unique Equals() implementation