Rails is awesome

Couldn't help sending a big 'thank you' to DHH for Rails.

I finally threw away CVS ruby so I could try it on 1.8, and
it's stupidly easy to use.

I finally get a chance to get to grips with MVC without all that
taglib nonsense filling up slots in my head....

Good work, fella.

···

--
You may need to metaphorically make a deal with the devil.
By 'devil' I mean robot devil and by 'metaphorically' I mean get your coat. - Bender
Rasputin :: Jack of All Trades - Master of Nuns

Couldn't help sending a big 'thank you' to DHH for Rails.

Thanks, Dick. Oh, and do stay tuned. The upcoming release (0.9) features a wide-array of powerful improvements, such as using FCGI/mod_ruby/cached WEBrick as a development platform (instead of slow CGI), dynamic fixtures, breakpoint support, better environment support, and much more.

Exciting times.

···

--
David Heinemeier Hansson,
http://www.basecamphq.com/ -- Web-based Project Management
http://www.rubyonrails.org/ -- Web-application framework for Ruby
http://macromates.com/ -- TextMate: Code and markup editor (OS X)
http://www.loudthinking.com/ -- Broadcasting Brain

Hi,

yeah I only can agree. I've started learning ruby a few weeks ago and read
an article about rails in a german linux magazine and suddenly tried: It's
really great!

Sometimes it seems to be a little bit slow, but the time I need to develop a
small webapplication is really short. And: Ruby and rails are just at the
beginning. The performance will be more and more better in the future.

So: Great work!

Mike

David,

I haven't seen this myself, but from something said by others, it
appears that ActiveRecord may actually have a few minor issues with
cased table and column names. If I have a column "Id" it should be
treated the same as "id". I'm a bit busy with tidying up Ruwiki 0.9.0
for release to verify myself, but I thought it'd be worth mentioning.

-austin

···

On Tue, 23 Nov 2004 20:11:24 +0900, David Heinemeier Hansson <david@loudthinking.com> wrote:

> Couldn't help sending a big 'thank you' to DHH for Rails.
Thanks, Dick. Oh, and do stay tuned. The upcoming release (0.9)
features a wide-array of powerful improvements, such as using
FCGI/mod_ruby/cached WEBrick as a development platform (instead of slow
CGI), dynamic fixtures, breakpoint support, better environment support,
and much more.

--
Austin Ziegler * halostatue@gmail.com
               * Alternate: austin@halostatue.ca

Sometimes it seems to be a little bit slow, but the time I need to develop a
small webapplication is really short. And: Ruby and rails are just at the
beginning. The performance will be more and more better in the future.

The next release is a MAJOR step forward in the speed department for development. It used to be that Rails was pretty slow for development (~1 reg/sec), but then really fast in production.

Now with advances in library management, it's possible to use FCGI, mod_ruby, and cached WEBrick for development. This means that its MUCH, MUCH faster. Really a joy to work with. I can't wait to get 0.9 out with it.

···

--
David Heinemeier Hansson,
http://www.basecamphq.com/ -- Web-based Project Management
http://www.rubyonrails.org/ -- Web-application framework for Ruby
http://macromates.com/ -- TextMate: Code and markup editor (OS X)
http://www.loudthinking.com/ -- Broadcasting Brain

I haven't seen this myself, but from something said by others, it
appears that ActiveRecord may actually have a few minor issues with
cased table and column names.

Yes, this issue is that Active Record dictates you to use lower-case ;). Neither databases nor Ruby is case-insensitive, I don't think I want to put that in Active Record. The idea is that the table and the class bear close resemblance.

Hence, Active Record also proclaims that thy shall use lower-cased and underscores for composite words. So CreditRating is turned into credit_ratings.

If you really wanted to, you could overwrite all of that, though. You can overwrite the id column used with Model.id_column() and the table name with Model.table_name().

In the mean time, I'll be playing the flute :slight_smile:

···

--
David Heinemeier Hansson,
http://www.basecamphq.com/ -- Web-based Project Management
http://www.rubyonrails.org/ -- Web-application framework for Ruby
http://macromates.com/ -- TextMate: Code and markup editor (OS X)
http://www.loudthinking.com/ -- Broadcasting Brain

Hi,

thank you for your answer! Sounds really great! Can't wait installing and
testing it :slight_smile:

Mike

···

Sometimes it seems to be a little bit slow, but the time I need to
develop a
small webapplication is really short. And: Ruby and rails are just at
the
beginning. The performance will be more and more better in the future.

The next release is a MAJOR step forward in the speed department for
development. It used to be that Rails was pretty slow for development
(~1 reg/sec), but then really fast in production.

Now with advances in library management, it's possible to use FCGI,
mod_ruby, and cached WEBrick for development. This means that its MUCH,
MUCH faster. Really a joy to work with. I can't wait to get 0.9 out
with it.
--
David Heinemeier Hansson,
http://www.basecamphq.com/ -- Web-based Project Management
http://www.rubyonrails.org/ -- Web-application framework for Ruby
http://macromates.com/ -- TextMate: Code and markup editor (OS X)
http://www.loudthinking.com/ -- Broadcasting Brain

And I can't stop thinking that, somehow, a "Programming Rails, The
pragmatic programmer's guide" would be one hell of a cherry on top of
the cake. :slight_smile:

···

David Heinemeier Hansson <david@loudthinking.com> wrote:

I can't wait to get 0.9 out with it.

--
Luc Heinrich - lucsky@mac.com

I haven't seen this myself, but from something said by others, it
appears that ActiveRecord may actually have a few minor issues
with cased table and column names.

Yes, this issue is that Active Record dictates you to use
lower-case ;). Neither databases nor Ruby is case-insensitive, I
don't think I want to put that in Active Record. The idea is that
the table and the class bear close resemblance.

Erm. SQL databases *are* case-insensitive on the names. MySQL may
not be, but that's a problem with MySQL, not RDBMSes in general. In
Oracle, at least, there's no difference between ID, Id, and id for a
column or table name.

Essentially, David, this is a *problem* with ActiveRecord.
ActiveRecord is in the wrong here if it's being case-sensitive to
the database's meta-data in the general case.

I don't disagree with many other design decisions you've made --
enforce the lower-case behaviour in the Ruby side, certainly, and I
agree with the decision for underscores -- but the reality is that
ActiveRecord is in the wrong for case-sensitivity on the database
side.

Hence, Active Record also proclaims that thy shall use lower-cased
and underscores for composite words. So CreditRating is turned
into credit_ratings.

That's fine, for the Ruby side. But credit_ratings and
CREDIT_RATINGS on the database side are one and the same.
ActiveRecord must be smart enough to do this.

If you really wanted to, you could overwrite all of that, though.
You can overwrite the id column used with Model.id_column() and
the table name with Model.table_name().

I shouldn't have to, for this. I agree with your assertions
regarding naming schemes in general (e.g., it has to be
credit_ratings and not credit_rating) but -- at the risk of majorly
repeating myself :slight_smile: -- SQL databases are case insensitive. It's a
MySQL so-called extension (really, it's a screwup on their part)
that makes SQL case-sensitive on their part.

Compare:
qurl.net - This website is for sale! - qurl Resources and Information. (MySQL)
qurl.net - This website is for sale! - qurl Resources and Information. (MySQL)
qurl.net - This website is for sale! - qurl Resources and Information. (Sybase: see "Case sensitivity of identifiers")
qurl.net - This website is for sale! - qurl Resources and Information. (FirebirdSQL: see "Double-quoted identifiers")

Sorry, but I lived and breathed real RDBMS systems for a few years,
and MySQL is wrong (and inconsistent! -- it depends on the
underlying filesystem, not on the inherent nature of the database).
If ActiveRecord's behaviour is based on that, then ActiveRecord
needs to change.

-austin

···

On Wed, 24 Nov 2004 07:01:17 +0900, David Heinemeier Hansson <david@loudthinking.com> wrote:
--
Austin Ziegler * halostatue@gmail.com
               * Alternate: austin@halostatue.ca

And I can't stop thinking that, somehow, a "Programming Rails, The
pragmatic programmer's guide" would be one hell of a cherry on top of
the cake. :slight_smile:

Be careful what you wish for... :wink:

···

--
David Heinemeier Hansson,
http://www.basecamphq.com/ -- Web-based Project Management
http://www.rubyonrails.org/ -- Web-application framework for Ruby
http://macromates.com/ -- TextMate: Code and markup editor (OS X)
http://www.loudthinking.com/ -- Broadcasting Brain

thank you for your answer! Sounds really great! Can't wait installing and
testing it :slight_smile:

It's already possible now, today, to taste... THE FUTURE!!!

Or with less dramatics, you can do "gem update -s http://gems.rubyonrails.org", and all the dandy beta gems will be installed on your system. You'll have to look at the changelogs to get an idea of what has changed, though:

http://dev.rubyonrails.org/trac.cgi/file/trunk/actionpack/CHANGELOG
http://dev.rubyonrails.org/trac.cgi/file/trunk/activerecord/CHANGELOG
http://dev.rubyonrails.org/trac.cgi/file/trunk/railties/CHANGELOG

···

--
David Heinemeier Hansson,
http://www.basecamphq.com/ -- Web-based Project Management
http://www.rubyonrails.org/ -- Web-application framework for Ruby
http://macromates.com/ -- TextMate: Code and markup editor (OS X)
http://www.loudthinking.com/ -- Broadcasting Brain

* Luc Heinrich <lucsky@mac.com> [1123 16:23]:

···

David Heinemeier Hansson <david@loudthinking.com> wrote:

> I can't wait to get 0.9 out with it.

And I can't stop thinking that, somehow, a "Programming Rails, The
pragmatic programmer's guide" would be one hell of a cherry on top of
the cake. :slight_smile:

Rails has got the mindshare at the minute, I'd expect
someone to be on it soon.

Reloadable FCGI will be a real boon (though last time I
tried out Struts I went for a smoke between HTTP requests,
it was that slow).

--
Yeah, well I'm gonna build my own themepark! With blackjack
aaand Hookers! Actually, forget the park. And the blackjack. - Bender
Rasputin :: Jack of All Trades - Master of Nuns

Austin Ziegler wrote:

I haven't seen this myself, but from something said by others, it
appears that ActiveRecord may actually have a few minor issues
with cased table and column names.

Yes, this issue is that Active Record dictates you to use
lower-case ;). Neither databases nor Ruby is case-insensitive, I
don't think I want to put that in Active Record. The idea is that
the table and the class bear close resemblance.

Erm. SQL databases *are* case-insensitive on the names. MySQL may
not be, but that's a problem with MySQL, not RDBMSes in general. In
Oracle, at least, there's no difference between ID, Id, and id for a
column or table name.

I'm definately not a DB expert, but I believe in this case Oracle, at least, *is* case sensitive. Consider:

   create table "credit_rating" (
     ...
   );

   create table "CREDIT_RATING" (
     ...
   );

The above would create two distinct tables.

The keywords are case insensitive, but the column and table names can be made case sensitive by putting them in quotes. If you omit the quotes, the identifier is uppercased automatically.

Essentially, David, this is a *problem* with ActiveRecord.
ActiveRecord is in the wrong here if it's being case-sensitive to
the database's meta-data in the general case.

I don't disagree with many other design decisions you've made --
enforce the lower-case behaviour in the Ruby side, certainly, and I
agree with the decision for underscores -- but the reality is that
ActiveRecord is in the wrong for case-sensitivity on the database
side.

That's a bit strong, Austin. David made a decision and has enforced that decision. If you want to use database identifiers that are mixed case, you are in no way compelled to use ActiveRecord. AR was designed (and David has made this clear repeatedly) to enforce certain application design decisions, to make it easier to rapidly build apps. I believe he has also said, specifically, that he wants to avoid the trap of having AR "do everything".

Hence, Active Record also proclaims that thy shall use lower-cased
and underscores for composite words. So CreditRating is turned
into credit_ratings.

That's fine, for the Ruby side. But credit_ratings and
CREDIT_RATINGS on the database side are one and the same.
ActiveRecord must be smart enough to do this.

Again, not necessarily. Some DB's would see those as the same, others might not, depending on how the tables were created.

I'm not saying I agree with all of David's decisions regarding AR and Rails, but where I disagree it is a matter of personal preference. He made certain decisions, and they _work_. That's really what matters, I think.

- Jamis

···

On Wed, 24 Nov 2004 07:01:17 +0900, David Heinemeier Hansson > <david@loudthinking.com> wrote:

--
Jamis Buck
jgb3@email.byu.edu
http://www.jamisbuck.org/jamis

Essentially, David, this is a *problem* with ActiveRecord.
ActiveRecord is in the wrong here if it's being case-sensitive to
the database's meta-data in the general case.

Active Record places a number of naming constraints of your database. Just treat the forced lower-case as one such. In the databases where Id is the same as ID and credit_ratings as CREDIT_RATINGS, it should then be no problem to rename the fields. For cases where it is significant, like the database I choose to use for all my projects, it's nice just to be consistent and not have code to massage cases.

Remember, Active Record is first and foremost an ORM mapper for new applications. There are some options to tweak the mapping, but they're really only there for grace and flute playing. Active Record is basically unashamed to strongly suggest (or even mandate) a naming convention that'll lead to less software for me to write and maintain. And less configuration for you to contemplate.

...but the reality is that ActiveRecord is in the wrong for case-sensitivity on the database side.

I don't think reality have too much to do with our opinions here ;). I fully recognize that other choices could have been made for the naming conventions in Active Record -- given another designer. I don't recognize my choices to be "wrong" by them being different that yours would have been.

But I'm glad you're passionate enough about Active Record to construct a reality around how you think it should be designed. I think a lot of good design decisions can be made when such a reality is picked and held dear. But when giving recommendations on a piece of software one didn't write, it's usually prudent to examine the other guys reality before constructing your own :slight_smile:

Active Record is a MySQL-driven ORM mapper. It now has adapters for PostgreSQL, SQLite, and latest SQL Server, but they all derive from the principles of the original MySQL driver. So in the eyes of Active Record, databases that deviate from the MySQL-way are the ones that are "wrong" and special programming is needed in their adapters to emulate MySQL behavior. That's the reality picked :slight_smile:

Sorry, but I lived and breathed real RDBMS systems for a few years,
and MySQL is wrong (and inconsistent! -- it depends on the
underlying filesystem, not on the inherent nature of the database).
If ActiveRecord's behaviour is based on that, then ActiveRecord
needs to change.

Jamis Buck had an example from Oracle also being case sensitive, so it seems to be somewhat more widespread than just MySQL. And as I said, Active Record was founded on MySQL, so when behavior differs between RDBMS, AR will side by MySQL by default (strong pressures might revert that default, but I don't think this is a strong pressure).

Thanks for sharing your opinions, though, Austin.

···

--
David Heinemeier Hansson,
http://www.basecamphq.com/ -- Web-based Project Management
http://www.rubyonrails.org/ -- Web-application framework for Ruby
http://macromates.com/ -- TextMate: Code and markup editor (OS X)
http://www.loudthinking.com/ -- Broadcasting Brain

What would the relationship be between Struts (servlet-based) and FCGI (cgi container)?

Also, Struts is actually pretty lightweight- it doesn't really do that much. I'd expect you had another issue?

Cheers,
Nick

Dick Davies wrote:

···

* Luc Heinrich <lucsky@mac.com> [1123 16:23]:

David Heinemeier Hansson <david@loudthinking.com> wrote:

I can't wait to get 0.9 out with it.
     

And I can't stop thinking that, somehow, a "Programming Rails, The
pragmatic programmer's guide" would be one hell of a cherry on top of
the cake. :slight_smile:
   
Rails has got the mindshare at the minute, I'd expect
someone to be on it soon.

Reloadable FCGI will be a real boon (though last time I tried out Struts I went for a smoke between HTTP requests,
it was that slow).

I just installed the beta on my Mac OS X G4 450MHz box, and I'm ecstatic.

My page loads during development went from 8-10 seconds to mostly < 1 seconds.

Singe page loads, rough estimates:
0.8.5 rails Webrick, no caching: 8-10 seconds
0.8.5 rails Webrick, -c (not usable for development before): 4-5 seconds
Beta rails, webbrick, -c (caching): < 1 second

Cool. Now I can use my Mac for rails development!

Thanks,
Nick

David Heinemeier Hansson wrote:

···

thank you for your answer! Sounds really great! Can't wait installing and
testing it :slight_smile:

It's already possible now, today, to taste... THE FUTURE!!!

Or with less dramatics, you can do "gem update -s http://gems.rubyonrails.org", and all the dandy beta gems will be installed on your system. You'll have to look at the changelogs to get an idea of what has changed, though:

http://dev.rubyonrails.org/trac.cgi/file/trunk/actionpack/CHANGELOG
http://dev.rubyonrails.org/trac.cgi/file/trunk/activerecord/CHANGELOG
http://dev.rubyonrails.org/trac.cgi/file/trunk/railties/CHANGELOG
--
David Heinemeier Hansson,
http://www.basecamphq.com/ -- Web-based Project Management
http://www.rubyonrails.org/ -- Web-application framework for Ruby
http://macromates.com/ -- TextMate: Code and markup editor (OS X)
http://www.loudthinking.com/ -- Broadcasting Brain

I was suprised with Jamis's Oracle examples; I always thought Oracle
was case-insensitive up the wazoo. But I guess I never tried quoting
table names etc. (yeah, *that's* intuitive...)

Also, I was surprised by Austin's use of Sybase to back up the "SQL
databases are case-insensitive" claim. When I worked with Sybase ~6
years ago, it was certainly case-sensitive. The meme in the office at
the time was that Sybase was different from most other DBs in this
regard, and we had to be careful about this when migrating data.

Gavin

···

On Wednesday, November 24, 2004, 9:23:09 PM, David wrote:

Jamis Buck had an example from Oracle also being case sensitive, so it
seems to be somewhat more widespread than just MySQL. And as I said,
Active Record was founded on MySQL, so when behavior differs between
RDBMS, AR will side by MySQL by default (strong pressures might revert
that default, but I don't think this is a strong pressure).

When you select the metadata from Oracle, if you have not quoted your
table names when creating them, they will be returned all uppercase.

Thus, ActiveRecord is broken for any likely Oracle application.

-austin

···

On Wed, 24 Nov 2004 19:23:09 +0900, David Heinemeier Hansson <david@loudthinking.com> wrote:

> Essentially, David, this is a *problem* with ActiveRecord.
> ActiveRecord is in the wrong here if it's being case-sensitive to
> the database's meta-data in the general case.

Active Record places a number of naming constraints of your database.
Just treat the forced lower-case as one such. In the databases where Id
is the same as ID and credit_ratings as CREDIT_RATINGS, it should then
be no problem to rename the fields. For cases where it is significant,
like the database I choose to use for all my projects, it's nice just
to be consistent and not have code to massage cases.

--
Austin Ziegler * halostatue@gmail.com
               * Alternate: austin@halostatue.ca

Jamis Buck <jamis_buck@byu.edu> wrote in message news:<41A412B7.4070603@byu.edu>...
<snip>

I'm definately not a DB expert, but I believe in this case Oracle, at
least, *is* case sensitive. Consider:

   create table "credit_rating" (
     ...
   );

   create table "CREDIT_RATING" (
     ...
   );

The above would create two distinct tables.

The keywords are case insensitive, but the column and table names can be
made case sensitive by putting them in quotes. If you omit the quotes,
the identifier is uppercased automatically.

In theory your are correct. In reality, no one does this. In
addition, no one creates tables with duplicate names in the same
schema differing only in case. If you do, please consider a career
outside of IT.

I don't know exactly how ActiveRecord works, but I would expect any
ORM to just do the right thing when it comes to table/column names and
case, i.e. it shouldn't care. At least, that's what I would do.

Regards,

Dan

thats awesome news, nice to see that it works *that* well.

···

On Fri, 26 Nov 2004 14:00:56 +0900, Nicholas Van Weerdenburg <nick@activehitconsulting.com> wrote:

I just installed the beta on my Mac OS X G4 450MHz box, and I'm ecstatic.

My page loads during development went from 8-10 seconds to mostly < 1
seconds.

Singe page loads, rough estimates:
0.8.5 rails Webrick, no caching: 8-10 seconds
0.8.5 rails Webrick, -c (not usable for development before): 4-5 seconds
Beta rails, webbrick, -c (caching): < 1 second

Cool. Now I can use my Mac for rails development!

Thanks,
Nick

David Heinemeier Hansson wrote:

>> thank you for your answer! Sounds really great! Can't wait installing
>> and
>> testing it :slight_smile:
>
>
> It's already possible now, today, to taste... THE FUTURE!!!
>
> Or with less dramatics, you can do "gem update -s
> http://gems.rubyonrails.org", and all the dandy beta gems will be
> installed on your system. You'll have to look at the changelogs to get
> an idea of what has changed, though:
>
> http://dev.rubyonrails.org/trac.cgi/file/trunk/actionpack/CHANGELOG
> http://dev.rubyonrails.org/trac.cgi/file/trunk/activerecord/CHANGELOG
> http://dev.rubyonrails.org/trac.cgi/file/trunk/railties/CHANGELOG
> --
> David Heinemeier Hansson,
> http://www.basecamphq.com/ -- Web-based Project Management
> http://www.rubyonrails.org/ -- Web-application framework for Ruby
> http://macromates.com/ -- TextMate: Code and markup editor (OS X)
> http://www.loudthinking.com/ -- Broadcasting Brain
>
>

--
Tobi
http://blog.leetsoft.com