Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Sir Chicken Caesar
Feb 19, 2005

Cock a doodle don't
Fun Shoe
The major reason Rails rocks for me is that it makes good practice easy. In fact a lot of the time it's harder to behave badly. You guys have already mentioned the MVC pattern support, but you also get things like:

- Great testing support, automatic creation of functional and integration test skeletons. I'm currently investigating Selenium on Rails http://www.openqa.org/selenium-on-rails/ which looks like a good solution to getting front end tests automated as well :-)
- Fixtures for generating test data
- Support for multiple environments baked in
- Migrations that make evolving databases easy

I'm working on a large .Net project at the moment and one of the major frustrations I am have is that when you open Visual Studio you get a blank canvas.

What happens when you get a blank canvas? You either:

a) End up with a mass of developers with varying skill levels making their own little bit of the system in a particular style. This gives you a maintenance and integration nightmare.

b) spend ages investigating and educating people about options for unit testing, deployment, system structure etc. etc.

I'm happy that Rails (in a large subset of contexts) presents a complete environment for development that other so called 'Enterprise Strength' frameworks lack. This leaves me to concentrate on the important bits, i.e. fulfilling the requirements. I just wish I could persuade the senior people at my company that we're missing a trick by not using it more!

Adbot
ADBOT LOVES YOU

Sir Chicken Caesar
Feb 19, 2005

Cock a doodle don't
Fun Shoe

Mr. Wynand posted:

...
Yes Rails is all sorts of <3 and puppies, but there are more then a few things about it that make you want to run up a wall in anger when you have to deal with them.

Fair points, I guess it's just refreshing to see a framework that even thinks about these things. They seem to be unknown subjects in the .Net world.

What about the other RAD frameworks, like Django or Zope/Plone? Do they have similar development process features?

Sir Chicken Caesar
Feb 19, 2005

Cock a doodle don't
Fun Shoe

Praetorian42 posted:

You don't have to use the generator, it is just easier.

In your case, just create a file in app/models called "book.rb" and start it thusly:

code:
class Book < ActiveRecord::Base
  set_table_name "book"
end
And then you're good to go. If you want unit tests, go create the file in test/unit and create the fixture in test/fixtures. The generators don't do anything magical.

Edit: Also, testing will be difficult in this scenario and I honestly don't know how you'd be able to do it.

Or you could just run scaffold, then delete the migration and then set up your tables as you suggest.

As for testing, you can clone an existing database via the 'rake db:test:clone' command (although this might fail). See this blog post I found about testing non rails apps via rails which might be useful: http://www.martinicity.net/articles/2007/03/31/testing-a-non-rails-application-using-rails

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply