3 ms·
I'd get a stronger command of Ruby first. It'll help you, and Ruby is awesome. Rails may not be your thing even if Ruby is. It's probably not the best way to l
by jackowayed 16y ago
I'd get a stronger command of Ruby first. It'll help you, and Ruby is awesome. Rails may not be your thing even if Ruby is.
It's probably not the best way to learn Ruby, but the most fun way is definitely reading _why's poignant guide[1]. It's awesome and teaches you pretty well (you can find PDFs and such out there too).
Once you're satisfied with your command of Ruby:
I'm not really sure what the best way to get started is. I think RailsGuides[2] is supposed to be pretty good. The "getting started" page looks good and complete. When I started, the first thing I did is read the very-introductory parts of the Pragmatic Programmers' book[3], which is great. I didn't bother with the whole thing, just got the basics from it and then learned by doing, occasionally referring to it.
Once I read a few chapters of the pragprog book, I looked at official rails docs (I think it was guides.rubyonrails.org, but that site has evolved a lot since then), got started with something pretty simple, and googled if I had any trouble. For specific issues like getting exceptions, the api documentation[4] can be pretty useful. Though really, you should use apidock.com/rails because it's way more searchable (it's the same docs, plus some comments that apidock users have added, they just made a better search and made it less ugly).
Also, if Rails isn't doing it for you (especially if you do love Ruby), take a look at Sinatra and Padrino. There's of course way more plugins out there for Rails, but you can still use any gems (libraries), and it can be less annoying than Rails.
I'm not sure of any good ways to get used to MVC thinking. It wasn't that hard for me to get used to. What's the issue when it comes to MVC? Not sure where to put which code?
1: http://mislav.uniqpath.com/poignant-guide/ http://mislav.uniqpath.com/poignant-guide/
2: http://guides.rubyonrails.org/ http://guides.rubyonrails.org/
3: http://pragprog.com/titles/rails4/agile-web-development-with-rails http://pragprog.com/titles/rails4/agile-web-development-with...
4: http://api.rubyonrails.org/ http://api.rubyonrails.org/
EDIT: Forgot to mention that railscasts.com has awesome screencasts on all kinds of topics.
I also forgot to mention that restful_authentication is really old. Use authlogic.
- NathanKP 16y agoThanks for the links. For me the problem with MVC thinking is that I am used to my own system of MVC that I programmed for my personal PHP toolkit. My version of MVC allows me to just write something like: <form> <?php databaseInput("tablename",$id,"keyName"); ?> <?php databaseInput("tablename",$id,"keyName2"); ?> </form> It is very simple and works great with key value databases. My code system is designed to automatically detect the type of the key and output the appropriate control, even building dynamic AJAX controls such as input fields with attached google maps if the key is an address key. After getting used to my own incredible easy to use MVC style system Ruby feels complex. I can use the generate script to build scaffolds, but then the generate script does so much that I can't really grasp all the connections. For that matter I don't even see if it is possible to create a model with key value storage. The Rails generate scripts don't seem to have an option for that. Perhaps you are correct that Rails might not be the thing for me, but I do really like Heroku, and want to be able to use it to enjoy the ease of scaling a web app by just dragging the slider upward. That means I need to build in Rails. In addition, I feel that it will probably be better in the long-term to understand Rails thoroughly. Edit: I just wanted to add that I have read _why's poignant guide and found it very useful, if a little less formal than I am normally used to. ;) I think that I have enough of a grasp on Ruby itself, and I have already developed a few standalone scripts. What I don't understand is all the things going on behind the scenes in the Rails code, and that is my stumbling block.
- jackowayed 16y agoYou may find some comfort in things like form_assistant[1] or formtastic[2]. In Rails 2, you can't have a model backed by a key-value store. Rails 3, which has a release candidate out, should make that doable. Sinatra (with and without Padrino) also make it easy to use a k-v store. I think there's a good Redis library out there. I've used rufus-tokyo, which is a ruby library for Tokyo Cabinet, and it's solid. Though now there's Kyoto Cabinet. I'm not sure what the libraries are like for it. 1: http://github.com/rpheath/form_assistant http://github.com/rpheath/form_assistant 2: http://github.com/justinfrench/formtastic http://github.com/justinfrench/formtastic
- NathanKP 16y agoOkay, it sounds like I'll have to try Rails 3. I'll check out the other github links that you gave me as well.
- mrduncan 16y agoForgot to mention that railscasts.com has awesome screencasts on all kinds of topics. - Also, if you prefer to read them instead of watching, most are available on http://asciicasts.com/ http://asciicasts.com/. Also, a word of caution - http://guides.rubyonrails.org http://guides.rubyonrails.org is currently based on rails 2.3. http://edgeguides.rubyonrails.org/ http://edgeguides.rubyonrails.org/ is probably the best place to look for the moment if you want to start with 3.0. The edge guides actually follow the current master branch while the regular guides follow the current stable branch. Since 3.0 is kind of in limbo between the two (as an RC, it has it's own stable branch, but it hasn't been released yet), it's pretty much completely in sync with edge. Once it's released, everything should switch over to guides having info for 3.0 (the index page should list what version it's currently for). ...That was probably more than you ever wanted to know about Rails guides.