TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Is Ruby on Rails really worth knowing?

15 点作者 wesleyzhao超过 14 年前
It seems that every where I am still seeing php GET variables in URLs (including on HN) and there is just so much support out there on the web for PHP. Big companies like Facebook and Wordpress still use it. Is Ruby on Rails really that valuable to learn?

10 条评论

cheald超过 14 年前
GET variables aren't unique to PHP. They're simply a means of passing data through on any HTTP GET request. HN itself runs on [Arc](<a href="http://arclanguage.org/" rel="nofollow">http://arclanguage.org/</a>).<p>To answer the question, Rails is certainly worth learning if you're interested in web applications development. It has, for better or worse, set the benchmark for interpreted MVC web frameworks, and a lot of the design decisions being made in other frameworks are heavily influenced by it.<p>(Also, it's fun.)
评论 #2194340 未加载
anyangels超过 14 年前
It's called a query string...<p><a href="http://en.wikipedia.org/wiki/Query_string" rel="nofollow">http://en.wikipedia.org/wiki/Query_string</a><p>My advice: come in on the Rails - stay for the Ruby.
chr15超过 14 年前
There is always a big debate surrounding what language to learn, and I don't think you'll get a solid answer from us. You'll have people arguing about which language is better. PHP, Python, and Ruby frameworks seem to be most popular here on HN. If you're new, my advice would be to experiment with different languages/frameworks but eventually have a "go to" one. Choosing a framework that you enjoy is a discovery process. Along the way you'll learn about language design.<p>By the way, GET requests are part of the HTTP protocol. Every web-based framework should support them, not just PHP-based ones. HN is written in Arc, a dialect of Lisp created by Paul Graham.<p>I personally use Python/Django :)
rst超过 14 年前
Facebook and Wordpress are using PHP, but they've put significant effort into overcoming its pitfalls.<p>You can do anything in PHP that you could do in a more modern framework (Rails, Pyramid, Django or whatever), but some things will be more effort --- in particular, keeping the codebase organized and well-tested as an app gets larger.<p>(Also, FWIW, Facebook's codebase isn't all PHP, and Facebook alumni don't always stick with PHP for their next ventures. For instance, Quora's using Python on the server side; apparently its founders see some value in the switch.)
评论 #2194388 未加载
bricestacey超过 14 年前
Rails has GET variables, but the "rails way" is "restful routes" whenever possible. So something like /posts/12 will automatically pass 12 as a specific GET variable e.g. params[:id]. Or /posts/12/comments/4 might pass the parameters :id (12) and :comment_id (4).<p>This happens all the time for people using PHP too, however it's usually accomplished via mod_rewrite. For example, Drupal's pretty URLs simply rewrite /posts/12/comments/4 to /index.php?q=posts/12/comments/4.
JesseDearing超过 14 年前
When I first learned Rails I kinda messed around with it and wrote a quick demo app, but really wasn't that impressed with it. Coming from a C# background and ASP.NET MVC had just come out I didn't see much value in learning a new MVC framework.<p>However, when I started to need a language that I could use to write code that would let me easily integrate with different services and APIs I was finding that C# was cutting it for me. Not so much C# than just the .NET community. I found that the Open Source community is Ruby's greatest asset.<p>There are so many gems to be used in Ruby/Rails that I found that I seldom have to write anything from scratch. There is always a gem I can use to help me get a job done.<p>The second strongest asset of Ruby is the language itself. I found it to be a wonderful language to write in. Since learning Ruby, I haven't cared to write another line of C# again.<p>Is it worth learning? I say emphatically, "yes" but I would implore you to try it for yourself. Also checkout Github/Rubygems.org to see if there is a gem out there to try.
clojurerocks超过 14 年前
It really depends what your looking to do. I use Rails and php depending on the project. I would say actually its best to focus on frameworks and Rails is probably one of the better ones out there these days. Django is also interesting. Php frameworks are going through alot of changes right now with no clear winner. So youll have to spend extra time even trying to figure out which one to use whereas with Rails its pretty much the dominant one so all the support in the community goes to it.<p>There are only a few ways you can pass data from one web page to another. Get and Post. Get sends it in the url whereas Post sends it in sort of a hidden way. In the old days post was preferred for more sensitive data so the user wouldnt see things in the url. Also post was and is used to keep the urls cleaner. However with the advent of web services the uses of these have changed somewhat.
nishantpant超过 14 年前
I had my doubts about Ruby too, but we built the entire backend of our iPhone app (<a href="http://loqly.me" rel="nofollow">http://loqly.me</a>) on ROR and our website is going to be entirely on ROR too. The amount of time it saves you as compared to any other language is nothing short of mind blowing. Of course I am just sharing my 2 cents since you asked. Others could have a different experience. But we started out with php and 2 months down the line changed over to ROR and boy were we glad we switched!
runjake超过 14 年前
Yes. But make sure you start with Rails 3 and Ruby 1.9. They are vastly improved over Rails 2 &#38; Ruby 1.8 IMHO.
noodle超过 14 年前
the most important skills you can have, imo, is the ability to learn new things as soon as possible, to be come competent quickly.<p>taking the time to learn rails isn't just about learning rails, it is also about keeping your ability to learn sharp.
评论 #2196180 未加载