Lloyd Linklater wrote:
I note that every time a new rails app is made, there is a huge bunch of
directories and files generated. As this is the same thing every time,
is it really DRY? It just seems that there would be a way to have a
standard set of directories and the classes could be extended when
DRY refers to code that you - the end-developer - must maintain.
For example, if you generate two projects, most of the boilerplate code is indeed duplicated, but you don't need to maintain it.
You will indeed need to deploy it! That's where it goes to work.
But if, for example, your two projects share a common Member model - you should use some extra-Rails facility to merge them together, such as a library folder at RAILS_ROOT + '/../lib'.
(Remember to pass all tests in both projects each time you integrate!)
So DRY at the level of Rails source is really "meta-DRY". Its excesses allow your own code to remain DRY.