A design pattern is a general reusable solution to a commonly occurring problem in software design.

learn more… | top users | synonyms (1)

3
votes
1answer
193 views

How to prevent hardcoding addresses in a web project?

In a fairly complicated web application, there are almost hundreds of redirecting to another page, or linking to another page, etc. Imagine that you have a page called ...
3
votes
2answers
404 views

Implementing Lazy Registration

I'm interested in setting up Lazy Registration on my website. Ideally, I'd like people to be able to fill out a record that might include their name, email, address, etc. and then record it to a user ...
2
votes
1answer
793 views

How to apply design patterns in this scenario

I want to use design patterns for the following scenario. How to? I have classes named Person, Employee and Customer and all of them have their own save, update, get and delete methods. Employee and ...
1
vote
1answer
3k views

Silverlight 5 and MVVM. Do I really need other frameworks? What is the best way for rapid development?

I've been reading and watching videos on MVVM and Silverlight.. I'm pretty new to Silverlight but not new to .NET. Interesting that I used MVVM in my WPF apps without knowing that it's MVVM. I was ...
7
votes
2answers
564 views

How can I “get in the know”?

My company posted a job listing to get me a helper. A recruiter called me today and all he kept saying was "MVC this Entity Framework that..." - He sounded shocked when I said the project uses ...
1
vote
1answer
279 views

Is there a design pattern for managing dependencies?

I'm building a component that manages available resources (JavaScript and CSS files) for a web page. As controls are added to the page, they register and un-register their requirements with this ...
1
vote
2answers
982 views

Whats the best book to master OO language, say C#? [closed]

I have quite some experience in software development. In the initial stages I worked on a really large project, with dozens of projects involved in it, hundreds of large files each with 10s of ...
-1
votes
2answers
248 views

Name for this pattern? [on hold]

I'm writing a class that will handle thread synchronisation. It would have a begin method which would increment a counter and an end method that would de-increment a counter. It'll have another ...
0
votes
1answer
154 views

Proxying the multitons

I have an app which acts like a TCP server and accepts multiple connections. Each connection is made by a distinct device, with a unique ID (the ID is reported by the device in two different messages ...
28
votes
11answers
2k views

Are design patterns generally a force for good or bad? [closed]

I've heard it argued that design patterns are the best thing since sliced bread. I've also heard it argued that design patterns tend to exacerbate "Second System Syndrome," that they are massively ...
5
votes
6answers
12k views

Can a fresher from a college write design patterns under “area of interests ” in resume? [closed]

I have keen interest in design patterns. I have been reading a lot about them. Specially, from HEAD FIRST. Can I write about design patterns in my resume? I am a fresher. Going to sit in on-campus ...
8
votes
12answers
947 views

Were you able to implement design patterns in tight deadlines?

I am wondering, in tight deadlines, who has time to implement design patterns? It is a lot more work and programming overhead to get it right the first time and within time frame. I know that it has ...
4
votes
2answers
1k views

How do you decide to Queue/Dispatch events Sync or Async? (in Observer Pattern)

Consider the following elements in an event-driven architecture: Observable Object Event Dispatcher Observer(Listener) Now, we have two messages: From Observable Object to Event Dispatcher From ...
16
votes
10answers
2k views

GoF Design Patterns - which ones do you actually use? [closed]

I'm trying to educate my colleagues in the area of design patterns. Some of the original Gang of Four patterns are a little esoteric, so I'm wondering if there is a sub-group of "essential" patterns ...
13
votes
4answers
3k views

What is pattern based programming?

Can somebody explain the obsession with patterns and anti-patterns in programming? I ask because I have absolutely no idea what any of the patterns mean. When faced with a programming task I think ...
2
votes
1answer
251 views

How should I structure our common modules to maximize reuse and reduce duplication? [duplicate]

Currently I'm working at a .NET project-based company. Our coding is not modularized, mostly we are copy/pasting old code that is needed on a new project and modify it. I was trying to standardize ...
4
votes
10answers
856 views

Does it make sense to ask, “What is the difference between Design Pattern and Algorithm?”

From Wikipedia: In mathematics and computer science, an algorithm is an effective method expressed as a finite list of well-defined instructions for calculating a function. In software ...
1
vote
4answers
179 views

Independent Developer Pre-Coding Planning/Design/Architecture

For the independent developers, or the weeknight/weekend developers, when you are about to begin a large/enterprise project, what are you first steps to take when hashing out the pre-coding details ...
7
votes
3answers
1k views

Duplication in parallel inheritance hierarchies

Using an OO language with static typing (like Java), what are good ways to represent the following model invariant without large amounts of duplication. I have two (actually multiple) flavours of the ...
4
votes
4answers
1k views

Can the strategy pattern be overused?

Example: A file, representing a serialized version of an object, needs to be read and deserialized. It would simple to implement this if we only cared about a single serialization format, but many ...
0
votes
5answers
167 views

Help me in choosing appropriate pattern

From last one week i was searching for most suitable architecture for a new web application. To be honest i did web development for only 1 year (back in 2007). And from last four years i am working in ...
0
votes
1answer
301 views

Designing classes containing the same objects but different amount of them

I am creating a main object, MACHINE, which will contain a diversity of several other objects -- AXIS, AMPLIFIER, ENDEFFECTOR, etc. The number of contained objects will vary depending on the MACHINE ...
7
votes
4answers
491 views

OOP design question

I'm working on an application written in PHP using OOP principles. The classes in my application usually represent a table in the database; for instance, 'student', 'teacher', 'class', 'schedule', ...
2
votes
2answers
775 views

Design question: Is this good case for proxy pattern, or “over done”?

Working on a major enhancement for legacy code, I have been wrestling with myself over whether this is a good case to use the Proxy pattern, and more specifically whether a good case to use the Java ...
0
votes
3answers
1k views

Design pattern for a multi-threaded URL fetcher in java

I'm looking for hints and suggestions on a design for a multi-threaded URL fetcher in java. Specific requirements are: To fetch each one of around 1,000 URLs periodically The interval between each ...
9
votes
3answers
2k views

How do you approach class design in OOPs?

When I try to design an OO solution ,I generally use the CRC modelling wherein I list the class names (nouns), what they do(verbs) and how they collaborate with other classes. This blog has the below ...
1
vote
6answers
526 views

What do you call this pattern/technique?

Lately I've used this technique a few times, and I'm trying to figure out if it has a name, if it's one of the patterns, etc. In complicated situations where I might normally have a number of giant ...
1
vote
1answer
302 views

Designing controller for modular Java architecture

We are designing a system which mimics a BPEL application with sets of functional requirements such as bulk messaging, managing SLAs, error handling and so on. One of the intentions is to modularize ...
12
votes
4answers
1k views

Is it a “pattern smell” to put getters like “FullName” or “FormattedPhoneNumber” in your model?

I'm working on an ASP.NET MVC app, and I've been getting into the habit of putting what seem like helpful and convenient getters into my model/entity classes. For example: public class Member { ...
7
votes
2answers
338 views

Design Pattern Books, Papers or Resources for Non-Object Orientated Paradigms?

After viewing this video on InfoQ about functional design patterns I was wondering what resources are out there on design patterns for non-object orientated paradigms. There are plenty out there for ...
0
votes
3answers
167 views

What is the best practice for verify if a client has already dowloaded information from server? [closed]

I need to verify what data wasn't downloaded yet. For example, how does Twitter or Facebook verify if a specific client has already dowloaded a piece of information? When a mobile app like twitter ...
5
votes
3answers
1k views

Design Anti-Patterns - C# - Do you call this a God object?

I am writing Portfolio module for my web site and it has 3 components. Gallery Category, Gallery, & Gallery Images. I am doing all the request handling, (creating, reading, updating, other), for ...
10
votes
9answers
2k views

Design Patterns: Should I learn them? [closed]

So it's kinda weird asking two questions back-to-back, but they aren't very related and I didn't want to combine them, but I'm not spamming questions, I promise! Anyway, I'm a recent college grad, ...
6
votes
1answer
5k views

Permissions/right model/pattern for .NET application

I need to implement flexible AND simple (if such thing exist) and at the same time utilize built-on means if possible So far I have MembershipProvider and RoleProviders implemented. This is cool but ...
4
votes
4answers
562 views

Should strategy objects have state?

I have an application object that needs to validate some data. The particular validation algorithm isn't known until runtime, so I pass a validation object to it, using the strategy pattern. The ...
5
votes
2answers
412 views

Iterative alternative to decorators?

So decorators wrap a base class recursively, right? And have a single super class object which is at the "core" class. Couldn't you just add an ArryList/LinkedList of decorations in the "core" class ...
14
votes
2answers
3k views

What are the main practices and design patterns every .NET guy should know? [closed]

In my brief time as a professional programmer I've seen lots of applications written by programmers who's entire education appears to have been reading the first couple of chapters in a .NET 2.0 book. ...
9
votes
4answers
547 views

What “code smells” are there that are a symptom that an event listener model is required?

What are the symptoms in a code base that indicate that an event-listener approach is required? It seems to me that when there are classes that need to be called by multiple, not defined at ...
6
votes
1answer
4k views

Python programming patterns and practices? [closed]

What are the best python programming patterns and practices you are using every day? I don't mean only design patterns (there are lot of OO design patterns that can be used in python), I mean pure ...
2
votes
5answers
497 views

Anti patterns - Worth spending time or not

I have read this question and after a very long time it's clear I still don't understand anti-patterns. perhaps, it raised a new level of curosity to know why should I read Anti design pattern if they ...
3
votes
2answers
2k views

Data Access Layer, Business Class or Repository?

I've been having a debate within my team on what constitutes a Data Access Layer vs Data Functions vs Business Layers. My thoughts is all database access is done in a data access layer with ...
3
votes
2answers
613 views

Delegate pattern for retrieving data v.s. using simple setters

I am considering using the Delegate Pattern to get some data necessary for an operation. There are a few different pieces of data that the algorithm needs to run, but they all have default values that ...
4
votes
3answers
736 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 ...
3
votes
2answers
2k views

Anemic Domain Model, Business Logic and DataMapper (PHP)

I've implemented a rudimentary ORM layer based on DataMapper (I don't want to use a full blown ORM like Propel/Doctrine - for anything beyond simple fetch/save ops I prefer to access the data directly ...
3
votes
2answers
2k views

user security pattern recommendation/best practice

I'm looking for good reference on patterns that apply to user security and ACLs for multi-user network applications. I'm re-writing a fairly large application from scratch. Now I'm looking at the ...
5
votes
3answers
335 views

What design would you propose to log reporting data so that the capture of, say, an additional form field can implemented easier?

Why is there an emphasis to log reporting information through an application to a separate database? I have seen designs where a logging manager is available to every business layer class whether it ...
1
vote
1answer
651 views

Delegate Pattern : Delegate or Delegator?

I've a simple question about the terminology used in the Delegate pattern; Let's say I create an object that will be responsible to download something from the Net and when it is finished, will call ...
17
votes
8answers
845 views

How do “You Ain't Gonna Need it” and “Now is better than never” play together?

I often find myself embracing "now is better than never" when I'm advancing the DRYness of a design. Typically, I find that I need to cultivate an understanding of the One Authoritative Location for ...
8
votes
3answers
796 views

Using CSS classes as decorators - a good pattern?

I've been building a web-app with a fairly complex GUI - many small elements alongside eachother and within other elements that need various behaviours (dragging, clicking, but context-sensitive). My ...
19
votes
2answers
7k views

Alternative patterns for web development? (non-MVC)

Recently I've been reading some blog posts regarding MVC and how it doesn't fit the web. I've learned about alternative patterns like the RMR Architecture. I'm curious what other patterns people are ...