.NET programmer going on Ruby On Rails [closed]
I have pretty solid experience with .NET Web apps (C#, F#, Javascript, SQL, MVC, JQuery, etc). It looks like I will have to do some Ruby on Rails now.
Any recommendations/references as to what's the best/fastest way to come up to speed with Ruby On Rails development?
I am talking about getting up to speed with the language itself as well as with IDE (if any), runtime deployment, etc.
To learn Rails and develop your first app, look at:
http://pragprog.com/titles/rails4/agile-web-development-with-rails
As written in this book, IDEs aren't really used by Rails developers. Even if some exist, most people use smart text editors with useful shortcuts such as Textmate.
For deployment, you'd learn to use capistrano.
To conclude, the best tutorial ever is here (it's fully online, in your browser, no installation required): http://railsforzombies.org
if you are familiar with asp.net mvc then you are in pretty good shape to get started with Ruby On Rails, the ruby language is easy-peasy-japaneasy (quite literally) and since C# has introduced lambdas the main diffence in day to day programming as compared to asp.net mvc syntax, here is a guide to get started
The main difference between Ruby On Rails and asp.net mvc is (imho):
- Ruby On Rails comes with an ORM preinstalled (ActiveRecord)
- In Ruby On Rails you use migrations to define the properties in your model classes, the migrations makes sure they get into the DB schema, in runtime they are inferred from the database schema
- In Ruby On Rails there are a lot of utility-methods that don't even exist, but Rails will, just before it throws "unknownmethodexception" do a check to see if the name of the just called method makes sense (e.g. Person.getBySSN('...') ), in that case if SSN is indeed a column of the Persons table, then what you meant was obvious so Rails will just do it, if there is no such thing as SSN on a Person, then you obviously don't know what you are doing and Rails throws the unknownmethod exeption)
- In Ruby On Rails you use the command line very much to get code generated for you
精彩评论