https://www.railstutorial.org/#pricing
No affiliation at all, just want to encourage support to a resource that has been a net-positive to our ecosystem.
Still use the generators. It sets up the model, the tests and fixtures all in one command. It's a productivity win for me.
I say it's an excellent intro to someone with maybe some academic programming experience to get into web app development. it gives you the kick starter development plan you need to make a Twitter, db, grub hub, air bnb type startup alone or with a small team.
and... he keeps it up to date! with impeccable detail!
For those who don't know -- and I guess there are always new people -- this is probably the most famous Rails tutorial on the web.
It has the following impressive attributes:
1. Free
2. Goes through a good process
a. Backs up code to Git
b. Tests the code
c. Deploys it to Heroku
Other paid tutorials are often versions of this one.
(Apologies for never actually buying the book after working through the HTML version and loving it–I'll be sure to purchase a copy this month.)
I even bought the complete pack with the videos after reading just to show my appreciation to Hartl.
I am glad I learned and still use PHP and not RoR.
IMHO, there are way too many black-boxes and unnecessary abstractions for such a simple pattern as MVC, which is really nothing more then connecting HTML views to database fields view URI routes.
I recently struggled through my first Ionic mobile app, and all the prebuilt, "auto-magical" tooling stacks and opinionation I see in the tutorial leaves a sour taste in my mouth ie
gem 'rails', '5.0.0'
gem 'puma', '3.4.0'
gem 'sass-rails', '5.0.6'
gem 'uglifier', '3.0.0'
gem 'coffee-rails', '4.2.1'
gem 'jquery-rails', '4.1.1'
gem 'turbolinks', '5.0.0'
gem 'jbuilder', '2.4.1'
group :development, :test do
gem 'sqlite3', '1.3.11'
gem 'byebug', '9.0.0', platform: :mri
end
group :development do
gem 'web-console', '3.1.1'
gem 'listen', '3.0.8'
gem 'spring', '1.7.2'
gem 'spring-watcher-listen', '2.0.0'
end
group :production do
gem 'pg', '0.18.4'
end
All this for a "toy-app"?Call me old-school (and I am I suppose, altho I feel I make an hell of an effort keeping up to date), but I cut my programming teeth in C and always respected the very limited but powerful instruction set that language implements, and I, over the years now, respect PHP for creating very powerful constructs (like its magical array handling) but also keeping some C-like simplicity at its core.
Yes of course PHP has its idiosyncratic issues, but I still feel that one of the primary reasons it's so disrespected, I'm very sorry to say, is the snob factor thrown off by serious motherfucking programmers whom seem to feel that the simplicity and power of the language lowers the bar so low that it allows the "unwashed" into the room or something...
To me, thats not a bug its a feature.
That being said, if you were doing a toy app then you would take out PG. You don't need all the dev gems they just make your life easier / faster startup. If you come from php then you like to make your life hard, so webconsole and byebug are out. Your doing a toy app so you don't need turbolinks, coffescript, or Sass. It's a toy so what does it matter if a person downloads 3MB of javascript. Take out uglifier. You're not doing an API so jbuilder is gone.
This is the new Gemfile.
gem 'rails', '5.0.0'
gem 'sqlite3', '1.3.11'
People make Rails out to be some magical monster that know one knows what is going on. It's just Ruby at the end of the day.Here is a single file rails boot, that includes downloading the gems and running a test.
https://github.com/rails/rails/blob/master/guides/bug_report...
Also, consider that some languages' ecosystems have preferences for smaller vs larger standard libraries. Clearly most of the dependencies you listed are not actually required; they're made to be stripped out if you're not using them. It's disingenious to state that those are the minumum needed for a toy app.
Kind of blew me away. I know Rails seems to have waned relative to when coding bootcamps first became big, but I had thought PHP was well past its attractiveness for new developers, despite the number of PHP systems that need maintaining in the real world.
For back-end, Python & PHP are still my go to choices. Both are stable, have tons of libraries, have good frameworks and allow you to get stuff done quickly.
I think the tutorial could really use an explanation of what a web app is (a bunch of files in a particular structure that the special server knows how to handle) and why we need all the setup to handle it. Then it should explain what actions, controllers, and routes are and what they do, instead of just introducing the terms without meanings. It wasn't until the exercises suggested changing the route to a different action that it clicked for me.
BTW, I think that "goodbye world" is a horrible example to use.
Way too hard to really get going, but maybe it's an OK patience screener.
But for example, github doesn't have complex interactions and is not content heavy (in the walls of text sense) but its doing just fine as a non-SPA and users seem to like it the way it is.
Would a site like github benefit much from being a SPA instead of being server side rendered with some JS on the top?
I don't think so. Perhaps there could be some areas they could make the UI richer (say a dynamic code viewer that doesn't require page refreshes, etc)
However, bring it back to the beginning of your comment:
> having heard rails is not a hot thing anymore and SPAs being the new hot stuff
Github doesn't need to be a SPA, nor do most apps. I think many decisions are being made because it's "hot", but generally that's a very poor reason to choose something. (Though to be fair, there's probably many Rails apps that were built in Rails for that very reason)
SPAs carry an entirely new set of concerns. For months, I couldn't order a very important medication online from CVS because their specialty pharmacy site, written in Angular, was busted. I eventually figured out how to make it work by executing Javascript directly in the inspector.
Cannot speak about amount of junior/entry level jobs out there but in NYC Rails jobs are plentiful.
They almost always fail in some way upon use of the back-button (e.g. both Twitter and FB, among many others). The endless page pattern always either doesn't back-button to the right place or uses a smelly hack to re-paginate the endless page.
From the website:
Softcover is a new publishing platform based on the production system and business model used by the Ruby on Rails Tutorial by Michael Hartl. Using Softcover, authors can build multi-format ebooks (HTML, EPUB, MOBI, and PDF) from common source files, optionally bundle them with media like screencast videos, and publish them to Softcover’s integrated sales platform with a single command.
I converted http://www.cfenginetutorial.org from AsiiDoc to SoftCover -- the HTML build time plummeted from over a minute to just a second or two. Wow! And it looks better than it ever did.
That said, I've been looking for Rails tutorials/resources that are geared toward someone with decent experience with other languages/frameworks. Would y'all recommend this book, or is this more of "learn to code with Ruby on Rails"? If not this, any other resources that fit the bill?
When I wanted to learn Rails as a developer getting into web dev, I read the Rails Tutorial relatively quickly and did the major exercises. I thought it was well worth the time and would have bought a print copy to reference/scribble in if it had been released in a timely manner.
After that I got the Rails 4 Way, which I still refer to from time to time. It makes a pretty good reference or topical reader once you're more familiar with rails. It is more a book on how things are put together and why, as compared to 'this is how to do X step by step.' I imagine there will be a new edition for rails 5 soon. This would probably be my first recommendation for you coming from Django.
I didn't find the official documentation to be all that helpful until after I had finished that reading and understood the rails system a little better. Now I use the documentation a lot more. The rails source I occasionally refer to, but it is rather painful to read if you're not deeply entrenched in the ruby/rails metaprogramming idioms.
I also have a copy of Agile Web Development with Rails 4, and I never open it anymore. I tried to get through it, but I find it a rather poor book. It is very light on details, or just content in general. Personally don't think it's worth the time or money.
Obviously I like reference books, I find writing in margins and physically flipping pages helps me learn. YMMV!
Another resource would be GoRails. Some of the videos require a membership though.
All the best!
Also if you'd have taken a few seconds to open the link to the book and skim through the opening paragraphs you might have read this sentence:
> There are no formal prerequisites to this book, and the Ruby on Rails Tutorial contains integrated tutorials not only for Rails, but also for the underlying Ruby language, the default Rails testing framework (minitest), the Unix command line, HTML, CSS, a small amount of JavaScript, and even a little SQL.
1. Nowadays I mostly advice newcomers to start with sinatra instead of rails, because rails keeps growing in scope and the surface to cover is huge
2. Lots of things rails does might seem magical if you don't know ruby
Don't get me wrong, rails is still bread and butter of myself and other rubyists, but for a newcomer to start with rails is a somewhat strange/scary thing to do.