Hacker News new | past | comments | ask | show | jobs | submit login

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).


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.


Nonsense. It makes great sense to compare some languages to some frameworks, for some purposes.

Yes, PHP is a language, and Ruby is a language. PHP does a lot more than that. A default install of PHP + Apache has routing logic, and HTTP parsing (what populates all those superglobals like $_POST?), it has templating (I'm sure ERB came up with all of its syntax independently), etc etc. In the Ruby ecosystem, you those are responsibilities of a "framework". Indeed, no one would argue that Sinatra is not a framework, but I'm not aware of any features of Sinatra that aren't already delivered by PHP out of the box.

If your goal is to build an artificial and incoherent taxonomy of "languages" vs "frameworks", then yes it's very clear that PHP and Rails are different types of things.

If your goal is to actually build web sites, comparing Ruby+Rails (which you might write as "Rails", since it implies the "+Ruby part) to PHP is a very reasonable thing to do. I think it's utterly clear that the GP was comparing "making a web app with PHP" to "making a web app with Ruby and RoR".


Please, tell me more about that routing logic built-in in PHP. How does your HTTP parsing deal with Accept:? Does it populate $_PATCH and $_DELETE too? You are aware, that ERB is not the part of Rails and comes as standard library with Ruby? As does CGI module, so you get that "HTTP parsing" as well.


Yes, I was using the terms interchangeably - my bad. Still, Rails has a lot more conventions and magic than Laravel (I don't know about Symfony). Compared to Laravel, you have to deal with a lot less configuration to get up and running. That's what makes it such an attractive choice for beginners: you can work on developing features right away without having to fiddle with stuff. I say this as someone who has used both.


That's a fair point, but I don't think the whole class would've just been Rails. We would've talked about Ruby programming a bit too (the book does as well).

Here's why I think learning Rails would be good for undergrads: You get exposed to patterns like MVC and stuff like server vs client, requests, basic auth/security in a format that is practical and presents itself to fast iteration and quick feedback. I'd much rather learn MVC through Rails than the extremely dull and slow Java GUI apps we did in school.

I think the magicness of Rails is overrated for a beginner. A lot of people like to tinker with low level stuff, but in my experience in college most students wanted to build stuff. Having them build their own routing/template/controllers/etc or whatever would've been less interesting than just learning the high level concepts with Rails first.

As an added benefit, having some experience with Rails would've helped some students get internships.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: