Ruby on Rails

If anyone reading this happens to have used Rails at any point (unlikely, I know, since it’s only been out for about two months, and by-and-large the readers of this blog are less geeky than I, but there are some odd sorts lurking and one never knows…), I have a query:

Suppose I use Rails to auto-generate all manner of web application goodness, and I hack on that generated code a bit to make something passably pretty. If I subsequently realise that I naffed up the database schema, do the tools neatly integrate the changes, or do I end up with a tangled mess?

Please answer in small words, typing very slowly, as if to a small child.

1 thought on “Ruby on Rails”

  1. Rails is not a code generation framework in the static sense where a ton of files are created on the file system to edit. Instead, Rails uses run-time code generation on the classes and objects as they come to life.
    This means that when you write x amount of code, you get perhaps 3x back. If you change the original x, the “generated” code will adapt automatically.
    So no, you will not get a tangled mess. You will have far less code than most frameworks allow you to get away with. And since you have a smaller codebase, it’s much more agile and acceptable to change.
    Database changes is something that Rails is particularly well-adapted to handle. This is so because unlike meta-data based frameworks, you don’t need to describe the mapping between classes and tables. Active Record (part of Rails) will figure that out for you. Hence, it will automatically adapt when you add or remove a field.
    Hope that made it some what clear đŸ˜‰

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.