# Convention over configuration

**URL:** <https://www.ruby-forum.com/t/convention-over-configuration/91469>\
**Category:** Rails\
**Created:** [April 9, 2007, 4:03pm UTC](https://www.ruby-forum.com/t/convention-over-configuration/91469 "2007-04-09T16:03:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajdeep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/a698b9/32.png) [@rajdeep](https://www.ruby-forum.com/u/rajdeep)\
**Post date:** [April 9, 2007, 4:03pm UTC](https://www.ruby-forum.com/t/convention-over-configuration/91469/1 "2007-04-09T16:03:12Z")

</div>

hello everybody, i am new to ROR i have some doubts  
1\> will u tell me that what Convention over configuration  
what i mean is which configurations are avoided and what conventions  
we use in ROR

2\>DRY principle-\>dont repeat yourself whats it is exactly what kind of  
repeations are avoided

Thank u

---

<div class="post-metadata">

**Author:** ![rajdeep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/a698b9/32.png) [@rajdeep](https://www.ruby-forum.com/u/rajdeep)\
**Post date:** [April 10, 2007, 12:18am UTC](https://www.ruby-forum.com/t/convention-over-configuration/91469/2 "2007-04-10T00:18:11Z")

</div>

rajdeep wrote:

> hello everybody, i am new to ROR i have some doubts  
> 1\> will u tell me that what Convention over configuration  
> what i mean is which configurations are avoided and what conventions  
> we use in ROR
> 
> 2\>DRY principle-\>dont repeat yourself whats it is exactly what kind of  
> repeations are avoided
> 
> Thank u

1. Conventions like how to name your database tables. Every table has  
an id column, and association foreign keys are the name of the  
associated table + \_id (i.e. product\_id). Other things like the naming  
of files. If you have a controller called ‘Foo’ and an action named  
‘bar’, then the view for that action will be in /app/views/foo/bar.rhtml

These conventions allow you to link your app together with very little  
explicit and repetitive code that describes those links. It just works  
because the framework is intelligent enough to figure out what you want  
to do because you are following a logical path.

1. Rails aims to get rid of the copy & paste style programming. Any  
programming is prone to snippets of code that are close, or even the  
same, but in different places of your code. Rails (and Ruby) make it  
easy to abstract your logic into smaller and more reusable chunks.
