Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Programming The Internet IT Technology

Ruby on Rails 2.0 is Done 385

Jamie noted that ruby on rails 2.0 is done. In addition to upgrade and installation instructions, the article lists a number of the more interesting new features in the release which appears to be quite extensive.
This discussion has been archived. No new comments can be posted.

Ruby on Rails 2.0 is Done

Comments Filter:
  • ORM still broken? (Score:5, Informative)

    by poet ( 8021 ) on Saturday December 08, 2007 @01:30PM (#21624985) Homepage
    I wonder if they still disallow proper database design by having a requirement of an autoincrementing number for the primary key.... The Rails developers could learn a thing about databases. Start here: http://en.wikipedia.org/wiki/Database_normalization [wikipedia.org] . Yes I know that a serial/autoincrementing key makes it easy for the app... it makes it a lot harder for the DBA in a lot of cases.
  • by CastrTroy ( 595695 ) on Saturday December 08, 2007 @02:25PM (#21625481)
    Yeah, but PHP is one of the least productive environments there is, at least as far as web development goes. You could switch to .Net, and you would increase your productivity 10 fold. That is, if you stick to the .Net way of doing things. You're application might not scale that great, and you might not have any idea what's going on under the hood, and you might have a 20K viewstate submitted with every form, but you will be really productive in the sense that you can turn out a lot of features in a very small amount of time. Comparing raw PHP to rails isn't really something you should be comparing. Make your own custom framework in PHP, that fits the needs of whatever project you are working on, and you can probably turn out features extremely quickly. And your own framework will actually need what you need it to do, instead of you having to make compromises for the shortcomings of the framework.
  • by CastrTroy ( 595695 ) on Saturday December 08, 2007 @02:35PM (#21625569)
    But you could do the same thing in PHP. The fact that most people don't doesn't really say anything bad about PHP, but just bad about people who generally use it. A lot of people who write PHP leave SQL injection problems. That doesn't mean that it can't be used properly. A lot of people use screwdrivers to stir paint, that doesn't mean that the screwdriver is a terrible tool. You can do unit testing, MVC, and encapsulation all that other recommended stuff in PHP. Just because most people don't, doesn't mean it's a bad tool. If you need a tool to hold your hand and force you to adhere to best practices, then you aren't a very good developer.
  • Re:ORM still broken? (Score:3, Informative)

    by crayz ( 1056 ) on Saturday December 08, 2007 @03:49PM (#21626137) Homepage
    And I'll admit, SQL databases don't exactly make it easy for anybody (how about letting DBAs create a VIEW with the "Rails design", on top of a properly designed database? That's what views are for! Codd is rolling in his grave).

    Go for it - I've done it more than once when I needed to get data out of legacy(and very poorly designed) databases. Rails supports this and it works just fine. The one point you make that I really agree with you on is ActiveRecord's inability to detect changed attributes and save only them to the database. You may want to take a look at DataMapper [datamapper.org], a bit of a different take on a Ruby ORM
  • by CarpetShark ( 865376 ) on Saturday December 08, 2007 @04:18PM (#21626387)
    You're absolutely right: Rails is just a framework on top of Ruby, and neither are very special. Except in that a lot of people were still using crap coding techniques like mixed PHP and HTML, until frameworks like RoR and Django introduced them to MVC, ORMs, templates, and Unit Testing --- AND the speedups and elegance that go with those things, once you have an actual framework that does the boilerplate for you.

    There's nothing special about RoR, no. But compared to tools like PHP, it's a godsend.
  • by Knetzar ( 698216 ) on Saturday December 08, 2007 @04:41PM (#21626595)
    Stored procedures can improve performance by reducing the amount of data that needs to be returned from the DB. Instead of getting a ton of data from the DB, the application can make a call and only get the data it wants. This simplifies application development and improves performance. You can think of things like MAX, MIN, etc... as stored procedures (I don't know if they are or not)

    I have been at places were the DBAs have found very expensive calls to turn into stored procedures and the net result has always been an increase in performance and resulted in a simpler application.
    Example:
    Get all shoes
    for each shoe {
        get all skus for that particular shoe type (these would be different sizes/colors)
        calculate the minimum and maximum price of the skus that are in stock
    }
    return shoe name, shoe desc, price range
    (This might be a bad example, since good SQL and a good DB might be able to speed this up...but I'm not an expert)

    Note: I am an (C/C++/Java) application developer, not a DBA
  • Re:ORM still broken? (Score:2, Informative)

    by soloha ( 545393 ) on Saturday December 08, 2007 @06:54PM (#21627405)
    Obviously those people were inexperienced with Ruby and or Rails. You can add new methods, or override the methods in any class you want. It's very easy to change they way any object behaves. And the concept of code blocks is extremely powerful and flexible (yes, yes, not an original idea - borrowed from Small Talk)...
  • by pavera ( 320634 ) on Saturday December 08, 2007 @08:48PM (#21628009) Homepage Journal
    Check out django. As that article mentions MVC efforts can become overly restrictive very easily. If you ask me, Ruby on Rails has already crossed that line. django is mvc as well so someday might go down this path, but it hasn't yet.

    django provides all of the ease of Ruby on Rails, it is powerful, it provides even more tools than Ruby on Rails in my opinion specifically for web work. And I don't feel like I have handcuffs on when I'm developing in it.

    I started building 2 projects in Ruby on Rails ~8 months ago. These were existing PHP systems which had become overly cumbersome and were in serious need of a redesign/rewrite. Rails seemed to provide everything I needed, began porting... got about 30% done and started running into serious roadblocks that were there by design in Rails.... I aborted the porting, and started looking for another framework, found django... the 2 projects are now 100% ported (took less than 1 month each).

    django was also significantly easier to set up for production than my experiences with rails (apache? lighthttpd? mongrel? the recommended web server for rails changes every week...) modpython+apache is dead simple to set up and rock solid (apache+rails requires fastcgi which was constantly crashing, unstable, and basically doesn't work)

    obviously I'll get flamed for this as RoR has way too many fanboys, but as far as a concise, powerful, well documented, easy to use, flexible, and enjoyable development experience nothing gets close to the last 2-3 months working with django.
  • by jozeph78 ( 895503 ) on Sunday December 09, 2007 @12:25PM (#21631577)

    Yeah, and thats what I don't really like about frameworks in general. They have all of these awesome cool fast easy to use things built in. But sometimes you discover that your needs are too complex for the framework, and someone instantly replies " you don't have to use feature X". Well sooner or later you aren't using many of the cool features of the framework anymore. So why are you using the framework?
    Spring is the only framework flexible enough to get around the corners that things like rails back you into. If you find their JDBC classes not useful, you might still find their transaction management useful. However, their JDBC classes have helpers ranging from give me an object and I'll generate the SQL to having classes which allow your SQL to be ran with their improved exception handling. The really nailed the framework in the sense it provides some level of support no matter how complex your case may be.

Any circuit design must contain at least one part which is obsolete, two parts which are unobtainable, and three parts which are still under development.

Working...