Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
tl;dr: I want a high-level introduction to Rails, which covers what I need to get started with proper reference materials. I don't need basic concepts explained.
--
Ruby and rails both seem nice, but the documentation, although voluminous, seems to be all tutorials targeted at people who aren't that experienced as programmers or web developers, or be super-terse snippets on how to use various libraries for people who already know all about rails and ruby.
The material I'm seeing seems to be very task-oriented, which is alright if you want to follow it through without much understanding, and are able to memorise a bunch of things. I, by contrast, do not have a great memory, so I want something concise, which explains the concepts and conventions, and how they fit together. I don't need anything that "introduces" any programming concepts - I'm familiar with functional programming, late-binding, object-orientation. I'm familiar with web technologies (or at least, sufficiently so that I can learn about them). I can read code and api documentation, but I'd rather have something that lets me see the big picture first. I can look at the various resources about the language (or even better, I'd love to also look at documentation for ruby in the same vein as what I'm asking for in relation to rails).
The closest to thing I have seen to what I want is the ruby guides, but they are still very much written in a fragmented and task oriented style.
I'm not a fan of programming books (generally either too linear, becomes out of date more quickly than suites of docs maintained online), but if the best material is published in that form, so be it.
I don't think I'm that unusual in any of these respects - plenty of people know a huge bunch of stuff (a lot more than I do), don't need their hand held, but want to start exploring with a minimum of fuss.
Any suggestions?
You might be interested in Agile Development with Rails by Sam Ruby, Dave Thomas.
You could skip the "Building Application" part and go straight to Rails in Depth part.
I quote the introduction to this last part:
For the rest of the book, we’ll go through Rails topic by topic (which
pretty much means module by module). You have seen most of these modules
in action before. We will cover not only what each module does but also how
to extend or even replace the module and why you might want to do so.
The chapters in Part III cover all the major subsystems of Rails: Active Record,
Active Resource, Action Pack (including both Action Controller and Action
View), and Active Support. This is followed by an in-depth look at migrations.
Then we are going to delve into the interior of Rails and show how the com-
ponents are put together, how they start up, and how they can be replaced.
Having shown how the parts of Rails can be put together, we’ll complete this
book with a survey of a number of popular replacement parts, many of which
can be used outside of Rails.
But first, we need to set the scene. This chapter covers all the high-level stuff
you need to know to understand the rest: directory structures, configuration,
and environments.
I don't know if I have right to paste this but if that can make you buy this book, I'm sure the author would agree!
To become good at Rails in my opinion you should first be sure that you understand Ruby well. I would suggest browsing through (careful reading is not necessary if you're already an established programmer) some of the basic ruby books like: Why's Poignant Guide to Ruby
and Programming Ruby.
After this, you should become familiar with the Rails API's and DSL's, I would suggest beginning with reading Ruby on Rails Guides. When you understand the Rails basics the ultimate Rails reference is Ryan Bates' excellent Railscasts. If you don't like watching videos the site has an ascii mirror. Even if you don't have a specific task in mind, go watch a few of these to really understand the way problems are tackled in Rails.
Ofcourse when it comes to actually gaining skill in developing Rails skills, it is imperative that you try your hand at actually making a few Rails applications. Rails has a notoriously steep learning curve, so it's best when you have tried a few simple unimportant applications before you try to build your life's work with Rails.
Related
For the past few months i've had the feeling that i reached a boundry in my knowledge of Ruby on Rails (RoR) development. I've developed large and small applications for both big/small clients and friends / hobby projects. I know how to develop these applications and it's beginning to feel a little bit tedious. I want to take my programming skills to the next level, me having a little experience with Javascript i enduldged myself in some good Javascript books and learned alot! But now i'm back stuck at the same RoR level that i've been for the past few months. and i want to get that knowledge boost i got from the Javascript books.
I really want to contribute to alot of open source projects but when i look at the source code i get the feeling that i dont know enough of the code and that i will become a irritating burdon to the main developer(s) of the project(s). This is just some uncertainty of mine but i dont want to tire/irritate other developers...
I feel stuck and i dont know what to do to up my own level. I try to read the source codes but often i get stuck with mainly the question "why are you doing this, and what are the benefits of it? And how does it work?". I know i want to up my knowledge of both ruby and rails but i dont know how to do this. In my time programming RoR it's been very difficult for me to pinpoint my "skill level" knowing i can always up my skills. So knowing this i started with some basic Ruby books: The well grounded Rubyist and Beginning Ruby. These were great books i learned some nifty little tricks but that's about it.
Do you guys recommend any resources and or books. I don't have alot of experience with other languages than Ruby / Javascript. But i really want to learn, i don't have a solid programming background because it mainly evolved from hobby to work. I want to contribute to open source projects and work and mainly learn from other great developers. I'm stuck and i don't know where to start.
Thanks in advance.
A few books:
Eloquent Ruby
Rails Anti Patterns
Crafting Rails Applications
Then, armed with knowledge, you'll be able to read code (your first and good intuition): that's a great source of inspiration.
There's a lot of good material at Railscasts which is worth looking through. You can learn a lot about current practices, something doubly important when a lot of the Rails material out there is for 2.x or 3.0 and doesn't reflect the state of the art.
The best way to improve your skill is to find new challenges to exercise yourself. You'll need to work on general Ruby and general programming as well as improving your knowledge of the Rails framework.
Set aside time to read and understand the various APIs you're being exposed to. The more you know your toolbox, the less time you'll waste trying to do something that's already implemented. APIDock is one of the many documentation aggregators out there for Ruby and Rails. As Ruby is generally quite readable, it's even educational to browse through the source for the libraries you use and see what methods are offered as well as any insight you might gain from observing how they're implemented. Often there are interesting use cases that are never fully documented but will serve you well when you need them.
There's a lot more to say, but really, it's a long journey. That's why people write things like Teach Yourself Programming in Ten Years as a counter-point to the "Teach Yourself X in 21 Days" books plague the industry.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I am still new to web framework and I am thinking of choosing either Ruby on Rails or Django. Which one should I go for as a beginner?
If you don't know either, you're maybe a little better off with Ruby on Rails...
If you are experienced with programming at all, try this: I have found that almost all of my developer colleagues decide on RoR or Django based on the language. Both are a quick pick-up, and more often than not, one of the two languages will just "speak" to you.
I'm somewhat OCD with my code (and life) and for me, Python was a better fit. I felt calm while writing it, and more importantly, calm while reading it. However, the guy that sits next to me - and I have a mountain of respect for - found Ruby to be more appealing.
So my suggestion? If you already know how to write code and the meaning of Object Oriented, spend a day with each language. Almost invariably, you'll respect one, and fall in love with the other.
THEN pick a framework :)
I have no experience in using RoR but 3 years of knowledge about Django. A very huge advantage of Django is its very good Documentation.
Especially for a beginner this might be the most important fact. Even most of the third party apps (pluggable modules/plugins) for django are document very good and are easy to use.
On the other hand Django code is in IMO more readable since its Python code - Ruby code tends to get messed up a bit faster.
I'll assuming you don't know Ruby or Python already, since that would be the number one determinate of which way to go. Having developed both Rails and Django projects, my take is that you probably can't go wrong with either, but my feeling is that Django is better oriented towards building sites for publishing, whereas Ruby is more oriented towards webapps. This is not to say that you can't build a great web app in Django build an awesome CMS in Rails, of course. But take a look at most of the high profile users of Django: NYTimes, The Guardian, Washington Post, LA Times, The Onion, AV Club, Everyblock. Those folks are more oriented towards publishing. Meanwhile, things like GitHub, BaseCamp and Twitter (partially) run Rails. So ask yourself what type of sites you are likely to be building and go from there. But really, like other posters have recommended, there's no reason no to spend a few days playing around with both and seeing what feels like a better fit.
Both are good. From experience, though, you'll get better and more up-to-date documentation most of the time for both Python and Django.
Both are GREAT!! by I prefer Rails because of:
MVC! Model View Controller.
The wide community of Rails.
Many big projects like Twitter, 37signals products are built on Ruby on Rails.
The BIG and the HUGE libraries and gems for Rails/Ruby.
and many other reasons. Well, you have to see this: Rails Django-Comparison and rails-vs-django
Amr
This is a little subjective since it can depend in no small part on your general programming background. Do you know Python? Do you know Ruby? In general, you're best off choosing the framework for a language you already know since then you're only learning one new thing instead of two.
If you don't know either, you're maybe a little better off with Ruby on Rails due to its greater mind-share in the general development community currently. This will make it easier to find help and example code online.
This question already has answers here:
Closed 12 years ago.
I've read several other questions about material in order to learn RoR. But my question is can I start learning RoR without Ruby?
It's clear that the other way around is better, but I would rather try this way if it makes sense (somehow). Or learn both in parallel...
Well, given that Ruby on Rails is just Ruby written in a particular fashion (read: framework) yes you will need to learn Ruby.
You will need to learn these things about Ruby (amongst other things):
Everything Is An Object. Everything. Yes, even 2 and "foo"
Class Inheritance and What It Does(tm)
How to tell the difference between class and instance methods
Modules and how to use them correctly (class_eval Is Your Friend)
People write gems. Use them. Re-inventing the wheel is fine and dandy for learning but re-inventing it because you think your method is better is not.
And these things about Rails:
Do not fight conventions.
Do not fight conventions.
Model code goes in the model.
Controller code goes in the controller.
View code goes in the view.
Helper code goes in the helper.
Ask yourself "Does Rails have a helper for it?". If the answer is "No" ask somebody else. The answer is likely to be "Yes".
And these things in general about learning:
Google it.
Google it again.
If the answer you seek is not within Googling distance, formulate it in a way that is kind to those who may know the answer (such as you've done with this question!)
Appeal to people's greater motives. How can helping you, help them?
Try not to be too much of a help vampire.
If asking in an IRC channel, use a pastebin service such as http://pastebin.com, http://pastie.org or http://gist.github.com
Second rule about asking in IRC: Don't ask "any ideas?" after your question. Your question should already ask this by itself.
And finally: Love what you do.
People used to say that you could learn RoR without knowing Ruby (including DHH, if I am not wrong).
But in my opinion, if you also know Ruby, you can do a lot more stuff than without knowing it. And the knowledge would be very helpful when you debug or troubleshoot your programs.
So my suggestion is learn both in parallel.
You can. RoR is in a way a domain specific language, since a lot is defined for you and putting a simple application together can be like following a straightforward recipe. It would of course be better to learn the language properly, but many people don't.
The Ruby For Rails book tries to teach you both at the same time, so you might want to look into getting that one. I haven't read it but I hear it's pretty good.
Obviously :) ... if you really want to develop good web apps ...
But it will also be interesting to first get your hands wet with some RoR sample applications using inbuilt features that RoR provides... and then learn the details(which will require knowledge of Ruby)
If you avoid learning Ruby, (that many of the RoR developers do)... then you will find yourself stuck at position and going through an alien code. And eventually you might leave RoR out of frustration. I have seen many of such cases.
The question you ask is slightly ambiguous. Specifically, you could be asking "Can I learn Rails without first knowing Ruby?", or "Can I learn Rails without having to learn Ruby too?".
The answer to the later question is probably no, if you want to be particularly functional with it. Without knowing Ruby, it would be hard to take advantage of much of Rails' power.
The answer to the first question is most certainly yes. While knowing Ruby first would make learning Rails faster/easier, you can easily learn both at the same time. That's actually how I learned Ruby/Rails, by taking a site I had to implement first in Java and re-implementing it using Rails.
You need to know both, The RoR framework is an organizational and convenience system if you will, what it organizes is your ruby code.
If you have programmed before then here are most of your answers:
http://www.ruby-doc.org/core/
http://railsapi.com
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I have a boss who is convinced learning Rails is too steep a learning curve and not cost effective from a labor standpoint when straight Ruby running as a CGI app on Apache is available. He is proposing, for our rewrite, that we use straight Ruby w/ no framework rather than Rails (or Merb, Sinatra, etc.) I believe in my heart that this is a bad idea but I'm having trouble putting my case into words. Some ideas I've come up with so far:
Rails promotes better code reuse and better separation of concerns via MVC
A shop running rails will look more attractive to the qualified job seeker, since Rails looks better on his/her resume, is more fun to work with, etc.
(I may be wrong on this one) Rails will have better performance on Passenger because Passenger automatically pools connections to the database where as a handrolled CGI app would have to manage that itself or not at all resulting in worse performance.
Rails is a proven technology, at least certainly more than a handrolled CGI framework
Are there any reasons I'm missing or wrong about? Are there valid tradeoffs I'm not aware of?
There are occasionally good reasons for a company to roll their own framework instead of using a standard Rack-compliant framework. But "Rails has too steep a learning curve" is not one of them.
Doing it brute-force is actually more complex, rather than less. If your boss is really worried about learning curve, he should use the standard framework that has documentation and articles and screencasts and entire hosting companies dedicated to it.
Besides, Rails is dead easy to develop for. I've taught one-day workshops on Rails, and even people who have never programmed before have a working, deployed app by the end of the day. Experienced developers have an even easier time of it.
If your boss doesn't understand Rails, and rather than figure it out, he's giving you this line about Ruby over CGI...be careful. Technology left him behind 15 years ago, and he's no longer qualified to make technical decisions.
He should be moved into marketing without delay.
Does your boss have any reasons for his conviction? Other than "a feeling"? What are his real concerns - you won't have much success in changing his mind until you have worked out what his underlying concerns are. Don't be surprised if they turn out to be substantially different to what he's currently saying. He may have an irrational fear of Danes, for example.
Do you have any concrete reasons for disagreeing?
As a boss, I wouldn't be too swayed by the reasons you list so far: good design/coding practices don't need a framework, recruitment isn't your concern, performance optimisation? Don't do it? How more proven than CGI? (He might say, not me: I drink the Rails Kool-aid every day).
Is he technical in a current sense? I mean, will he be involved in coding the rewrite? If so, might he be open to a challenge? Pick a subset of features, buildable in a day or two and try it both ways. If he's not technical, why does he think your opinion is less valid than his?
If he's concerned from a cost/effort perspective, why does he believe that writing less code (and getting thousands of lines of useful, tested framework code for free) is more costly and/or more effortful than otherwise?
Someone else has already mentioned "managing up" - I suggest Googling for resources on ways to work on this.
Are there other members of a team involved? How do they feel?
Martin Fowler famously (in the Agile world at least) said something like "if your organization is not doing what you think it should, you should change your organization". There are at least two ways to read that...
I think a potentially great idea would be to use parts of RoR(Cough ActiveRecord) and roll your own stuff if it simplifies things... I'm not a framework kinda guy, I prefer libraries and a certain degree of code abstraction, which is why I could never be mistaken for a RoR fanboy... but I think getting him to use certain parts of rails, might turn into using all of rails.
Only other point I would like to make is that MVC isn't rails only and if you rolled your own then you could very easily follow that design pattern... besides rolling your own can have benefits... for one thing, you'll know exactly what everything does and how it works, self rolled would mean a leaner system, that you can modify more easily...
My final answer is meet in the middle... Ruby is EXTREMELY powerful in the hands of creative programmers... in fact, I'm in the process of re-rolling my 2 months of rapid "throw-together" php/jquery prototype into a erb/jquery site...
--Thinking out loud--
Not trying to crap on Ruby on Rails... but Rails are what trains go on... and trains do go fast... but they only go where the tracks take you. I'm more in favor of a "Ruby off Road" environment. Less speed, More control.
Using Ruby on Rails versus just Ruby is the difference between buying an automobile and welding a unicycle out of a single tire: both will get you where you are going.
At heart though, I think this is less a technological issue and more an issue of "managing up" as the decision NOT to use Rails is so laughably bad at this point as to be nonsensical.
I think you have two options:
Sort out a way to make it seem as if using Rails was your bosses idea all along. You might say something like: "Boss, I've heard what you've said and so instead of using full blown Rails, I'm just going to use it as a basic framework and do most of the work in straight Ruby."
Take the initiative to do a prototype of the development over a weekend, give your boss something provable that says: "This is clearly the way to go".
Good luck.
It's not a very steep learning curve. You might want to ask him to walk through a tutorial before making a decision.
Also, a big advantage is that RoR is a pretty popular system right now. Installing plugins is trivial, there are many deployment options already figured out--basically a lot of the work that isn't directly "Programming" will probably be easier.
And active record--it's so useful that it's difficult to imagine doing a web/database app without it any more.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I have been interested in learning Rails for some time now and feel now is as good as time as ever to dip in and actually get my hands dirty. I've spent the past week reading every free ebook on Ruby and Ruby on Rails I can find. I just finished reading Ruby Essentials. I have also been playing with http://tryruby.hobix.com/
I have installed Ruby, Rails, MySQL, PHP, phpMyAdmin on a Windows XP machine, I also have access to a Ubuntu machine.
I come from several years of PHP experience and around a year using CodeIgniter.
What I would really like now is a fairly basic Rails app that is a little more in depth than Hello World but not quite up to par with say a forum or blog.
I find its much easier to learn how something works when I can play with already made code and do some trial and error changes.
What I am really looking for is that 'Ohhh, I totally understand now!' moment I had when I first started learning PHP.
Does anyone have an app or know of one that could possibly provide that moment?
Check out the screen casts on Rails at BuildingWebApps . I've watched several and they have been exactly what I was looking for when learning rails. They start simple and keep adding more and more functionality. The commentators move at a good pace and subscribing to the lessons is free.
If you want something that is built already build the sample application that comes with Agile Web Development on Rails, buy the pdf from pragprog.com, the latest version is set to work with Rails 2.2, so will work with 2.3 as all the basic features of the framework will be the same.
When you are ready to move on from that, the Rails Guides website is all new and is a great resource for all developers new and old.
dwc is right though, a blog is a good thing to start on your own, so when you are confident give it a go, even if you don't put it in production it will help you along.
I would recommend railsforphp.com. They have a PHP to Ruby reference which could be quite helpful.
You can also buy the 'Rails for PHP Developers' book as either a paper or digital copy (or both if you really want to). The book is full of examples that show the PHP way and how it compares to the Ruby/Rails way.
As for ready made code, I suggest having a play with Enki. It is a somewhat bare-bones blogging system that should give you a good testing ground.
You should rethink your idea that a blog is too complex. At it's simplest a blog is a textarea and a submit button, and then storing and regurgitating the results. Start with that to get your hands dirty, then add features as you go. In fact, why not practice some Agile and do your own iterations?
The Rails Guides are nice http://guides.rubyonrails.org/
If you don't like the blog idea, you could make a wiki, this isn't very complex either. you simply need a edit button on every page with the text from the linked to it. This will teach you how to handle rails and play with ruby for things like regular expressions and such.
Take your time, break down these problems and and they should be easy for you to solve with rails.
And go on IRC (server freenode channel #rubyonrails) you can use MIRC for that. Ask questions there, I usually am there, (look for nims).
My suggestion would be to start with a simple CMS. This is something you can continue to use and expand as your skills progress and you start other more complicated projects. In the most basic form, this consists of a Page model, and a Topic model. You could then add a User model, some login capabilities and a simple admin interface. After all, Rails was originally envisioned to make it easy to CMS type sites.
As you get this up and running, you can add some plugins to extend the functionality to include tagging, comments, and more. Or you can roll these capabilities yourself.
Set up an account on Github and learn how to use Git. Its great, and better than what you used before (if anything.) You should also learn rake, and capistrano, as these are huge timesavers and work hand in hand with Rails and Github.
http://blog.caboo.se/articles/2007/4/11/sample-rails-application
http://www.railsinside.com/elsewhere/100-7-barebones-rails-apps-to-kick-start-your-development-process.html