Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Slashdot Log In

Log In

Create Account  |  Retrieve Password

Restructured Ruby on Rails 3.0 Hits Beta

Posted by kdawson on Sun Feb 07, 2010 06:50 PM
from the insert-gems-and-trains-reference dept.
Curlsman informs us that the first beta of Ruby on Rails 3.0 has been released (release notes here). Rails founder David Heinemeier Hansson blogged that RoR 3.0 "feels lighter, more agile, and easier to understand." This release is the first the Merb team has participated in. Merb is a model-view-controller framework written in Ruby, and they joined the RoR development effort over a year ago. Reader Curlsman asks, "So, is version 3 of RoR going to be a big deal, more of the same (good or bad), or just churning technology?"
+ -
story

Related Stories

This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More
Loading... please wait.
  • by metalhed77 (250273) <`andrewvc' `at' `gmail.com'> on Sunday February 07 2010, @07:21PM (#31055990) Homepage

    Please pick form the list below

    Ruby and/or Rails sucks because:
        1. It doesn't scale (Twitter)
        2. It's slow
        3. I read somewhere that Python was a better language
        4. I write PHP, I can do everything Ruby/Rails can do better
        5. My obnoxious younger coworker uses it
        6. It's not lightweight enough
        7. The ruby community is full of over-hyping zelous twits
    Ruby and/or Rails is awesome because:
        1. It scales within reason (Twitter, Lighthouse, Shopify)
        2. It's as fast as Python and PHP
        3. I read somewhere it was better than Python
        4. I used to write PHP, Ruby's been a godsend
        5. There are so many motivated and innovative people in the community
        6. It's featureful
        7. Pythonistas are over-hyping jealous twits

    • by Anonymous Coward on Sunday February 07 2010, @07:22PM (#31055996)

      7. The ruby community is full of over-hyping zelous twits

      • Re: (Score:2, Interesting)

        by Anonymous Coward

        This is exactly true. Rails was in full-scale OMG hype mode before they even found an application server that worked properly or had a decent XML library. (Many of the fundamental building blocks only appeared because people bought into the hype and found that Rails, as promoted, was simply unusable for anything more than a low-traffic blog.)

        And I say this as a developer who really likes Rails, but the toy-developer nature of the community is it's biggest weakness IMO.

        • Re: (Score:3, Insightful)

          by MadCat (796)

          I gave RoR a chance and evaluated it for a while, and while RoR isn't bad, it's community is absolutely terrible. Help is hard to get, and more often than not a simple question leads to 5 people falling over eachother to call you stupid in various degrees, yet they are unable to actually offer any help. A large majority (from what I've seen) of the community can only follow the "hype" and treats the RoR dev team like deities, yet has no idea how to do certain things, how to properly structure and architect

      • If you ever want to attract lots of blog comments, there are 2 subjects to cover:-

        1. Apple.
        2. Ruby on Rails.

        Seriously, what put me off Rails was the utter zealotry of some of the people involved in it. Django is full of more sane folks.

        • Apple and Rails (Score:4, Insightful)

          by 200_success (623160) on Sunday February 07 2010, @10:26PM (#31057106)
          Apple makes opinionated hardware. Rails is opinionated software. It's not surprising that the two fan bases act similarly. In fact, I would bet that there is a lot of overlap between the two groups.
            • Re: (Score:3, Informative)

              ActiveRecord::Base.pluralize_table_names = false

              simple.

            • A case in point: Rails likes to give your database tables plural names...One of the reasons to prefer singular table names is that it improves Rails's interoperability with the applications that either want to supply data to or consume data created by Rails..

              Another reason is that it gets you closer to relational thinking. Plural names come about because some think of tables as collections of records and it follows that said collection should get a plural name. So, your "person" record becomes your "people

      • Re: (Score:3, Interesting)

        by Anonymous Coward

        You're absolutely right. After seeing widely-publicized incidents like the trademark shenanigans [rubyinside.com] involving DHH, and then the blatant sexism at GoGaRuCo [ultrasaurus.com], I refused to become associated with that community.

        As a professional, I don't want my name linked to such childish behavior. So I took Ruby and Ruby on Rails off of my resume in May of 2009, and have taken contracts dealing with Django and Python instead.

        Unlike the RoR community, the Python community somehow seems to be able to avoid petty arguments and bla

      • by metalhed77 (250273) <`andrewvc' `at' `gmail.com'> on Sunday February 07 2010, @09:44PM (#31056882) Homepage

        7. The ruby community is full of over-hyping zelous twits

        You know, I wrote my post as a joke, to hopefully prevent stupid comments like yours. That yours was modded (twice) up is proof of the juvenile partisanship present here on slashdot.

    • Re: (Score:3, Funny)

      by Foofoobar (318279)
      You forgot Groovy and Grails does it better :)
      • What about F#lukie and FAILs?

        Or Gravel and Nails? (Chuck Norris’ favorite morning cereal.)

        Or Gravy and Meats? (Favorite British breakfast, I guess... especially in pie form. ;)

        • Pearl on Paths

          Diamond on Driveways

          Topaz on Tracks

          Sapphire on Streets

          Aquamarine on Avenues

        • by Foofoobar (318279) on Sunday February 07 2010, @07:53PM (#31056190)
          Actually Groovy and Grails are Java native. No need to interpret via JRuby. Groovy is native Java code as is Grails.

          But being the ignorant troll that you are, your kneejerk response shows how little you know about these technologies and that you must have confused Slashdot with another one of your Facebook pages.
          • What the...
            My friend, the fact that you misinterpreted my little funny and random word-play as having a “knee-jerk reaction” of an “ignorant troll” really shows, that you should go out more often, and have a little fun.
            Because you are starting to see assholes everywhere.

            See, the problem with text-only communication is, that we read it in the (inner) tone of voice of what we expect to read. Which is controlled by our own mood.
            So if we expect ignorant trolling everywhere, that’s what we will always see. Which makes them that, in our reality.

            And because I just recently realized that I did the same... man... it’s not good for you. You are getting angry where you could have a little laugh etc. Basically making your own life bad. :/

            Look at the moderators. They got it right, and even modded you funny, because of the good mood. :)
            Chill, relax, kiss a girl. :)

            P.S.: This is a dual-purpose comment. In case parent comment was really meant funny, it’s meant funny too. In case it’s not, this one also isn’t. :D

    • Re: (Score:3, Insightful)

      by Yvan256 (722131)

      Ruby and/or Rails sucks because:
      8. None of the local web hosting services offer it except in their most expensive packages, all we get for the low-cost packages is XSSI, PHP and Perl.

        • Re: (Score:2, Funny)

          by Anonymous Coward

          Shut the fuck up.

          Say, do you happen to do any Ruby on Rails consulting? You're more polite and better-spoken than most Rails consultants I've had the "pleasure" of working with so far. I might have some work for you.

        • Re: (Score:3, Informative)

          by PCM2 (4486)

          Hostgator offers Rails on all their plans, too, which start at $4.95/month. I think someone's not looking hard enough.

    • The magic of math, my response is a sum of two of my answers: 10.
      Now guess what my answers were...
    • Re: (Score:3, Funny)

      by s_p_oneil (795792)

      Good post, but IMO it's a shame you left this one out:

      Ruby and/or Rails sucks because:
      8) It doesn't use spacing to delineate code blocks

      Ruby and/or Rails is awesome because:
      8) It doesn't use spacing to delineate code blocks

  • by dino213b (949816) on Sunday February 07 2010, @07:24PM (#31056026)

    I'm glad first responses are so negative; now I don't have to bother trying ROR out.

      • Re: (Score:3, Informative)

        by Tacvek (948259)

        Besides speed should hopefully become less of an issue once people migrate to Ruby 1.9 with YARV and eventually 2.0 which will hopefully have a decent JIT over top of the YARV bytecode (or something else perhaps) that should help significantly with the speed issues.

        (Especially if said JIT offers an unsafe optimization mode that makes certain documented assumptions about the code, like not changing the integer arithmetic methods, and other similar cases, the detecting of which can add significant overhead wh

  • by Peter Cooper (660482) on Sunday February 07 2010, @07:29PM (#31056056) Journal

    Over at Ruby Inside we did (and are maintaining) a roundup of ~36 Rails 3.0 beta links/articles [rubyinside.com] (it's up to about 40 now, I think). If you've got Rails 3.0 installed and want to know how to use X or Y or want to learn some of the back story/motivation, the links should come in useful. They're only things that are actually worth reading. Well, mostly.. :-)

  • TPS (Score:4, Interesting)

    by Luke Psywalker (869266) on Monday February 08 2010, @03:06AM (#31058644)
    Funny, I first read about ROR on Slashdot 3 years ago, back around the 1.0 release. The only negative things anyone said back then were quips about DHH's Danish accent. Now it's matured into the finest open source development web development stack available, powering many successful web apps and all I see here are the people who should be supporting it on principles alone talking smack about it.
    • by k33l0r (808028) on Sunday February 07 2010, @07:23PM (#31056014) Homepage Journal

      I've never heard that Rails would make "programmers obsolete", in fact it seems to be the opposite; if you look at the official Rails site [rubyonrails.org] you'll notice that the biggest tag-line is "optimized for developer happiness".

      Rails makes developers happier, not unemployed. What's more, anyone can write bad code in any language, so pointing to Twitter is hardly a conclusive argument. There are lots of big Rails sites out there, including Basecamp [basecamphq.com], the original Rails application.

      For a better (and longer) write up on scaling Rails, I refer you to this article [zdnet.com].

      • by syousef (465911) on Sunday February 07 2010, @08:38PM (#31056446) Journal

        Rails makes developers happier, not unemployed.

        When you've had a lousy job, the two aren't mutually exclusive. I want assurances that they don't intend to make me happier BY making me unemployed ;-)

      • by Anonymous Coward on Sunday February 07 2010, @08:46PM (#31056484)

        I've used Rails on five projects now. To be honest, I think it has made me more and more miserable with each project.

        First, I truly dislike "convention over configuration". The main problem there is that they "convention" they use is far too limited for any sizable application. It may be sufficient for a blog web app, or a bug tracker, or small-scale applications like that. But we now have one web app with over 900 controllers, and "convention" falls apart at this size. Sure, we probably should refactor our app, but we're not in a position to do so at the moment.

        The same goes for ActiveRecord. It's great in simple cases, but falls apart rapidly when you're developing larger web apps, especially when you're performing complex data retrieval. It gets even worse if you need to optimize that data retrieval. At this point, ActiveRecord becomes a huge pain in the ass, rather than a useful tool.

        And like it or not, the performance of Ruby is quite poor. We actually had to purchase some additional hardware to handle the extra load after converting an old Java-based web app to Ruby on Rails. We tried to optimize it, but were spending far too much time fighting with Ruby on Rails and its abstractions. It was cheaper just to buy more hardware.

        • by Pengo (28814) on Sunday February 07 2010, @09:34PM (#31056810) Homepage Journal

          It's a double-edged sword.

          I've been involved with rails pretty extensively now for a few years, and i've enjoyed the platform for the most part. A few projects we've launched have grown pretty complex, and we too have had some problems with the code management, but discipline seems to help and a steady peer review.

          Ive been working with Java pretty much exclusively since the late 90's, with exception of the last few years which have been focused on Rails projects. I've recently been working with Grails (Grails.org) which is a Java based stack taking the great concepts from RoR platform.

          As someone who has never worked with Java, I believe that Grails might not be as easy to pickup and learn, but as someone who has an extensive Java background, it's a serious breath of fresh air. For a large scale project, I MUCH prefer grails code management to rails approach. Obviously with my Java background, i'm partial to Grails.

          On the note of deployed code, a few of our rails projects have grown to be pretty large. I've had to implement a LOT of hardware to handle the scaling of usage. We've been able to do a lot of improvements to the code, but compared to the speed and efficiency of Java (Yeah, I never thought i'd say that) I'm a little bit 'burnt' on rails.

          Comparing something like Passenger on Apache to Glassfish or Tomcat is like getting out of a 2009 BMW 5 series and jumping into a 1991 Kia.

          The first time in YEARS i have had run-away processes take down an entire server, I've migrated all of our servers to Xen servers because i got tired of driving to the datacenter 1-2x a week or making a remote hands call to reboot a server because a zealous process took things down. (Did I mention i bought a load balancer to manage the traffic, i'm doing on 10 machines what i used to do on 3 machines w/my java apps)..

          I'm sure that there are folks that know Rails better than I do, we're a do-everything group (4 guys managing a LOT of code and servers), not a large IT shop by any stretch, but on one hand we've hit epic levels of productivity. We've gotten projects out fast, and some of them have done well. We've had other projects we assumed would do great, but ended up failing due to marketing miscalculations. The lesson I'd say i've learned with Rails, is it's better to get a 'good enough' product out the door and then figure out how to tighten it down later than not even make it to the race.

          I'm hoping that i can bypass that compromise with Grails, but time will tell. :)

          Either way , Rails absolutely has it's place in the Open Source server software stack world. In the end it's just a matter of remembering that if you are doing rails programming, you better be doing it with a Test-Driven development style, as large projects can get out of control.

          I've not looked at RoR 3.0, but i'm hoping that they have implemented a Service-style implementation for business logic, rather than encouraging to have it thrown into the Models.

            • by Pengo (28814) on Sunday February 07 2010, @11:51PM (#31057656) Homepage Journal

              We tried JRuby.

              We had various deployment problems, i'm sure that many people have managed to make it work, but we got about 2 days of trying to port in a medium-sized, high concurrent project, and we finally came to the conclusion that it's better to stay closer to the mainline c-based Ruby than diverge our project to JRuby and deal with the dangers of working on the bastard-project (when we talked to some of the guys at sun, back when we made the choice to give JRuby a try, there was only 3-4 paid employees working on it... it just felt too edgy for us, and we were looking to stabalize our project, not go down a lonely road of untested/unknown.... )

              As they say, sometimes it's better the demon you know , than the ones you don't.

              Disclaimer:

              1. We have had a LOT more success with rails, than failure. And we're getting a LOT more done now than before when doing struts/JSP/JDBC style dev.

              2. My lead developer wrote a book on Rails development for Oreilly, (rails handbook), he is leading our charge into Grails even having a substantial background in Ruby/Rails.

              I'd never say I regret doing our projects in Ruby, nor do I feel like JRuby would of solved my problems. I'm happy with Grails, and it has well complimented our teams capabilities and experience. We write code to solve problems and generate revenue, we don't have the luxory of coding at a well funded public company, we pay our mortgages and car payments from code we write every week. Ruby has met the challenge for us, but it's silly not to explore our options to try and make our new projects even more robust and improve our development, and our current dilemma of ongoing maintenance.

        • Re: (Score:3, Interesting)

          First, I truly dislike "convention over configuration". The main problem there is that they "convention" they use is far too limited for any sizable application. It may be sufficient for a blog web app, or a bug tracker, or small-scale applications like that. But we now have one web app with over 900 controllers, and "convention" falls apart at this size.

          First, yes,

          we probably should refactor our app, but we're not in a position to do so at the moment.

          you should, and this would be biting you in the ass just as much with other technologies.

          But keep in mind, "convention over configuration" is not "convention instead of configuration". The idea is that if you follow the conventions, things work better. If you need to go beyond them, you can still configure things.

          The same goes for ActiveRecord. It's great in simple cases, but falls apart rapidly when you're developing larger web apps, especially when you're performing complex data retrieval.

          For what it's worth, I prefer Datamapper. I don't have especially bad memories of ActiveRecord, though -- but I probably wasn't doing especially complex queries.

          But note, again, it's abo

          • by ZorbaTHut (126196) on Sunday February 07 2010, @11:39PM (#31057568) Homepage

            That's part of the point of Rails, though. It usually is cheaper to buy more hardware than to optimize, Ruby just forces you to face that up front.

            I haven't actually used RoR, but you have to admit that this sounds like you're taking "ruby is really slow" and trying to spin it into an advantage.

            "Most people end up having to optimize eventually. But that's hard. Ruby on Rails can't be optimized! You just have to buy more hardware! Isn't it great!"

            • by SanityInAnarchy (655584) <ninja@slaphack.com> on Monday February 08 2010, @03:25AM (#31058712) Journal

              you're taking "ruby is really slow" and trying to spin it into an advantage.

              Nope, I'm saying Ruby is optimizing something else -- developer time. That isn't to say it will never be fast, and last I checked, the full Merb stack (and Rails 3.0 is also Merb 2.0) was on par with PHP.

              It's also not that it's hard, it's that it's expensive, and a needless expense. Let me put it another way: Do you watch YouTube, ever? (Replace YouTube with Vimeo or any other Flash video website.) Do you ever bother to download a video just to watch it? I mean, you do realize that VLC takes a fraction of the CPU cycles that Flash does, for the same video, right?

              But no, I bet you're just like 99% of the population -- it may burn more CPU, it may burn more battery, but you're going to just watch it in the Flash player until you have a good reason not to.

              If it was really an issue, if your computer was so old and so slow that the Flash wouldn't play properly... Weigh the amount of time you'd spend in a video downloader against the cost of a low-end PC, and it's a no-brainer.

              Ruby on Rails can't be optimized!

              Nope, it certainly can, it's just hard, and may (in an absolute worst case) involve replacing parts of it with another language, like C extensions -- not an entirely alien idea to any game developer who's replaced bits of C++ with assembly. (No one would sanely claim that the next blockbuster game should be written in assembly for speed -- you optimize the tight loops that way, but the game logic should be higher level.)

              And it's just an observation, I'm not sure if it's cultural or if it's the slowness, but it seems like Ruby people, especially Rails people, focus on horizontal scalability and optimizing their algorithms in the broad sense -- again, O(logn) vs O(n^2). Java vs Ruby is the difference between two servers and four, or a request taking 50 ms vs 100 ms. Your application logic is the difference between four servers and twenty (or not being able to scale at all), or between 100 ms and 2000 ms (or two days, or crash the server because you ran out of RAM).

              These are good lessons for any system, but Ruby people seem to be especially conscious of it. Still, I think it illustrates something -- the language is going to be the least of your problems when it comes to optimizing any app, until you're at a much larger scale than 2-4 machines -- think hundreds. Eventually, it may be worth rewriting large chunks of your app, or doing a ground-up rewrite, in a more efficient language -- or it may be worth improving the interpreter of the language you've got (as Facebook has).

              But you have to get there first. If you're busy doing Java because you want it to be efficient, and I steal all your marketshare because I write one line of Ruby for every five lines of Java, and I get to market while you've got a prototype with 20% of the functionality... I win. Even if I have to rewrite it all in Java later, I have the money to do that, because I've got the traffic.

            • by rsax (603351) on Monday February 08 2010, @01:34AM (#31058258)

              Thus they have made no allowance for dropping back to raw SQL queries.

              Ignoring your inaccurate remarks about the core Rails developers, do you care to expand on the above mentioned claim?

              count_by_sql: http://api.rubyonrails.org/classes/ActiveRecord/Base.html#M002276 [rubyonrails.org]

              find_by_sql: http://api.rubyonrails.org/classes/ActiveRecord/Base.html#M002267 [rubyonrails.org]

            • Re: (Score:3, Insightful)

              Not true.

              Model.find_by_sql sqlstring

              or even more primitively:
              ActiveRecord::Base.connection.execute( sqlstring )

              Easy. Although you really shouldn't have to use it if you understand relations properly.

              Also note that rails 3 is going to have Arel, an Object-Oriented interpretation of the Relational Algebra. It is a mathematical model for representing “queries” on data. It understanding relations this fundamentally means it can optimise easily.

              Have a look at:
              http://magicscalingsprinkles.wordpress.co [wordpress.com]

              • Re: (Score:3, Funny)

                Just another example of someone putting down Rails for reasons that they only imagine because they have no idea what they are talking about.

                Hey, I can make stuff up out of the air too!

                (1) PHP still has a serious floating-point bug. Try multiplying 3.000001 and any number ending in .000300020001. The result is "Python".

                (2) Oracle is going to roll back the last 47 bug-fix commits to the Java repository, but only for the OSS version. Then it will sell the up-do-date version commercially.

                (3) Microso
                • Re: (Score:3, Informative)

                  by mini me (132455)

                  In fact, the Rails team always promoted the fact that you can drop down to pure SQL when necessary as a feature of ActiveRecord. It is like there is some kind of distortion field between Rails developers and the rest of the world.

                  What was said: We developed this handy framework to make web development more enjoyable for developers. We hope you enjoy it.

                  What was heard: We developed this handy framework to allow everyone and their brother to build a web application. Fire those expensive programmers! They aren

    • Re:Testing (Score:5, Interesting)

      by Bogtha (906264) on Sunday February 07 2010, @09:01PM (#31056576)

      I can't say my experience matches yours. There are two testing modules shipped by default with Python. Django has integrated support [djangoproject.com] for them out-of-the-box. Django itself has plenty of tests [djangoproject.com]. There are plenty of good third-party testing modules and people are pretty vocal about using them.

      On the other hand, I do very strongly get the impression that the lax attitude of "I tried it in my browser so it works" is omnipresent in the Rails community, coming right from the top. Witness the uproar over the Google web accelerator. Rails was just plain wrong to use GET for unsafe operations. But "it worked in a browser", so they didn't see anything wrong with it, even though it was out of spec. GWA came along and triggered data-loss bugs in Rails applications that used unsafe behaviour for GET requests, including 37signals' applications. Rails developers, rather than simply saying "whoops, our bad, we'll fix this ASAP", called GWA evil and wrote code to block GWA. Roll forward a year, GWA changes its behaviour and the blocks don't work any more, the same things happen all over again, and the Rails developers call GWA "scary" and "malicious". These are not the actions of people who care about writing the best code possible, these are the actions of people with egos chasing features and attention.

      As for the word "professional" in particular, that's a dirty word [twitter.com] in the Rails community.

      • HTTP methods (Score:3, Interesting)

        That wouldn't be the only time that Rails has been sloppy in choosing the right HTTP method to use. When they implemented REST, they got PUT and POST backwards. Compare with CouchDB, which gets it right: PUT to create and POST to update a record.
        • Re: (Score:3, Informative)

          by mini me (132455)

          Not true. From the CouchDB docs:

          To create new document you can either use a POST operation or a PUT operation. To create/update a named document using the PUT operation, the URL must point to the document's location.

          In other words, because CouchDB allows you to define the document ID before it is created, you can use PUT to pass that information upon creation. But if you want CouchDB to define its own document ID, you must use POST. This is consistent with the HTTP spec.

          Rails apps, on the other hand, typic

    • Re: (Score:3, Interesting)

      by metamatic (202216)

      Testing. Craftmanship. Quality. This is more cutural than technical.

      Funny, my experience of the Rails community is that it attracts a lot of crackpots who don't believe in documentation--not even API documentation.

        • Re: (Score:3, Insightful)

          by beguyld (732494)

          While it may not be your preference, applications written in Ruby are supposed to be written in such a way that they are self documenting. Contrary to other languages, the expressiveness of Ruby allows the developer to write code that means as much, if not more, than formal documentation.

          Yeah, sure... I've inherited plenty of code by people who were religious about the "no comments" idea. Utter nonsense.

          Yes, my own code is as self documented as possible. It shows HOW, but it can't show WHY. Code alone can 't describe the overall context of why that code, and now some other code, or how it fits into the whole. That's what comment blocks are for.

          Otherwise, you're just doing like the current US government, and burdening future generations with the true cost of today's "short cuts." It's self

          • Re: (Score:3, Informative)

            In fact this is supposed to be a central idea behind comments in Ruby. It is usually much more important to indicate WHY your are doing something than HOW. Ideally, the how should be self-evident.
    • That's where I stopped reading. I'm on a no-buzzword diet.

      Excellent! More enjoyable and better paying work (and better co-workers) for the rest of us clued enough to realize when there's real substance behind those buzzwords. Have fun with that self ghettoizing!

    • I am a php developer that does a lot of small to medium sized apps using zend framework. I don't plan on doing anything enterprise scale, my niche is what it is. Do you see any advantage to zend framework over ROR?

      I don't know Ruby or Rails well yet. But I do know PHP pretty well. And my answer is: no. Not as a framework.

      Zend Framework isn't a web application skeleton / development system. It's an over-objectified library of barely related pieces. Yeah, there's a controller and a recommended directory layou

    • by Anonymous Coward on Monday February 08 2010, @04:28AM (#31058906)

      What is the point of writing something that tries to look sensible and objective and then round it off with the utterly subjective "Python is for masochists, Ruby is cleaner"?

      The only explanation: Your subconscious knows the obvious fact that Python is a beautiful language and thus subverted your entire comment.