views:

169

answers:

5

Design patterns aren't necessarily a programming style but rather a template for solving a problem in a number of different situations.

But how do they differ from other programming styles?

Thanks

Edit: "(a) What are design patterns? How do these differ from other programming styles? [7]"

+2  A: 

A design pattern provides a known solution to a common design problem, and is given a name to allow programmers to communicate more efficiently.

However, I have no idea what you mean by "programming styles".

Edit: I think the question is simply very badly worded. While "design pattern" has a relatively clear definition, "programming style" is, in my experience, not a term with a generally agreed clear definition. The question seems to assume that design patterns are a kind of programming style, and I don't think that's true.

Michael Borgwardt
+1 design patterns give developers a common language with which to talk about designs.
Devon_C_Miller
I agree, thats why i was a bit confused with what exactly its looking for. I think Dur4ndal(4th response) provides a reasonable foundation to answer this question. I'm assuming thats what the examiner is looking for anyway.Thanks for taking time to respond.
Uncle
A: 

Design patterns are common solutions to object-oriented programming problems, so they differ from other styles in exactly the same way that object-oriented programming does.

duffymo
A: 

As I see it, programming styles refer to the "specifc" way in which you'd go about implementing something (Design patterns included). Although Design Patterns have traditionally been linked to OOP many design patterns still exist in other programming paradigms. The question, i think, is trying to prove whether or not you've got the difference between a "generic" and proven way of solving a problem, and an specific way of implementing a solution to "that" problem.

Regards,

StudiousJoseph
+1  A: 

If we take "programming style" to mean this, then the primary difference between programming styles and design patterns boils down to form vs. function: programming styles merely suggest how code is supposed to look, but dont have anything to say about how the code works; while design patterns are all about how code is programmatically structured and executes, but say nothing about how the code looks.

Dur4ndal
thats pretty good and i think it would make sense in the context of the question.
Uncle
A: 

I agree with other answers and in additional to that I think some program specific properties integrated some design pattern philosophy. Like the "delegate" keyword in C#, which implements the delegate pattern but it is absolutely supported by the language itself.

sza