Tagged Questions
4
votes
2answers
244 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 ...
35
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
196 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
112 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
264 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
97 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
202 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
360 views
Should injecting dependencies be done in the ctor or per method?
Consider:
public class CtorInjectionExample
{
public CtorInjectionExample(ISomeRepository SomeRepositoryIn, IOtherRepository OtherRepositoryIn)
{
this._someRepository = ...
8
votes
3answers
545 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
987 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
109 views
Checking members and instantiating in properties
Consider this:
public MyClass
{
private Resource _myResource;
public Resource MyResource
{
get
{
if(_myResource == null)
{
...
3
votes
3answers
613 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
379 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 ...
18
votes
12answers
1k views
What design patterns are the worst or most narrowly defined?
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 ...