How important are design patterns in web development?

What are the design patterns that I should be completely familiar with? And what is one easy example that each can be used for?

I am a web developer (I use Django, and is familiar with separation of logic), but I work at a Desktop-app company. They are always talking about singletons, and I forget...but it leaves me no clue!

Answers


Forget Singleton. It's confusing and rarely necessary.

Learn State, Strategy and Command. They're used all the time.

State is for anything that has logic that depends on the state of the object. In short, every if-statement might possibly be better done via State. Seriously. Too many if-statements are a code smell and indicate that there's stateful processing that's sprawled all over the place.

Strategy is for any "plug-in" or "expansion" or "option" processing.

Command is for any extensible (and composable) set of actions. Backup, Restore. Table Drop, Create, Index, Populate. Validate, Load, Summarize, Report. Any of those command-like things that can be put together in different ways, different orders, etc., should probably be done with a formal Command design.


MVP or MVC

Model View Presenter or Model View Controller

More architecural patterns but neverless, they are a combination of design patterns.


Need Your Help

Border around chart teechart

java android teechart

I made a chart with Steema TeeChart, the chart is done, but when it is drawn in the layout there is a border around the layout that it's made by the chart, is not inside the chart, i've used

jquery how to use Prefix word to search selector text?

jquery search text selector

Hello~ I have a input box and a selector like this:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.