Should I Learn RoR

Hi Folks,
I’m a veteran ASP.net programmer of 3 years, just got my MCTS for
ASP.net 2.0
I would really appreciate if anyone could give me some thoughtful
comments on wether I should learn RoR (knowing nothing about it at all
except looking as some astonishing screencasts)

Could you also point me to links and book recommendations?

I’d really appreciate a breakdown of why this is so worth learning.

Regards and Many Thanks in advance
MM

MM –

I am in a similar boat as these guys, coming from a Microsoft
background and I can’t recommend their site enough.

http://softiesonrails.com/

Regards,
Ed C.

On 1/19/07, MereMortal [email protected] wrote:

I’d really appreciate a breakdown of why this is so worth learning.

Reason number one: because it will make you a better ASP.Net programmer.
Or
more generally, it will make you a better programmer and makes you more
marketable.

Learning something like Ruby and Rails provides you with a different
perspective on how to solve problems and how to program. This knowledge
is
not limited to being used just with Rails, it can be applied to problems
being solved in ASP.Net.

One good video that I would recommend is Chad F.'s, Don’t Follow the
Lemmings[1].

In terms of books, check out either THE book - Agile Web D.
with
Rails, or Burce Tate’s Ruby on Rails Up and Running. The later book is
shorter, but still gives a good overall view of Rails.

[1] http://video.google.com/videoplay?docid=-8984753198261505541

Chris


You know you’ve achieved perfection in design, Not when you have nothing
more to add, But when you have nothing more to take away.
— Antoine de Saint-Exupery

Thanks Ed C. and thanks Chris

Ed C. I loved the pics on the website (softies) where the guy ditches
his huge collection of Windows Books (which I also have) for a small
collection of Rails books.

Chris many thx for the thoughtful advice…

I’m writing here from london and I wonder if either of you know if there
is a thriving need for Rails in the commercial sector. Is rails viable
for fully blown commercial work or is it some purist’s dream?

On 1/19/07, MereMortal [email protected] wrote:

another question:
is it also the case that in Ruby, you just design the relational tables
in an RDBMS (say like MySQL0 and Ruby turns them automatically into an
object hierarchy? is that all you have to do?

yes, if you use a plugin such as DRYSQL. If you don’t you’ll need to
specify has_many and co relation stuff in your models.

another question:
is it also the case that in Ruby, you just design the relational tables
in an RDBMS (say like MySQL0 and Ruby turns them automatically into an
object hierarchy? is that all you have to do?

Regards and thanks
MM

thx, but as I understand it, (I didn’t know about the plug in or not),
it’s the case isn’t it that because of he way that Rails is constructed,
you don’t have to write tons of middleware that interfaces with your
database schema as once you design the schema you work with it
transparently.

I ask this because the amount of code needed in ASP.net to create a
business layer (BLL) and a data layer is staggering, this is quite apart
from the stored procedures etc…

so once the Relational tables are created, you do a couple of swishy
commands and you’re read to see your pages, no?

many thx to all!
Regards
MM

Patrick A. wrote:

MereMortal wrote:

another question:
is it also the case that in Ruby, you just design the relational tables
in an RDBMS (say like MySQL0 and Ruby turns them automatically into an
object hierarchy? is that all you have to do?

yes, if you use a plugin such as DRYSQL. If you don’t you’ll need to
specify has_many and co relation stuff in your models.

You answered the high-level question.

The low-level question is this. If you have a database with a table in
it call People, and its primary key is called ‘id’, and you have a
config/database.yml file pointing to it, then this is all the Ruby you
must write to access a record in the table

class Person < ActiveRecord::Base
end

That gives you several million convenience functions to access any
Person by any attribute, and upgrade & write that Person back.

p = Person.find(42)
p.name = “Forsythe”
p.save!

The system reads the People schema and builds all the elements of the
Person object automatically. Oh, and it also changes the number of the
nouns, where appropriate.

Next, you might want to “refactor” your database. That’s typically
hard, because customer data must survive upgrades. Rails provides a
complete “migration” system to let you express database changes as
high-level commands, such as rename_column or add_column.

Next, if you have relations in your database, you can match them with
Rails relations:

class Person < ActiveRecord::Base
has_many :pets
end

That pulls in another table, Pets, and matches the person_id in each
pet with the id of each Person. That provides lines like…

dogs = person.pets.find_by_species(‘dog’)

Patrick answered the question “why doesn’t the schema reader also read
the relations and automatically set all the has_many and such
directives correctly”. Default Rails doesn’t do that because you
typically want a minor subset of all the relations.


Phlip
http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs