Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×

Ruby On Rails Goes 1.1 255

MrByte420 writes "The Ruby On Rails team today released version 1.1 of the web framework. From the announcement: 'Rails 1.1 boasts more than 500 fixes, tweaks, and features from more than 100 contributors. Most of the updates just make everyday life a little smoother, a little rounder, and a little more joyful.' New features were examined back in February at Scottraymond.net and include Javascript/AJAX integration, enhancements to active record, and enhanced testing suites. Not to mention upgrading this time promises to be a piece of cake."
This discussion has been archived. No new comments can be posted.

Ruby On Rails Goes 1.1

Comments Filter:
  • Rails is Great (Score:5, Interesting)

    by nashjobs ( 964268 ) on Tuesday March 28, 2006 @03:21PM (#15012505)
    It allowed me to develop this job website [nashjobs.com] in 2 1/2 months spare time with 400 unit/functional tests. I was a Java programmer, and now there's no going back ;-)

    Any other former Java programmers relate?

  • Web an API junkyard (Score:3, Interesting)

    by amightywind ( 691887 ) on Tuesday March 28, 2006 @03:24PM (#15012522) Journal

    This posting only serves to remind me what an API junkyard web programming has become. Let's see, we need server side Ruby to transmit and execute Javascript that manipulates a DOM to emit HTMP, gracefully degrading features for anachronistic browers. Zowie!

  • by digidave ( 259925 ) on Tuesday March 28, 2006 @03:50PM (#15012741)
    I'm coding a large-scale site in RoR right now. It'll be deployed across three Lighttpd servers with two MySQL servers. I'm about three weeks into the site and I've probably saved a month of work already over how long it'd take me to do the same work in Java or PHP.

    Rails' efficiency won't continue to be that high as I get more into the business logic and smaller details, but for the data layers that I'm doing now Rails blows away anything else. I'll still be at least 50% ahead of where I'd be using Java and PHP when it's finished. The code will be way cleaner because Ruby is a better designed language than either Java or PHP. It'll be a snap to add features later, which is the problem we're currently having with our site and its 20,000+ lines of PHP code.

    I've coded and managed Java and PHP sites. PHP is easier to work with than Java for most small to medium sites and Java can be easier on large sites. Neither of them are better than Rails for any size site.

    I predict that Ruby on Rails will become the big third competitor in the market for building web apps. Java will still be bigger on the very high end because of EJBs and the need to interface with legacy systems and PHP will still be bigger on the low end because it's easier to learn since you don't need to know OOP to get started. Ruby on Rails will be the language/framework that finally fits into that middle market where most medium to large businesses are. PHP's code is too messy to work there without a lot of coder discipline and either a custom or well-done Open Source framework and Java is just too complicated.
  • Re:Getting started (Score:5, Interesting)

    by XaXXon ( 202882 ) <xaxxon&gmail,com> on Tuesday March 28, 2006 @03:51PM (#15012754) Homepage
    Everyone raves about the poignant guide, but I found that after reading it for 20 minutes, I hadn't done much except read stories and comic strips. I really didn't have much of an appreciation for the language.

    There's something to be said for making a potentially dry subject interesting, but it seems to go too far with it and actually spread the actual information too thin.

    Just my opinion, of course.
  • by BigZaphod ( 12942 ) on Tuesday March 28, 2006 @04:00PM (#15012827) Homepage
    Interesting comment. I'm curious about how Rails manages to save so much time as compared to PHP and the like. I don't have Rails experience and I've only just messed with Ruby enough to do a few Hello, World type things. What is it about the Rails approach that saves all the time and effort? I frequently see those claims, but it's a little harder to get solid, real-world examples.
  • Re:Rails is Great (Score:3, Interesting)

    by catch23 ( 97972 ) on Tuesday March 28, 2006 @04:44PM (#15013122)
    One thing I like about Rails (or Ruby in general) is that you can have a relatively short turn-around time since Ruby is interpreted. In the old Java & Hibernate world, I'd have to run xdoclet for every new field in the database, re-compile with javac every time I added more functional code (either in the model or controller), or reload tomcat every now and then.

    However with Ruby + Rails + Ruby & Rails Eclipse plugins, I almost never need to sit around for more than 2 seconds to see my generated output. I can quickly make a quick modification in model code and immediately see the effect by pressing the reload button on the web browser. I'll also say, the default debugging output of Rails is a lot easier to read than the default debugging output generated by Tomcat & faulty jsps.

    After working with Hibernate for a good 3 years, I can say that it is sometimes nice to develop your database schema first rather than develop object mappings that will generate the schema. The whole "automated naming convention" also removes the possibility of a neophyte programmer to come along and create some ugly get/set methods with side effects.
  • by digidave ( 259925 ) on Tuesday March 28, 2006 @05:06PM (#15013278)
    First, scaffolding helps getting started because the programmer can work on code rather than building forms that connect to the database. The trick there is to use the 'generate' script to create the scaffolding in real code rather than use the run-time scaffolding. The generated code is pretty clean and does the bare minimum required, which is a great platform for building on.

    Second, with ActiveRecord the code feels very close to the data. When working within Rails' naming conventions it's very simple to do stuff like track back and forth in a data record and figure out what belongs to it (foreign keys referring to your data) and what it belongs to (foreign keys in your data referring to other data). Honestly, it seems heavy, but it works so well you forget about that. There have been a few times where I needed some data and found it already in my model object because the database relationship was there. This stuff has been made even better in Rails 1.1 because it stretches the relationship even more (relationships through other tables).

    Everything also gets done with a lot less code both because Rails makes things easy and because Ruby is designed really well.
  • Re:Kudos to RoR... (Score:3, Interesting)

    by 21chrisp ( 757902 ) on Tuesday March 28, 2006 @06:03PM (#15013691)
    Just because companies shouldn't be wasting money doesn't mean they don't do it.

    Java is ubiquitous in the corporate market. It is the Jack-of-All-Trades. It's what CTOs look for on a resume because they think Mr. Java can do ANYTHING, and Mr. Ruby might be able to learn Java after a year or so, but would be limited in what he could do until then.

    I still can't fathom why people think Ruby lacks transaction, security, and connectivity. My experience with it is that it's highly reliable and connects to almost anything. I've never had security problems w/ it.. but it is still a bit obscure. I have ruby apps on a site drawing 30 million hits a month with no problems. I have it connecting Solaris, Linux, OSX, and Windows. If I want to add full transaction support I could connect it to Postgress, ORACLE, DB2 etc etc. Is that good enough? Where is the feature set not working? It seems to me like you haven't spent much time with Ruby.
  • by Overly Critical Guy ( 663429 ) on Tuesday March 28, 2006 @06:04PM (#15013693)
    Aaaaaand how is that different from desktop development? Actually, how is that different from any other development?

    Yeah, shocker, APIs call other APIs to call other APIs. That's how software works.

    All you did was describe the basic model of server code delivering client code. Which is the future.
  • by Anonymous Coward on Tuesday March 28, 2006 @08:08PM (#15014607)
    HABTM is exactly what you're looking for.

    class Color < AR::Base; has_and_belongs_to_many :people; end
    class Person < AR::Base; has_and_belongs_to_many :colors; end

    from there your model is wired up (using the table 'colors_people' for joins) to support things like:

    jimmy = Person.create('name' => 'jimmy')
    susan = Person.create('name' => 'susan')

    red = Color.create('hex' => 'FF0000')
    blue = Color.create('hex' => '0000FF')

    jimmy.colors << red
    jimmy.colors << blue
    susan.colors << red

    Want to get that data out?

    Person.find_by_name('jimmy').colors.length ----> 2
    Person.find_by_name('susan').colors.first.hex ----> 'FF0000'
    Color.find_by_hex('FF0000).people.each { |person| puts person.name } ----> "jimmy\nsusan"

    The relationships work both ways, and all over the ActiveRecord stuff is in there so it's fairly trivial to build a controller to manage the relationships - you can then bind that to some standard HTML forms, a web service, or some sort of Ajax monster. If that counts as nothing then I'm not really sure what needs to be done to make you happy.

    Scaffold :foo is not inteded to produce anything but the most basic scaffolding for starting development. It doesn't do anything with joins because it's not supposed to. It doesn't build pretty forms with valid markup because it's not supposed to. It doesn't build ajax fancyness because it's not supposed to. It doesn't add confirmations to the destroy methods because it's not supposed to. Rails makes it easy to solve problems yourself, it doesn't solve them for you.
  • by Anonymous Coward on Wednesday March 29, 2006 @02:18AM (#15016049)
    PHP is an ugly abomination of a language, while Ruby is simple, elegant and fully oo. The reason I've switched to RoR is Ruby, not Rails.
  • by it0 ( 567968 ) on Wednesday March 29, 2006 @07:24AM (#15016819)
    I'm a c/perl guy and don't know catalyst but wrote some sites in perl using html::template and I just read http://www.perl.com/pub/a/2005/06/02/catalyst.html ?page=2 [perl.com] for a short tutorial.
    I also just made my first rails website in 10 days, this includes a cms and also an elobarate scheduling app as well as some other stuff like user manager etc. This also includes the time to learn the language and get my head around concepts. The major problem with rails is documentation, there is just to much of it scattered around and should be organised more. But with the rails api website, the ruby docs and some tutorials you will get there.

    The last 2 days was just finetuning what the customer wanted. From the tutorial I would say rails is easier to read. I think perl has more power over ruby, just as C has more power over Perl as you can go more low level with it. But ruby/rails is much easier to read and even less to type.
    I will still remain to use C and Perl for a lot of stuff. But when it comes to websites / web applications I will stick with rails. I can't see myself turning back. Maintaining and extending code is dead easy also the ajax integration is great.

Kleeneness is next to Godelness.

Working...