Tagged Questions
3
votes
1answer
163 views
Naming a sending/receiving module. Does the pattern have a name? [on hold]
I'm working on a simple piece of functionality (actually a ruby gem, but that is beside the point) which can be used to
receive and persist incoming messages
send and persist outgoing messages
...
2
votes
1answer
261 views
What is the pattern called when getters take responsibility for the setting?
I've been heavily using a pattern for years now, but I don't know what it's called.
It looks like this....
class xzy
{
public function getFoo()
{
if ( undefined(this.foo) )
{
...
0
votes
0answers
104 views
Pattern or solution for using classes with different interface the same way
What I would like to achieve is to use classes (now two, later more) with different interface the same way, so I would like avoid using decisions based on the interface on upper levels for instance, I ...
3
votes
2answers
222 views
What is the middleware pattern?
Here's a Ruby poject that implements the middleware pattern. From the description, I have no idea what the pattern is, what it's useful for, and why other solutions wouldn't work as well.
What is ...
0
votes
1answer
91 views
Architecture for writing add-ins for closed-source software
currently I'm designing an add-in for the modelling tool Enterprise Architect. The general architecture is shown in the picture below.
Basically every action where the add-in can react to is ...
0
votes
1answer
54 views
How to record/store edits?
In many programs and web apps (stack exchange included) the program is able to backtrack what edits where made to the piece. My issue is similar: I want to be able to store a "timeline" of edits, ...
5
votes
2answers
423 views
When is Efferent / Afferent coupling good or bad
I have a software patterns exam this week and one of the topics we are to study is Efferent and Afferent coupling.
I understand a package has a high Ce (efferent coupling) if it depends on a number ...
37
votes
2answers
2k views
Are there any OO-principles that are practically applicable for Javascript?
Javascript is a prototype-based object oriented language but can become class-based in a variety of ways, either by:
Writing the functions to be used as classes by yourself
Use a nifty class system ...
0
votes
0answers
239 views
Best Design Pattern for Coupling User Interface Components and Data Structures
I have a windows desktop application with a tree view. Due to lack of a sound data-binding solution for a tree view, I've implemented my own layer of abstraction on it to bind nodes to my own data ...
-2
votes
2answers
116 views
Software patterns for frameworks [closed]
I am currently doing some research about software patterns and about architectural patterns for frameworks specifically.
Google is not really showing off for this topic, so I am curious which ...
5
votes
2answers
347 views
Returning an IQueryable from an IRepository
Using the Repository pattern, is it proper to return an IQueryable of a data set (table), for generic usage?
It is very handy in many cases, especially when using external libraries that leverage ...
1
vote
2answers
205 views
Pattern(s) about hierarchical settings overwriting
Assume that you have a hierarchy of organizational units:
- Company
-- Branches
--- Departments
---- Teams
Lets say I have some settings (for simplicity assume that they have the same properties) ...
8
votes
2answers
219 views
Low coupling processing big quantities of data
Usually I achieve low coupling by creating classes that exchange lists, sets, and maps between them. Now I am developing a Java batch application and I can't put all the data inside a data structure ...
6
votes
4answers
417 views
Should injecting dependencies be done in the ctor or per method?
Consider:
public class CtorInjectionExample
{
public CtorInjectionExample(ISomeRepository SomeRepositoryIn, IOtherRepository OtherRepositoryIn)
{
this._someRepository = ...
1
vote
1answer
185 views
What is the “Find-Fix-Verify” pattern?
What is the "Find-Fix-Verify" pattern, as related to the process of doing editing/spellchecking/debugging, etc.?
Where is this pattern best described?
What are some advantages and disadvantages of ...
8
votes
3answers
696 views
What is the pattern name for using method chaining to build an object?
I frequently use a pattern where I using method chaining to setup an object, similar to a Builder or Prototype pattern, but not creating new objects with each method call, instead modifying the ...
10
votes
9answers
1k views
Is this an anti-pattern?
I've seen this a lot in our legacy system at work - functions that go something like this:
bool todo = false;
if(cond1)
{
... // lots of code here
if(cond2)
todo = true;
... // some other ...
5
votes
1answer
112 views
Checking members and instantiating in properties
Consider this:
public MyClass
{
private Resource _myResource;
public Resource MyResource
{
get
{
if(_myResource == null)
{
...
3
votes
3answers
712 views
New Silverlight app. MVVM. RIA Services vs CSLA
Another 2 days of reading and watching demos and here we go.
For my enterprise LoB Silverlight app I'm going to use:
Prism for UI aspects and modularity.
MVVM pattern (using Prism)
??? to bring ...
4
votes
3answers
420 views
Architectural Patterns for a Game
So I've got a solution that contains a few big projects, which I'm trying to break down into smaller projects with more isolated responsibilities. This is a game I'm tinkering with -- I'm mainly a LOB ...
17
votes
12answers
2k views
What design patterns are the worst or most narrowly defined? [closed]
For every programming project, Managers with past programming experience try to shine when they recommend some design patterns for your project. I like design patterns when they make sense or if you ...
2
votes
6answers
736 views
Is “call and return” a pattern or an antipattern?
Imagine to have this code:
class Foo:
def __init__(self, active):
self.active = active
def doAction(self):
if not self.active:
return
# do something
f=Foo(false)
f.doAction() ...