digplanet beta 1: Athena
Share digplanet:

Agriculture

Applied sciences

Arts

Belief

Business

Chronology

Culture

Education

Environment

Geography

Health

History

Humanities

Language

Law

Life

Mathematics

Nature

People

Politics

Science

Society

Technology

In software engineering, don't repeat yourself (DRY) is a principle of software development aimed at reducing repetition of information of all kinds, especially useful in multi-tier architectures. The DRY principle is stated as "Every piece of knowledge must have a single, unambiguous, authoritative representation within a system." The principle has been formulated by Andy Hunt and Dave Thomas in their book The Pragmatic Programmer. They apply it quite broadly to include "database schemas, test plans, the build system, even documentation."[1] When the DRY principle is applied successfully, a modification of any single element of a system does not require a change in other logically unrelated elements. Additionally, elements that are logically related all change predictably and uniformly, and are thus kept in sync. Besides using methods and subroutines in their code, Thomas and Hunt rely on code generators, automatic build systems, and scripting languages to observe the DRY principle across layers.

Contents

Applying DRY [edit]

Also known as Single Source of Truth, this philosophy is prevalent in model-driven architectures, in which software artifacts are derived from a central object model expressed in a form such as UML. DRY code is created by data transformation and code generators, which allows the software developer to avoid copy and paste operations. DRY code usually makes large software systems easier to maintain, as long as the data transformations are easy to create and maintain. Tools such as XDoclet and XSLT are examples of DRY coding techniques. An example of a system that requires duplicate information is Enterprise Java Beans version 2, which requires duplication not just in Java code but also in configuration files. Examples of systems that attempt to reduce duplicate information include the Symfony, web2py, Yii, Play Framework and Django web frameworks, EiffelStudio, Ruby on Rails application development environment, Microsoft Visual Studio LightSwitch and Enterprise Java Beans version 3.

DRY vs WET solutions [edit]

Violations of DRY are typically referred to as WET solutions, which stands for "write everything twice".[2]

See also [edit]

References [edit]

  1. ^ Dave Thomas, interviewed by Bill Venners (2003-10-10). "Orthogonality and the DRY Principle". Retrieved 2006-12-01. 
  2. ^ Alex Papadimoulis (2011-12-08). "The WET Cart". Retrieved 2012-05-21. 

External links [edit]


Original courtesy of Wikipedia: http://en.wikipedia.org/wiki/Don't_repeat_yourself — Please support Wikipedia.
A portion of the proceeds from advertising on Digplanet goes to supporting Wikipedia.
1000000 videos foundNext > 

Gym Class Heroes: Ass Back Home ft. Neon Hitch [OFFICIAL VIDEO]

Gym Class Heroes' music video for 'Ass Back Home' featuring Neon Hitch from the album, The Papercut Chronicles II - available now on Decaydance / Fueled By R...

YOLO (feat. Adam Levine & Kendrick Lamar)

YOLO is available on iTunes now! http://bit.ly/13w2sxX THE LONELY ISLAND - THE WACK ALBUM iTunes [deluxe version]: http://bit.ly/13w2sxX iTunes: http://bit.l...

Don't stab yourself in the face...

Answering a question from my Tumblr http://PhillyD.tv.

kick your own ass! But don't kill yourself!

Need help? In the U.S., call 1-800-273-8255 National Suicide Prevention Lifeline Soap Shop! Etsy: http://www.etsy.com/shop/spricket24 Fullscreen request info...

Daft Punk - Lose Yourself To Dance

Video edited using footage from Soul Train.

Ne-Yo - Let Me Love You (Until You Learn To Love Yourself)

Buy it Now! iTunes - http://smarturl.it/lmlyit Amazon - http://smarturl.it/lmlyam Music video by Ne-Yo performing Let Me Love You (Until You Learn To Love Yo...

Neil deGrasse Tyson: Be Yourself

Neil deGrasse Tyson says "the greatest of people that have ever been in society, they were never versions of someone else. They were themselves." Transcript-...

Dove Real Beauty Sketches

Join the conversation at: #WeAreBeautiful Watch the whole experience at: http://dove.com/realbeautysketches Women are their own worst beauty critics. Only 4%...

Rihanna - Stay ft. Mikky Ekko

Download "Stay" from Unapologetic now: http://smarturl.it/UnapologeticDlx Music video by Rihanna performing Stay ft. Mikky Ekko. © 2013 The Island Def Jam Mu...

Daft Punk - Get Lucky (Official Audio) ft. Pharrell Williams

Available now on iTunes: http://smarturl.it/GetLucky Pre-Order Random Access Memories, in-stores 5/21/13: iTunes: http://smarturl.it/RAMiTunes Amazon (CD/LP)...

1000000 videos foundNext > 

We're sorry, but there's no news about "Don't repeat yourself" right now.

Loading

Oops, we seem to be having trouble contacting Twitter

Talk About Don't repeat yourself

You can talk about Don't repeat yourself with people all over the world in our discussions.

Support Wikipedia

A portion of the proceeds from advertising on Digplanet goes to supporting Wikipedia. Please add your support for Wikipedia!