Live data from Hacker News

Ruby on Rails Tutorial

railstutorial.org

21–30 of 82 posts

Re: Ruby on Rails Tutorial

#21

Beginner question, having heard rails is not a hot thing anymore and SPAs being the new hot stuff, where do you guys draw the line between a SPA and a server rendered web app? I can see the extreme side cases, the highly interactive web app vs content-heavy-but-not-that interactive web app. But for example, github doesn't have complex interactions and is not content heavy (in the walls of text sense) but its doing ju…

You can have an SPA and still use Rails. Rails would just serve JSON instead of the HTML. Your JavaScript frontend would use that JSON to display stuff and handle actions. Plenty of companies do this. Cannot speak about amount of junior/entry level jobs out there but in NYC Rails jobs are plentiful.

Are there any recent, up-to-date and comprehensive tutorials that show how to use React with Rails while following the conventions of both frameworks? Every tutorial I've seen focuses on either one, but I haven't found one that focuses on both.

Re: Ruby on Rails Tutorial

#22
post #17
post #3

I'll always be upset that my college web development class got changed from following this tutorial to early 2000s PHP without a database.

You know, I'll probably be bammed for saying this, but reading through this very well-made tutorial gave me the opposite reaction. 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 Ioni…

That's an unfortunate viewpoint. The point of higher level languages is to provide abstractions. To say PHP is just the right combo of not too high level enough but not too low level is some kind of mental gymnastics to justify its existence. The same argument could be made for using C over PHP.

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.

Re: Ruby on Rails Tutorial

#23
post #5

Earlier quoted context omitted.

Whoa. How did that come about?

Professor thought it'd be better to "learn the basics" first, whatever that means. Just another example of academia being out of touch. At least it was an easy A.

PHP has a lot less "magic" in it, so using it will force you to learn a lot of concepts and conventions that Rails takes care of for you (which can have its negatives).

Re: Ruby on Rails Tutorial

#24
Love this tutorial. Michael is one of the best teachers I've encountered. It's such a great tutorial that I hesitate to ask, but I'm not the biggest fan of the Cloud9 IDE stuff that was added in the later versions, though. Anyone else?

Re: Ruby on Rails Tutorial

#25

Beginner question, having heard rails is not a hot thing anymore and SPAs being the new hot stuff, where do you guys draw the line between a SPA and a server rendered web app? I can see the extreme side cases, the highly interactive web app vs content-heavy-but-not-that interactive web app. But for example, github doesn't have complex interactions and is not content heavy (in the walls of text sense) but its doing ju…

My sense is that SPAs are for unidirectional information architectures: click on something, then click on something in that something, and so on, ever forward.

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.

Re: Ruby on Rails Tutorial

#26
post #17
post #3

I'll always be upset that my college web development class got changed from following this tutorial to early 2000s PHP without a database.

You know, I'll probably be bammed for saying this, but reading through this very well-made tutorial gave me the opposite reaction. 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 Ioni…

Personally, I just don't like PHP because I think the syntax is aesthetically ugly.

Re: Ruby on Rails Tutorial

#27
post #17
post #3

I'll always be upset that my college web development class got changed from following this tutorial to early 2000s PHP without a database.

You know, I'll probably be bammed for saying this, but reading through this very well-made tutorial gave me the opposite reaction. 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 Ioni…

By those criteria I have to wonder why you're not working in Perl, which is even closer to C and the metal than PHP.

Re: Ruby on Rails Tutorial

#28
post #17
post #3

I'll always be upset that my college web development class got changed from following this tutorial to early 2000s PHP without a database.

You know, I'll probably be bammed for saying this, but reading through this very well-made tutorial gave me the opposite reaction. 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 Ioni…

First, Rails is not intended for toy-app. You can build it but RoR is production ready apps. So the stack you get reflect that. Also, you can drop like half of those gems if you do not need them. And finaly, if you are going to do any non-trivial app in PHP you will either reinvent similar libs yourself, or you will use Symfony, Laravel, etc. and get a comparable bunch of dependencies with Composer.

Re: Ruby on Rails Tutorial

#29

Earlier quoted context omitted.

Professor thought it'd be better to "learn the basics" first, whatever that means. Just another example of academia being out of touch. At least it was an easy A.

PHP has a lot less "magic" in it, so using it will force you to learn a lot of concepts and conventions that Rails takes care of for you (which can have its negatives).

PHP can be compared to Ruby. Rails can be compared to Symfony or Laravel. It makes little sense to compare a language to a framework though.

Re: Ruby on Rails Tutorial

#30

Earlier quoted context omitted.

You can have an SPA and still use Rails. Rails would just serve JSON instead of the HTML. Your JavaScript frontend would use that JSON to display stuff and handle actions. Plenty of companies do this. Cannot speak about amount of junior/entry level jobs out there but in NYC Rails jobs are plentiful.

Are there any recent, up-to-date and comprehensive tutorials that show how to use React with Rails while following the conventions of both frameworks? Every tutorial I've seen focuses on either one, but I haven't found one that focuses on both.

There's a reason why you don't see specific Rails+React tutorials - since they're just communicating with each other other JSON, Rails doesn't need to know or care that it's React, Angular, or whatever on the other end.

The reverse is true for React, it doesn't care where the data's coming from.

You'd simply want to look for a Rails tutorial that focuses on building an API using Rails.

It's probably slightly easier to learn React first IMHO.

Post reply on HN