Slashdot Mirror


What's the Secret Sauce in Ruby on Rails?

An anonymous reader writes "Ruby on Rails seems to be a lightning rod for controversy. At the heart of most of the controversy lies amazing productivity claims. Rails isn't a better hammer; it's a different kind of tool. This article explores the compromises and design decisions that went into making Rails so productive within its niche."

414 comments

  1. Secret Sauce by Anonymous Coward · · Score: 0

    It's clearly Unicode support.

  2. Nice Summary. by Aladrin · · Score: 0, Offtopic
    Nice summary. Too bad it's stolen verbatim from TFA.

    Ruby on Rails seems to be a lightning rod for controversy. At the heart of most of the controversy lies amazing productivity claims. Crossing Borders author Bruce Tate has come to understand that Rails isn't a better hammer; it's a different kind of tool. This article explores the compromises and design decisions that went into making Rails so productive within its niche. Then it looks at Rails-inspired ideas that should get more attention within the Java(TM) community.

    --
    "If you make people think they're thinking, they'll love you; But if you really make them think, they'll hate you." - DM
    1. Re:Nice Summary. by Sky+Cry · · Score: 2, Funny

      Nice summary. Too bad it's stolen verbatim from TFA.

      I bet noone would realize, since nobody ever reads TFA. It's a sad world, when people steal summaries from the articles they link to.

    2. Re:Nice Summary. by Anonymous Coward · · Score: 2, Insightful
      Nice summary. Too bad it's stolen verbatim from TFA.


      So what? A summary should summarize the article (duh!). If the article itself does a good job at that, why reinvent the wheel?

    3. Re:Nice Summary. by CableModemSniper · · Score: 2, Informative

      Then it's been a sad world for a very long time.

      --
      Why not fork?
    4. Re:Nice Summary. by Ohreally_factor · · Score: 1

      It's par for the course here at slashdot. If it's not a clean lift from TFA, then chances are it's going to be incomprehensible. Writing skills on slashdot are that bad.

      --
      It's not offtopic, dumbass. It's orthogonal.
    5. Re:Nice Summary. by ardu · · Score: 1, Funny

      Be positive!
      A slashdot editor that read TFA: priceless!

    6. Re:Nice Summary. by Anonymous Coward · · Score: 4, Funny

      Nice comment. Too bad its stolen verbatim from the article AND the summary.

    7. Re:Nice Summary. by Anonymous Coward · · Score: 0

      What's wrong with copying a few lines from TFA? It is properly attributed, now isn't it?

    8. Re:Nice Summary. by Alterion · · Score: 2, Funny

      exactly, this improves the amount of the article that most /.'ers will read by 100%

    9. Re:Nice Summary. by rubycodez · · Score: 2, Insightful

      So the source should be attributed and the text placed in quotes. Out in the real world, stealing someone's work and pretending it's your own can be illegal and also make people look down on you

    10. Re:Nice Summary. by Anonymous Coward · · Score: 1, Insightful

      Just for correct referencing alone you should attribute material correctly to its source.

      There would not be anything wrong if you quoted the summary and cited it correctly.

    11. Re:Nice Summary. by Anonymous Coward · · Score: 0

      Huh? What are you trying to say?

    12. Re:Nice Summary. by Overly+Critical+Guy · · Score: 0, Troll

      This is Slashdot, where piracy is 100% okay in all situations. Except if the GPL is involved, then it'd bad and the EFF should sue.

      --
      "Sufferin' succotash."
    13. Re:Nice Summary. by ResidntGeek · · Score: 1

      1/0 paragraphs is infinity percent, or undefined percent.

      --
      ResidntGeek
    14. Re:Nice Summary. by dorkygeek · · Score: 2, Insightful
      I definitely prefer a verbatim copy of a summary over the sensationalist, misleading or sometimes even plain wrong summaries we use to see here at/..

      --
      Windows is like decaf - it tastes like the real thing, but it won't get you through the day.
    15. Re:Nice Summary. by Propaganda13 · · Score: 1

      You must be new here. A lot of people don't read the summaries either.

    16. Re:Nice Summary. by creepynut · · Score: 1

      Bah! Why read the summary? The headline has more than enough information. So anyways, I think the Secret Sauce is Mayonnaise.

  3. A question... by $1uck · · Score: 2, Insightful

    I've not seen a lot of RoR, but what I have seen reminded me a lot of ASP and JSP with lots of scriplets. Which I thought was bad form (code mixed with html). Have I just been looking at bad (or simple) examples? The article seems to hint that RoR does support MVC.

    1. Re:A question... by BorgCopyeditor · · Score: 2, Insightful

      You've been looking only at the 'V' part of it all. Some people put things in V that belong in M or C. That's not Rails' fault.

      --
      Shop as usual. And avoid panic buying.
    2. Re:A question... by masklinn · · Score: 4, Informative

      Fact is that Rails template (rhtml files, the views) are scripted directly using Ruby (there is no specific view/template language). This means that they can be abused, not that they should.

      When used well, Rails views are actually quite clean due to the high readability of Ruby itself and the ability to rapidly create so-called Helpers (Ruby methods that you can call from your views, to build specific HTML structures from generic datum, since you come from JSP land think Taglibs, but much simpler to define & use)

      Seems like DHH found Ruby simple enough to just use it as a templating language (and it works quite well), that's his choice, other frameworks in other languages picked a different one (Python's Django has a template-specific language for example, much simpler and less powerful than full blown Ruby but much less prone to abuse either)

      --
      "The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler
    3. Re:A question... by $1uck · · Score: 2, Interesting

      I should've figured as much before posting. I've just heard so much about RoR being the greatest thing since sliced bread. I really haven't been exposed to it, until I started looking into using AJAX for work (doing .NET and Java). When I saw some code and it reminded me of old ASP and JSP + Scriplets, I was just shocked.

      As to your sig, I can't say I have any love for VB (especially after being forced to use it), but after trying to deal with the MFC and doing GUI aps in C++ on a windows machine, I understand why it was created. Still think they should've just done a better job with the MFC or created something less retarded than VB.

    4. Re:A question... by FuzzzyLogik · · Score: 2, Informative

      You can use a lot of different templating languages here. A few off hand... Liquid Markaby You can write your own in fact. There's actually two that come in Rails, Builder for creating xml files (rxml) and the other you normally see for building html pages (rhtml suffix)

    5. Re:A question... by MrByte420 · · Score: 1

      Templating is key and has been greatly imporved with rails 1.1. I'm acutally a rails developer for a living and I'm in the proccess of writing a contact management system with a fully interactive AJAX/JS interface which feels and reacts much like a normal desktop application yet not breaking the user experience of a web browser. Everything we written works great and works immediately on all browsers. Rails just makes everything easy!

      --
      If religous zealots don't believe in Evolution, then why are they so worried about bird flu?
    6. Re:A question... by telbij · · Score: 1

      The fact that RoR uses erb templates is one of those opinionated design decisions that I really appreciate. RoR does it's best to encourage proper MVC separation without crippling the framework just to prevent bad practices. Java is the king of preventing bad practices, which is really good if you're hiring a bunch of tech school grads, but it's a bit verbose and cumbersome if you're a good programmer who knows what you want to do and how to do it.

      Using erb makes sense to me for one simple reason:

      Views need logic

        I don't know how many times I've heard that views should not have logic in them. But that's just stupid... they shouldn't have business logic in them, or control logic, but they definitely should have view logic. The idea of limiting views so they can be edited by designers without interfering with the rest of the application is a worthy goal, but too often it results in a crippled and inadequate templating language. Right from the start views are constantly in need of loops and conditionals. Ruby is perfect for this because of its iterators and lightweight syntax. I don't see much need in the general case for a specialized language... even PHP which is considerably more verbose than Ruby makes a decent templating language. I've used Smarty extensively, and it just falls flat on its face for iteration support. I've found myself putting in dozens of lines of code in a controller just to set up the data structures in the way that Smarty needs them (foreach or section syntax). If your controller is becoming bloated with view-support code then I say your templating language needs an overhaul.

      The Rails approach with instance variables and external helper methods is just a sane and efficient middle-of-the-road approach. If you're going to be submitting your templates for customization by third-party designers, then you are going to need a little more security, but that security will come at a cost that most applications should never have to pay.

  4. Oddities by Froze · · Score: 0, Offtopic

    Very strange, a web developement tool story shows up as "story currently under construction" with a red title bar. I click on the readmore link and the story goes blue. Then reloading the main page it is green.

    Is this standard procedure for all new stories or is this some kind of gimick/pun on web developement stories?

    --
    -- The morphemes of your disquisition are ascertainable, but they have eschewed an ambit of transpicuous exposition.
    1. Re:Oddities by Aladrin · · Score: 1

      Eh, yeah. Front page is always green. Each section has a color (this is blue). Stories that are 'under construction' and can't be replied to are red.

      --
      "If you make people think they're thinking, they'll love you; But if you really make them think, they'll hate you." - DM
  5. secret sauce by Anonymous Coward · · Score: 0

    I heard it was Kraft Thousand Island dressing.

  6. It's Ruby by LABob · · Score: 3, Insightful

    I've only used Rails a bit, but I've used Ruby a lot. It's by far the most flexible language I've ever used. It allows programmers to modify the most fundmental aspects of the language. Some argue this is a bad thing, and it may be. However, having the freedom to do that is very empowering. Don't get me wrong, other OO scripting languages are great too... Python for example. And, they share many concepts with Ruby. The things that make Ruby stand out (to me) are the ease of modification and syntax flexibility. IMO, Ruby is a wonderul toolkit that will allow one to build most anything, even more specialized tools like Rails.

    1. Re:It's Ruby by Anonymous Coward · · Score: 0
      I enjoyed the brief time I spent playing with ruby, the same cannot be said for rails. I probably should have continued playing with mod_ruby, afterall I passionately hate web dev frameworks in other languages; but I was only experimenting with it because of the rails hype.

      There's nothing rails does that I can't do in as few lines and with better performance using code that I have to hand.

    2. Re:It's Ruby by Nicolay77 · · Score: 2, Funny

      It's by far the most flexible language I've ever used. It allows programmers to modify the most fundmental aspects of the language.

      I guess you will love LISP macros.

      --
      We are Turing O-Machines. The Oracle is out there.
    3. Re:It's Ruby by bensch128 · · Score: 1

      I personally feel, (but have not experienced yet) that overriding method_missing should normally be a totally illegal operation unless it is extremely well documented. This feature is liable to cause horrible, horrible pain and suffering for maintaince engineers. However, it's great if you want your own domain specific language. The dsl just has to be documented in great detail and then not changed whenever some slob feels like it.

      Cheers,
      Ben

    4. Re:It's Ruby by TheRaven64 · · Score: 1
      I feel that most languages these days can be divided into two categories; cheap imitations of LISP, and cheap imitations of Smalltalk. From what I've seen of Ruby, it's Smalltalk Lite with less nice syntax.

      I put the blame for this squarely on the shoulders of modern computer science degree schemes. It seems possible to get a degree in this field without encountering either language. People graduate thinking languages like Java and C are the state of the art, and then go on to re-invent concepts from the '70s believing that they are novel.

      --
      I am TheRaven on Soylent News
    5. Re:It's Ruby by Beek · · Score: 1

      > There's nothing rails does that I can't do in as few lines and with better performance using code that I have to hand.

      Then release it.

    6. Re:It's Ruby by Nataku564 · · Score: 1

      C/C++ is taught because it does teach you everything. Everything about the C style languages, though. Once you know C/C++ you can move into any other similar language with relative ease.

      I'm not sure where Perl sits, however. It is clearly like C in some ways, yet has plenty of oddities to it ...

      I am interested to see what concepts from the 1970s you think people are reinventing in C,given that C was made in the 1970s.

    7. Re:It's Ruby by gbjbaanb · · Score: 1

      Then what is Java, if not just another C++ with less features.

      There are several branches to the programming tree, Prolog, Lisp and similar languages are one kind, Algol, C/C++ and Java are another. In all cases the degreee of productivity really lies in the hands of the programmer. Even a C programmer can be very productive, he'll just end up with a lot of library code that he reuses. With a tool like Ruby, someone has created these "library" routines for him.

      So, for a new, or less experienced, developer, Ruby is the perfect language becauses "its so easy to use", but for the old, seasoned, developers who know how to program, its not much different. Doubly so as those old devs will be working on the difficult stuff that the Ruby tool doesn't provide built-in features for.

      so, what innovation did C/C++ give us? General Purpose tools. The fact that these can turn their hand to anything, is, IMHO, the reason they're so popular today compared to any other language that can do X, Y, or Z better.

    8. Re:It's Ruby by x2A · · Score: 2, Informative

      I think you need to read the post you replied to again, especially how the second sentence (beginning "Everything") changes the meaning of the first sentence, which you replied to as if the second one wasn't even there.

      --
      The revolution will not be televised... but it will have a page on Wikipedia
    9. Re:It's Ruby by Anonymous Coward · · Score: 1, Insightful

      Languages are not about giving us a generalized hodge podge of tools. Virtually all comercial languages do that. You might as well program in VB if you think that way.

      Languages are about helping us solve problems. Each embodies a certain programming philosophy to increase chances of success. For example, programming OO in Smalltalk (and probably Ruby as well) has certain real advantages for the OO programmer.. because Smalltalk is a more powerful abstraction language than Java or C++ are. That is because Smalltalk simplifies the general OO mechanisms and reduces unnecessary clutter that Java and C++ force you to carry.

      It's all about making you more productive and making the code more reusable and maintainable. Java and C++ are just not as good as Smalltalk (and probably Ruby) for this.

      It's not about whether you have good programmers or not. Language can influence productivity and bugs. For example, I worked with a highly experienced C++ team. They then switched to Java and productivity rose beyond levels we had achieved with C++, in spite of the lack of experience with the new language and the unchartered waters we were navigating. (In this case, Java's exception model, ease of use and huge library availability allowed us to: not waste time implementing what others had done, find and fix bugs quickly, have less weird side effects, use things like threading to make our app more advanced).

      It's not just the programmer.. the tool the programmer selects is very important. In fact, the good programmer chooses the right tool instead of slaving with the wrong one.

    10. Re:It's Ruby by penguin-collective · · Score: 2, Interesting

      Then what is Java, if not just another C++ with less features.

      Actually, Java has considerably more features than C++, including garbage collection, runtime safety, well-defined dynamic loading, full reflection, and runtime code generation.

      With a tool like Ruby, someone has created these "library" routines for him.

      Ruby's libraries are poor compared to Perl's or Python's, so if it all were up to library code, Ruby wouldn't be popular.

      so, what innovation did C/C++ give us? General Purpose tools. The fact that these can turn their hand to anything, is, IMHO, the reason they're so popular today compared to any other language that can do X, Y, or Z better.

      Neither C nor C++ were the first general purpose languages by a long shot, nor have they ever been the best. The thing that made C popular was that it was free with UNIX to universities and was easy to implement. The thing that made C++ popular was that it was a simple (simplistic, as it turned out) extension of C that was fully backwards compatible. That's all. There was no innovation in either of those languages.

    11. Re:It's Ruby by Anonymous Coward · · Score: 0

      It doesn't change my point: the guy needs more CS education. He also needs some writing lessons.

    12. Re:It's Ruby by heinousjay · · Score: 1

      You should put some of the blame on the human brain - it's easier to think imperatively than functionally.

      --
      Slashdot - where whining about luck is the new way to make the world you want.
    13. Re:It's Ruby by glesga_kiss · · Score: 1
      Ruby's libraries are poor compared to Perl's or Python's, so if it all were up to library code, Ruby wouldn't be popular.

      And Java trounces most of them. You can get OSS libraries for just about anything you'd ever need to interface with.

    14. Re:It's Ruby by Anonymous Coward · · Score: 0

      And Java trounces most of them. You can get OSS libraries for just about anything you'd ever need to interface with.

      And that only again demonstrates that libraries aren't everything, because Java sucks despite its extensive libraries.

      In fact, the duplication of effort and multiple incomplete libraries that exist for the Java platform make the platform a real pain to work with. Add to that Java's tendency towards bloat in its libraries (very pronounced also in its "standard" libraries), you have a platform where availability of libraries is actually a liability.

    15. Re:It's Ruby by AmericanInKiev · · Score: 1

      An over-reliance on user-selected libraries reduces the utility of a language as a framework for the community-related aspects of a language - which I suggest are in most cases far more important than the language itself. For example the ability of google to return sample code in language x which solves problem y is a community-related aspect of the language.

      "Libraries" in the sense of randomly selected language mutations decreases the usefulness of solutions as they are often dependant on certain framework modifications.

      Another example of this problem is partial-ownership arrangements, such as web-hosting - in which langauge extensions are chosen at random by the hosting provider - here again, a solution which could work under the langauge fails because a mutation in the extension list.

      (A hard example would be the storage of images (blobs) in PostGreSql which is considered by most DB's to be a stock problem, but has three of more equally non-standard solutions in PostgreSQL.)

      VS.NET (for all the crimes of the parent company) provides a comprehensive framework for so many vital functions - that the future value of the "language" will be exponentially higher than library-dependant cousins.

      two bits.

      AIK

    16. Re:It's Ruby by Decaff · · Score: 1

      And that only again demonstrates that libraries aren't everything, because Java sucks despite its extensive libraries.

      In fact, the duplication of effort and multiple incomplete libraries that exist for the Java platform make the platform a real pain to work with. Add to that Java's tendency towards bloat in its libraries (very pronounced also in its "standard" libraries), you have a platform where availability of libraries is actually a liability.


      Only a true anti-Java zealot could post such nonsense. Java is not one thing - it is any of dozens of implementations which have different performance and memory characteristics. To say 'Java sucks' is meaningless.

      The availability of libraries is never a liability.

      There are plenty of incomplete non-standard libraries for Java, but the set for the standard distribution is complete, and is by no standards bloated. The standard libraries (unlike those for C/C++) are designed to work cleanly together, with internationalisation and thread safety and part of their fundamental design.

      If you are going to rant against Java, at least come up with some actual evidence.

    17. Re:It's Ruby by Anonymous Coward · · Score: 0

      To say 'Java sucks' is meaningless. Actually, it's quite meaningful: the platform itself sucks and the platform definition is bloated. The fact that Sun's implementation is also bloated is icing on the cake. If you are going to rant against Java, at least come up with some actual evidence. Why don't you come up with some evidence that Java is actually a technically superior choice to, say, PHP, .NET, C++, Flash, etc.?

    18. Re:It's Ruby by Decaff · · Score: 1

      Actually, it's quite meaningful: the platform itself sucks and the platform definition is bloated. The fact that Sun's implementation is also bloated is icing on the cake.

      Again, more ranting opinion based on no evidence.

      Why don't you come up with some evidence that Java is actually a technically superior choice to, say, PHP, .NET, C++, Flash, etc.?

      Trivial to do. Java is more scalable than PHP (has far better session and application scope data cacheing), and far more secure than PHP (no code injection problems). It is far more portable than .NET. It is far safer (with sandboxing and memory management) and portable at the binary level than C++ and far more versatile than Flash (could you show me a high performance database written in Flash? I can show you one - Hypersoniq - in Java).

  7. Liberal license by Jopop · · Score: 1, Insightful

    What about the fact that Rails is licenced under the "MIT License" while Java is (semi-)propietary?

    1. Re:Liberal license by Abcd1234 · · Score: 4, Interesting

      Actually, I think the vast majority of developers out there are far more interested in getting their damn job done, and couldn't care less if Sun GPL'd the Java sources. 'course, you'll never hear that because they're too busy *getting their damn job done*, instead of bitching about licenses on Slashdot.

    2. Re:Liberal license by GigsVT · · Score: 2, Informative

      Until Sun gets bought by some "we sue people for a living" company, like SCO did. Then they'll be a big scramble to make a third party JVM (and libraries) that doesn't suck and is clean of Sun IP.

      Will they pull it off in time? Who knows. It's still a huge risk to have invested years into an application that can have the rug pulled out from under it at any time.

      --
      I've had enough abrasive sigs. Kittens are cute and fuzzy.
    3. Re:Liberal license by slim · · Score: 1

      Actually, I think the vast majority of developers out there are far more interested in getting their damn job done

      Just like the vast majority of businessmen dealing with South Africa who were far more interested in getting their damn job done than in ending apartheid?

      Or those in the cotton industry who were more interested in getting their damn job done than in the injustice of slavery?

      I don't want to imply that software freedom is as important as those two examples, but hell, don't criticise people for having ideals and doing something about it.

    4. Re:Liberal license by bnenning · · Score: 1

      Actually, I think the vast majority of developers out there are far more interested in getting their damn job done

      Probably true as far as it goes. But when there's a nasty bug that's deep in the bowels of the framework I'm using, being able to access the source greatly helps in getting the job done.

      --
      How to solve most of our problems: 1.Lots of nuclear plants. 2.Cure aging.
    5. Re:Liberal license by Nataku564 · · Score: 1

      People could simply put their time and energy into Perl 6 instead. An open source VM (Parrot) that is well into development, and the primarly language for this VM already has a rather sizable following (Perl 5/6). Its intermediary language (Cola) is OO style, so making a compiler that converts JAVA to COLA shouldn't be all that difficult. Of course, rewriting the libraries will be difficult ... but that part will be the same regardless of where you port Java to.

      http://dev.perl.org/perl

    6. Re:Liberal license by helifex · · Score: 1

      It may be true that the vast majority don't care but I can say for sure that it's the reason I quit using Java, and oddly moved to Ruby for all my development projects. Not everyone has that freedom, if they want to keep there job, but I did and exerciesed it.

      It's unlikely that I would ever consider developing software in any language that wasn't released under an open source license, gpl, mit, etc...

    7. Re:Liberal license by penguin-collective · · Score: 2, Insightful

      I think the vast majority of developers out there are far more interested in getting their damn job done, and couldn't care less if Sun GPL'd the Java sources.

      Yes, I'm sure many young real-world developers think that way. Now, they should think about what happens when Sun goes out of business, or when they sell Java to Microsoft, or when they just can't afford to pour money into Java anymore, or any of a number of other possibilities. Think it can't happen?

      Well, back in the day, we didn't think it would happen to companies like DEC or Symbolics, but it did. That's why real-world developers, after getting screwed by companies like Sun, decided to rely increasingly on open source software, because in the long run, it gets the job done more predictably and with less risk.

      Using and contributing to open source software for most people is just business: it primarily reduces risk by ensuring long-term availability and stability of a platform, in a way that no company has ever been able to.

    8. Re:Liberal license by VGPowerlord · · Score: 2, Insightful

      IBM has made JVMs in the past. I wouldn't put it past them to make them again if Sun becomes Sue.

      --
      GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
    9. Re:Liberal license by VGPowerlord · · Score: 1

      Perl 6 has been in development for what, 7 years? Perhaps it's time someone looked into finishing it?

      --
      GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
    10. Re:Liberal license by chromatic · · Score: 1

      Brilliant! If only we had thought of that!

    11. Re:Liberal license by killjoe · · Score: 1

      So you are saying that people who are concerned about licensing are not able to get as much work done as people who don't?

      That's seems like a stupid statement to me. It's been my experience that people who are concerned about licensing are on the average smarter then your typical drone programer and do indeed get much more work done.

      Where did you get this notion that the people who don't care about licenses are more productive then people who do?

      --
      evil is as evil does
    12. Re:Liberal license by I+Like+Pudding · · Score: 1

      Based on Larry's apocalypses (apocalypti? I like that better, as I do not slobber all over when saying it), it looks he's trying to design a metalanguage to encapsulate every idiom instead of just a better Perl. I imagine this would bloat development time a bit.

    13. Re:Liberal license by Anonymous Coward · · Score: 0

      I'm aware of your involvement with the Perl community, chromatic. And I'm going to be blunt with what I say.

      There are many in the Perl community who are very disappointed with what Parrot has become. It's a noble effort, but its complete lack of developmental stability is becoming quite a liability. Every day we have former Perl developers and users moving to Java and .NET-based systems. Many others are moving towards Ruby or Python.

      Like it or not, something must be done soon if Parrot is to be taken seriously. At this time, projects like Parrot and Pugs feel more like academic exercises, held outside of academia. That's not to suggest that they're without benefit, but what many of us developers are finding is that they're useless for use in real-world situations.

      The longer the Parrot development process is carried on, the less people will take it seriously. It's perhaps at a critical point now, where people are going to completely ignore it in favor of solutions (unforunately, .NET and Java) that do offer less-volatile platforms.

    14. Re:Liberal license by colmore · · Score: 1

      Well, I'm a developer, and I can assure you that I *definitely* care about the rights granted and restricted by the platform I'm developing for.

      I'm moving west, and trying to move into web and web services in part to get out of the nightmare world of doing projects for Microsoft shops. Closed source is a terrible world to be writing software in. My projects should rely only on me, my client, and future maintainers. The future actions of some third party shouldn't force us to reconsider our solution, or worse, worry about legal problems.

      --
      In Capitalist America, bank robs you!
    15. Re:Liberal license by Anonymous+Brave+Guy · · Score: 1
      That's why real-world developers, after getting screwed by companies like Sun, decided to rely increasingly on open source software, because in the long run, it gets the job done more predictably and with less risk.

      There is a world of difference between the spec defining a language being an open standard, and the reference implementation being Open Source. The former is what guarantees the security, because it means multiple implementations are possible. The latter might be convenient, but ultimately relying on a single-implementation programming language is risky anyway, whether or not you've got the source.

      Please don't turn an important point about future-proofing into an exercise in OSS evangelism. Many mainstream languages have been operating on the open standard principle since before the GPL was a glint in Stallman's eye.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    16. Re:Liberal license by ciggieposeur · · Score: 1

      There is a world of difference between the spec defining a language being an open standard, and the reference implementation being Open Source.

      Except when the spec itself defines compliance to the open language standard as "implementing all the features of the closed reference implementation".

    17. Re:Liberal license by Anonymous Coward · · Score: 0

      they're too busy *getting their damn job done*, instead of bitching

      What a loser. Sounds like the argument of a deadbeat dad - his job in life is done, WTF should he care about the bitches? Damn consequences, the impact on society, and all that bullshit, right?

    18. Re:Liberal license by Nataku564 · · Score: 1

      .Net is just the new VB. Despite Microsoft claiming its actually a worthwhile development base, its still just a RAD tool (in my mind) and still tied to the system, again, despite the claims of its progenitor. Its stuck to one platform too. I don't think .Net is the competetor that Perl has to worry about.

      Ruby, on the other hand, is a bit closer to home. PHP even more so. My webhost doesn't even allow mod_perl anymore, only ruby and PHP.

      However, neither of these languages is the swiss army duct tape that Perl is.

    19. Re:Liberal license by penguin-collective · · Score: 1

      There is a world of difference between the spec defining a language being an open standard, and the reference implementation being Open Source.

      But Java IS NOT an open standard: the specs are only available under a restrictive license and remain proprietary to Sun. And they are still incomplete so that you need Sun's implementation. The only compliant implementation of Java there is (and likely ever will be) is Sun's.

      That's why it doesn't matter whether Microsoft open sources Visual C++, but it does matter a great deal whether Sun open sources Java.

    20. Re:Liberal license by chromatic · · Score: 1
      Like it or not, something must be done soon if Parrot is to be taken seriously.

      I checked in code to Parrot yesterday. I checked in code to Parrot today today. Did you?

      I talked to a student who proposed a Summer of Code project today. Did you?

      If "something must be done", someone must do something (unless by "something" you mean "yammer yammer endless armchair quarterback anywhere but with other developers, where it might actually matter").

      Do something, if you're someone. I dare you.

    21. Re:Liberal license by Anonymous Coward · · Score: 0

      If Sun would opensource their whole Java platform maybe a stable branch could be created which doesn't break your fucking software after a (small) upgrade due to random api changes. And that does matter to programmer in the field, which I'm suspicious you aren't. Basically In the beginning Java at least showed the intent to be a stable platform, "write once run many" or whatever, but it has failed and because of that now we're stuck with fucking .Net (until that proves to be crap to, which it is, but will be a lot harder to get rid off). Thanks for that Sun!

    22. Re:Liberal license by turgid · · Score: 1

      Based on Larry's apocalypses (apocalypti? I like that better, as I do not slobber all over when saying it), it looks he's trying to design a metalanguage to encapsulate every idiom instead of just a better Perl. I imagine this would bloat development time a bit.

      Ah yes, the last stage of megalomania. Trying to Take Over the World.

    23. Re:Liberal license by Decaff · · Score: 1

      Will they pull it off in time? Who knows. It's still a huge risk to have invested years into an application that can have the rug pulled out from under it at any time.

      No, it isn't a huge risk; it isn't even a little one. Java is backed by almost all major software companies with the exception of Microsoft. In addition to Sun, IBM have invested huge resources and finances into backing Java, as have HP, Oracle, Borland, BEA, PeopleSoft, SAP and just about everyone else. Even if Sun disappeared and took the 'Java' brand with it, there would be large companies producing compatible VMs and products. This multiple vendor backing is one of the reasons why Java is so successful. Calling it a risk is nothing more than open-source paranoia, and is just ranting.

    24. Re:Liberal license by GigsVT · · Score: 1

      Have you ever even read those 50 pages of legalese every time you install the JVM?

      Summary:
      Sun can fuck you any time they want to for any reason they want to.

      --
      I've had enough abrasive sigs. Kittens are cute and fuzzy.
    25. Re:Liberal license by Decaff · · Score: 1

      Summary:
      Sun can fuck you any time they want to for any reason they want to.


      Which is completely irrelevant. If Sun did that, then IBM, or HP, or BEA, or PeopleSoft, or SAP or any of a dozen other firms would individually or together implement something that Runs Java code that is not called 'Java' - they have hundreds of millions of dollars of investment in this technology.

      As I said, worries about safety of using Java are nothing but ranting.

    26. Re:Liberal license by GigsVT · · Score: 1

      They would, I don't doubt it. But what are you going to do in the meantime?

      --
      I've had enough abrasive sigs. Kittens are cute and fuzzy.
    27. Re:Liberal license by Decaff · · Score: 1

      They would, I don't doubt it. But what are you going to do in the meantime?

      What meantime? Are you seriously suggesting that the most widely used development language in use today would instantly vanish? Or that IBM (with its billions of dollars of resources) would not do something immediate to defend the use of Java (which IBM uses extensively)?

      I know that some open source supporters feel uncomfortable about the use of non-open products, but to assume that anything could happen to interrupt mass use of Java is plain nonsense. You might equally worry about the fact that the hardware you are using to run open source software isn't open - do you have an open bios? an open processor?

      I like open source, and I would personally like an open source Java, but to worry to this extent about licenses is crazy.

    28. Re:Liberal license by GigsVT · · Score: 1

      They can't revoke my right to use my hardware on a whim. Sun, however, can disable every installation of the JVM in every device world-wide for whatever reason they want to. It has a phone-home clause in the license remember?

      --
      I've had enough abrasive sigs. Kittens are cute and fuzzy.
    29. Re:Liberal license by Decaff · · Score: 1

      They can't revoke my right to use my hardware on a whim. Sun, however, can disable every installation of the JVM in every device world-wide for whatever reason they want to. It has a phone-home clause in the license remember?

      No, they can't disable every installation of the JVM. They can put what they like in a license, but local laws override such things. If they tried such a thing they would be slapped instantly with major international lawsuits to counter any such attempt.

      What interests me is the type of mindset that assumes that they would even if they could. If you are really worrying about such things, you must worry about a lot. I mean, is your PC safe from abduction by aliens?

    30. Re:Liberal license by GigsVT · · Score: 1

      I mean, is your PC safe from abduction by aliens?

      Yes, my tinfoil hat prevents that.

      --
      I've had enough abrasive sigs. Kittens are cute and fuzzy.
  8. It's multiparadigm. by Anonymous Coward · · Score: 2, Informative

    The big benefit is that it's multiparadigm. It draws the best from the OO world of Smalltalk, while also offering very solid functional features. These are the traits of languages that are suitable for high-quality, fast-turnaround software development.

    We can see Ruby applications that are comparable functionality-wise (and portability-wise) to C++ programs, but written in a 1/10 of the time with 1/20 the number of lines of code. That's why Ruby-based solutions are effective and popular.

    1. Re:It's multiparadigm. by Abcd1234 · · Score: 2, Interesting

      It draws the best from the OO world of Smalltalk, while also offering very solid functional features.

      Uhh, dude... that is Smalltalk. Smalltalk was specifically designed to meld OO development methodologies with the power of functional languages like LISP. Why do you think that blocks and functions are first class objects in Smalltalk? Or that it has proper lexical closures?

      In fact, every time I look at Ruby, all I see is a pale reflection of Smalltalk. I've yet to see anything new it brings to the table.

    2. Re:It's multiparadigm. by Fahrenheit+450 · · Score: 1

      In fact, every time I look at Ruby, all I see is a pale reflection of Smalltalk.

      Yep. I mean, it's a nice little language. Surely preferable to things like Perl or Python, but it's not particularly special. Most of the features that everyone seems to love about it are done much better in languages like Smalltalk and OCaml, but those languages just haven't been given the Nifty! label like Ruby and Python have.

      But people see thing like 3.times do |blah| something with blah end and get a little swoony.

      --
      -30-
    3. Re:It's multiparadigm. by Anonymous Coward · · Score: 0

      It brings sugar to the table! Syntactic sugar. Smalltalk, for all its super-simplicity, can be a bit grating to look at, especially if you're from a C-style-language background.

    4. Re:It's multiparadigm. by Tablizer · · Score: 2

      We can see Ruby applications that are comparable functionality-wise (and portability-wise) to C++ programs, but written in a 1/10 of the time with 1/20 the number of lines of code.

      That's not hard to do. Almost every scriptish language beats C and C++ in those regards. C/C++ claim to fame is hardware closeness and machine speed, NOT human productivity.

    5. Re:It's multiparadigm. by HeroreV · · Score: 1

      Exactly. We wont't be seeing the next Halo or Doom using a scripting language anytime soon.

    6. Re:It's multiparadigm. by Forbman · · Score: 1

      right, but if they embed a scripting language to expose the guts of the app to modders, it ain't going to be through C++, either. LUA, Ruby, Pyton, et al. will be how that is (already being) done.

    7. Re:It's multiparadigm. by rossifer · · Score: 4, Insightful

      In fact, every time I look at Ruby, all I see is a pale reflection of Smalltalk. I've yet to see anything new it brings to the table.

      Deliverable packaging. Extracting a Smalltalk program from the development environment for distribution is, to be generous, annoying. Which is one of the reasons why Smalltalk works so well in an academic environment, but never caught on for commercial work. Ruby, on the other hand, is about as tough for someone else to deploy as Perl (it isn't).

      This is one of the places where Java really changed things and is IMHO, the big reason for why Java has become so popular. .jar files (and the variations on that theme: .war, .ear, etc.) can package up lots of different things, and as long as people know what VM version to run it on, they're good.

      Regards,
      Ross

    8. Re:It's multiparadigm. by Maxmin · · Score: 1

      We wont't be seeing the next ... Doom using a scripting language anytime soon.

      nooo... but you might be seeing the first Doom using a scripting language sometime soon..

      --
      O lord, bless this thy holy hand grenade, that with it thou mayest blow thine enemies to tiny bits, in thy mercy.
    9. Re:It's multiparadigm. by Abcd1234 · · Score: 1

      Deliverable packaging.

      Yeah, I couldn't agree more on this front. The Smalltalk community really dropped the ball in creating an actually useful Smalltalk distribution that didn't force you to use the silly "image" model.

      But, my point was really that, at a *language*-level, Ruby offers very little that's new or innovative (which contradicts what the original poster was suggesting). OTOH, I suppose I should be happy that there's at least one very Smalltalk-like mainstream language now available. :)

    10. Re:It's multiparadigm. by rossifer · · Score: 1

      Rather than framing Ruby as "Smalltalk-lite", I see Ruby as "maintainable-Perl" with the dramatically superior syntax and Object foundation of Smalltalk. By building in regular expressions, and making it so easy to get started, it takes many of the strengths of Smalltalk and uses them to (successfully) improve many of the weaknesses of Perl.

      But as you say, the syntax isn't better than Smalltalk. Like Smalltalk, Ruby's syntax is better than many of the alternatives.

      Regards,
      Ross

  9. Ob. Simpsons quote: by Farmer+Tim · · Score: 0, Troll

    "Take this jar of mayonaise and leave it in the sun".

    --
    Blank until /. makes another boneheaded UI decision.
  10. Relentlessly applying best practices by Scarblac · · Score: 5, Informative

    As far as I've seen, there isn't that much actually new in RoR. But it's obvious that someone has had a great idea how a whole bunch of known stuff should fit together, in a way that encourages best practices (like a lot of testing, and code reuse). It has near perfect design.


    The language Ruby wasn't new; Active Record wasn't new, nor was the idea, but it fits with Ruby really well. MVC was old, but the tiny bits of boilerplate needed makes it look like magic now and then. Everybody knows testing is essential, but I hadn't seen it integrated into a web framework so well before. The idea of "sensible defaults" can't have been new, but the switch from reams of XML (in Java web programming) to near invisible config is great. The object-oriented Javascript libraries it uses weren't new, nor are template languages, but the way in which they're added together is pretty seamless. Et cetera.


    No wonder every web programming language community out there is rushing to put together it's own version of Rails... but the libraries don't always fit together as seamlessly. I think that Hansson's main achievements are recognizing that all the known best practices can be put together really well, and that Ruby and its libraries were a great fit for that.

    --
    I believe posters are recognized by their sig. So I made one.
    1. Re:Relentlessly applying best practices by SpacetimeComputing · · Score: 3, Interesting
      As far as I've seen, there isn't that much actually new in RoR. But it's obvious that someone has had a great idea how a whole bunch of known stuff should fit together

      Am I the only one who was reminded of Ajax at this point? Old technologies put together, lots of hype...
      --
      :wq
    2. Re:Relentlessly applying best practices by Cyberax · · Score: 1

      Nowdays one can use annotations in Java to replace almost all XML configuration files.

      Frankly, I don't see why Ruby is superior to Tapestry+Hibernate.

    3. Re:Relentlessly applying best practices by Monkelectric · · Score: 1
      Everybody knows testing is essential, but I hadn't seen it integrated into a web framework so well before

      Zope encourages automated testing strongly ... too bad the rest of the thing is the titanic.

      --

      Religion is a gateway psychosis. -- Dave Foley

    4. Re:Relentlessly applying best practices by Anonymous Coward · · Score: 0

      But it's obvious that someone has had a great idea how a whole bunch of known stuff should fit together, in a way that encourages best practices

      That's what I heard too. Until I saw the JavaScript integration that the latest version included.

      Best practices my arse. I don't care how many fanboys worship the Rails guy, if he let something that awful in, he knows fuck all about JavaScript best practices. It's mid-90s crud. It put me right off Rails when I saw that.

      I seem to remember that there were similar problems with unsafe GETs etc previously. The guy might know his stuff on the server-side, but he's got a long way to go before his client-side code is up to scratch.

      The fact that the people using Rails are seemingly oblivious to just how bad this code is - in fact, they praise it - is highly disturbing. Are there no competent front-end web developers in the Rails community? Or are they just scared of pointing out the emperor has no clothes to the fanboy hordes ready to tear them limb from limb?

    5. Re:Relentlessly applying best practices by Anonymous Coward · · Score: 0

      "Until I saw the JavaScript integration that the latest version included."

      Please explain.

    6. Re:Relentlessly applying best practices by Decaff · · Score: 4, Interesting

      As far as I've seen, there isn't that much actually new in RoR. But it's obvious that someone has had a great idea how a whole bunch of known stuff should fit together, in a way that encourages best practices (like a lot of testing, and code reuse). It has near perfect design.

      No, it really doesn't, and to claim it does is to ignore the wide range of uses of object persistence. What it has is a great design for getting web interfaces up and running quickly on databases. It has a very poor design for long-term maintenance and growth of applications.

      The ActiveRecord pattern is of limited use, especially as implemented in Rails. Your code is not isolated from major changes in the schema, and the dynamic nature of Ruby means that the consequences of such changes can't be tracked by compilation or refactoring tools; especially as the model classes don't even exist as code. Tests are a good way to help with this, but try and design tests to deal with potential schema changes for a large application that may have transactions involving thousands of records...

      To see what a good persistence system should be like, take a look at Kodo or Xcalia - very high performance persistence system that allow exactly the same code and queries (which are automatically highly optimised for the particular database - not some minimal portable subset of SQL as in Rails) to be run on small embedded databases and high-end clustered systems. Unlike Rails, these systems can handle transactions of hundreds of thousands of records (something that is not that uncommon for commercial work) without thrashing disk or memory. You can also use the same code to persist and read to XML, LDAP and many other types of store. And yes, these systems also have 'convention over configuration' like Rails - they got there first, and had it years before RoR.

      RoR has some great ideas, and definitely has its uses, but to claim it has near perfect design is way out, and sorry, but best practise in data model design in object oriented languages like Ruby does not involve basing things on non-OOP relational tables!

    7. Re:Relentlessly applying best practices by aldheorte · · Score: 4, Interesting

      Yes as to hype, no as to technical merit.

      AJAX is based on technologies with extremely poor design and implementation, such as browsers, JavaScript, and HTML (poorly designed for this application, perfectly ok for marking up documents). Rails takes lessons learned from a decade of server-side Web development, as well as the catastrophe that has become J2EE through over-engineering, and simplifies it to the essential mechanisms. Built on top of Ruby, which is itself a pretty thin simplification wrapper over C++, it combines the simplification of Web site development best practices (MVC, proper tiers, etc.) with the power of an high level development language overlaid directly on top of a low level near-assembly language, with the ability to perforate the abstraction layer (first through modifying Rails source in Ruby, then through C extensions) if needed for performance or other reasons.

      Short, brutal version: AJAX built on crap by script kiddies, Rails on bedrock by software engineers.

    8. Re:Relentlessly applying best practices by kwerle · · Score: 1

      Built on top of Ruby, which is itself a pretty thin simplification wrapper over C++

      If you'd said Java, I'd have let it slide. If you'd said Objective-C, I'd have maybe even agreed, but C++? Naw.

      Introspection. Non-polymorphic. Dynamic method forwarding.

    9. Re:Relentlessly applying best practices by bahwi · · Score: 1

      Exactly. Everything rails has accomplished could have been accomplished in another language. COULD HAVE BEEN. Not was, is being implemented now. Something better may emerge. But rails came in the game late, beat everyone to something, and now everyone is upset. I've been loving rails, it's so easy, didn't even have to really learn ruby(sorry, a lot of web stuff is so simple it could be done in plain english were there an interpreter for it and it looked good). Is it great for more advanced apps? Maybe, maybe not. But for the web, they put everything together in a nice neat package how it should have been for everything else.

    10. Re:Relentlessly applying best practices by NutscrapeSucks · · Score: 1

      I'm upset. I wrote (something like rails) in Javascript/ASP around year 2000, and gave up on it 3/4th way because I thought it wasn't worth the effort; and ASP.NET was coming out. Even playing with Rails, I still kind of think that it a bunch of code that still only solves the easy problems. But now I realize if I would have picked a more obscure open source language, I could have been cool and famous.

      --
      Whenever I hear the word 'Innovation', I reach for my pistol.
    11. Re:Relentlessly applying best practices by Anonymous Coward · · Score: 0

      "Exactly. Everything rails has accomplished could have been accomplished in another language. COULD HAVE BEEN. Not was, is being implemented now. Something better may emerge. But rails came in the game late, beat everyone to something, and now everyone is upset."

      Who's upset?

      Those of us sick of hearing every 3rd rate programmer screaming about practices that any decent programmer already followed?

      While I'm not a fan of the whole framerwork RoR is running under, its not like others haven't done similar things. I know I have a similar framework I've used that did quite a bit for me so that I didn't need to reinvent the wheel each and every time. Personally, I don't care for the ActiveRecord idea. Its too simplistic. Even when playing with RoR and redesigning an application from scratch including rebuilding the database to be AR compliant, I didn't care much for it because it didn't allow for anything much more complicated than simple joins. Anything more than this, and you CAN manually build it into the application but you lose most of what it valuable about its idea. Or you build it into a view -- and then you simply offset the programming onto loading up the database instead of loading up the application side of things.

      Beyond that, I'm not too terribly impressed. Again, I've had my own frameworks that have allowed me to build applications overnight that others might have to struggle for a week or two to do. I've done this in both PHP and ASP so that I could pretty much build the same app the same way depending on what my client was looking for (which sorta sucked because I had to limit features to the subset of the languages and rebuild datastructures so that they acted alike).

      Is it as deep as Rails? Fuck no. I never needed it to be. If I were aiming this for others, it might have been...but it would have ruined what I wanted it to do. Got to admit, I have gotten a LOT of use out of the prototype library that is in play with RoR and I've adopted some of their better ideas, but I haven't felt the need to make the leap to their framework yet (I also have CakePHP on my Mac as I've been trying to use someone elses tested frameworks and I haven't felt the need to use it much either).

      But as you say, advanced apps? I'm not so sure that I'd be comfortable using these frameworks except to get the ball rolling...everything I've seen coming from this app seriously feels like either it was extended elsewhere outside of this paradigm or maybe had the framework extended (i.e., because the most complicated stuff I've seen has ALL come from 37Signals and they are its creators -- its a lot easier to change the internals of a development tool when you hold the strings).

      So again, the only folks that are upset are folks sick of hearing brainwashed 3rd rate programmers tell us that everything we've done smoothly and successfully for years is *NOW* possible and only possible because of their new messiah.

    12. Re:Relentlessly applying best practices by Anonymous Coward · · Score: 0

      Built on top of Ruby, which is itself a pretty thin simplification wrapper over C++

      Thin as in 30x slower...

    13. Re:Relentlessly applying best practices by I+Like+Pudding · · Score: 5, Insightful

      AJAX is based on technologies with extremely poor design and implementation, such as browsers, JavaScript, and HTML (poorly designed for this application, perfectly ok for marking up documents)

      The only part of that I'll give you is the poor IE implementation of CSS. Browsers' main problem lies in their non-compliance with standards. Solution: test in multiple browsers. WOW, THAT WAS HARD. Next up: JavaScript. Poor design? I was shocked at how powerful the language is when I finally started digging into it after years of avoidance. Poor imlpementation? Not really - just many different implementations. Of course, this can and has already been worked around with libs that abstract the differences away for you. HTML? It still is used as a basic markup language, with all the heavy lifting being pushed into the CSS. Now, CSS is nowhere near perfect, but it does function admirably in the scope of AJAX (when not using IE's broken ass implementation).

      Rails takes lessons learned from a decade of server-side Web development, as well as the catastrophe that has become J2EE through over-engineering, and simplifies it to the essential mechanisms.

      I half-agree. You imply a minimalism that isn't present. The framework is quite complicated in places and does a lot of tricky things. You see, programming with just the essential mechanisms sucks; you've gone back to CGI.pm. What Rails does is provide a massive lever with which to move your problem. The Actual Work Done Per Line of Code metric exceeds any other framework I have used before. Code efficiency is the watchword, not simplicity.

      Built on top of Ruby, which is itself a pretty thin simplification wrapper over C++,

      No it isn't. Ruby's implementation is a big, slow VM that doesn't act much like C++ at all. Really, the poor performance is the only thing I dont like about the language.

      it combines the simplification of Web site development best practices (MVC, proper tiers, etc.) with the power of an high level development language overlaid directly on top of a low level near-assembly language, with the ability to perforate the abstraction layer (first through modifying Rails source in Ruby, then through C extensions) if needed for performance or other reasons.

      That sounds like marketroid speak, and is about 3/4ths BS. Perforate the abstraction layer? Jesus. And just who is running around writing C++ extensions for web apps? Almost nobody. Takes too damn long, and isn't as safe as running through the VM.

      Short, brutal version: AJAX built on crap by script kiddies, Rails on bedrock by software engineers.

      DHH is something closer to a hacker, not to mention the fact that rails utilizes AJAX and, more generally, javascript all over the place. Does that make AJAX apps built on top Rails rock? Or does all that terrible, awful AJAX stuff diminish Rails? Maybe they, I don't know, utilise the same foundation technologies and standards and complement each other quite nicely? Maybe you are an idiot?

    14. Re:Relentlessly applying best practices by aldheorte · · Score: 1

      You are right, I went too far in saying it was a 'thin abstraction layer'. Obviously it offers the things you cited, which C++ does not, and is completely interpreted, etc. I meant more that it is closer, or perhaps, more accessible, to C/C++ in the sense that you can create Ruby C/C++ extensions, as well as embed the Ruby interpreter into your C/C++ application. Also, the organization of libraries, method names, comments, and certain operators give a much more C/C++ feel to it than, say, a Java feel, though that's obviously subjective.

      As for execution speed in response to another poster, the vast majority of performance problems in software generally are merely the demons of premature optimization imagination. The few true performance problems any given application actually ever realizes generally fall into either a well known pattern or are going to require some near-assembly code to be truly efficient. That's why I don't worry about scalability so much. Yes, Ruby is definitely slower than a compiled language, but, if I ever need the performance in a key area, I know I can just fall back to a compiled extension. The amount of time Ruby development saves makes up for the performance hit, allowing serious energies to be applied only to demonstrated issues.

    15. Re:Relentlessly applying best practices by HaggiZ · · Score: 1

      Without knowing much about the other systems you mention and how they work, isn't the whole basis of "convention over configuration" taken to mean "if you only want the defaults, do nothing... if you need something more complex/controlled/etc then you can configure it accordingly". And to that, you can customise the SQL used to return a model, define relationships, or pretty much anything you want in rails as well.

      The idea being get the system up and running and work out what needs to be addressed from a performance perspective based on real world usage instead of over-engineering based on a preconceived notion on where the problems will be.

    16. Re:Relentlessly applying best practices by jcinnamond · · Score: 1

      Browsers' main problem lies in their non-compliance with standards. Solution: test in multiple browsers. WOW, THAT WAS HARD.


      Testing in multiple browsers will only show you that's it's broken. Fixing pages so that they look right is hard, and sometime impossible.


      JavaScript. Poor design? I was shocked at how powerful the language is...


      Powerful, yes. Well designed, no. (Of course, this is a subjective judgement, and javascript does what it does a lot better than the alternatives. But there is still a lot it does badly, or shouldn't do at all.)


      HTML? It still is used as a basic markup language...
      ...and this makes it a bad choice for AJAX. If your only return type is marked up documents then you end up having to do funky stuff some of the time.


      You imply a minimalism that isn't present. The framework is quite complicated in places and does a lot of tricky things.


      This is true to an extent. Rails makes it really easy to write most of your application, which leads to minimalism in your code. But it isn't perfect, so you do end up having to learn some complicated concepts sometimes, or at least learning the rails way of doing things. Most of the time, however, you don't need to know about rails' trickiness.


      Ruby's implementation is a big, slow VM


      It's not that slow. It should be quick enough for a lot of web apps. I find that any slowness is due to my bad coding rather than ruby's speed in the majority of cases. (Although this might say more about my coding that it does about ruby ;)


      not to mention the fact that rails utilizes AJAX and, more generally, javascript all over the place.


      No it doesn't. Rails providers helpers for AJAX and javascript, but it does not utilize them. People writing rails apps might utilise them, and the fact that rails helps you out is a Good Thing. It would be wrong, though, to suggest that rails somehow depends upon them.

      I think the grandparent poster is right -- comparing AJAX and rails is misleading. Rails is much better thought out and designed; AJAX is more of a cobbled together pragmatic solution. The real beauty of rails is that it makes it easy to write applications properly, and discourages you from reinventing the wheel badly.
    17. Re:Relentlessly applying best practices by Decaff · · Score: 1

      Without knowing much about the other systems you mention and how they work, isn't the whole basis of "convention over configuration" taken to mean "if you only want the defaults, do nothing... if you need something more complex/controlled/etc then you can configure it accordingly". And to that, you can customise the SQL used to return a model, define relationships, or pretty much anything you want in rails as well.

      The idea being get the system up and running and work out what needs to be addressed from a performance perspective based on real world usage instead of over-engineering based on a preconceived notion on where the problems will be.


      But that is exactly what Rails does - it over-engineers by moving away from the idea of modelling with simple objects and allowing an easy object-relational system to automatically handle the data. Defining the model and relationships with SQL is by no means the simplest way! Let me give you an example of how another system works - the Java Data Objects (JDO) system. You define your model as totally normal classes. You can then give the minimal configuration - you simply list the classes you want to store in the database in a configuration file, and that is it. Database tables and columns are defined using sensible defaults, and even better high-performance SQL is automatically generated - you don't have to use any SQL at all. This is far simpler than Rails, and there are open source and free versions. JDO has had convention over configuration since 2000!

      I don't mean to criticise, but you really do need to understand other systems in order to understand how limited Rails is. There is a huge amount of understandable enthusiasm for Rails, but mostly from developers who have not used modern fast object-relational systems in other language. They get the impression that Rails is the ultimate, whereas in many respects it is poor design.

    18. Re:Relentlessly applying best practices by Decaff · · Score: 1

      as well as the catastrophe that has become J2EE through over-engineering

      Well, it is one of the most successful 'catastrophe's ever! A catastrophe that is used by most high-performance commercial web applications and server systems (E-Bay, for example).

      J2EE is not over-engineering. It has a very specific purpose - high performance on clustered systems. You deploy your application and need neither know or care which platforms it runs on, or how many servers it is using. You can fine-tune how requests and sessions are handled, with different degrees of redundancy and failover without the application programmer needing to do anything.

      What is the catastrophe is the huge misunderstanding of what J2EE is and what it was designed to do. Comparing the full J2EE stack with PHP or RoR is like comparing a large truck with a bicycle - both have their roles, and you will screw things up if you use either inappropriatelty.

      There are parts of J2EE (the JSP/Servlet API) that are anything but over-engineered, and be used for very fast development - JSP pages can be scripted just like PHP, and require no app reloading to see changes.

    19. Re:Relentlessly applying best practices by Aceticon · · Score: 1

      First a disclaimer: I've done AJAX, i've done JavaScript (and ECMAScript - ie outside a web-browser - too) for years now but i haven't done any Ruby and much less used RoR.

      I can't believe you post is currently rated as +5 Insightful - it's a knee jerk, rant-like, fanboy reaction to the a criticism to your current "this is so cool" hype word du jour.

      A couple of tasty snippets:
      The only part of that I'll give you is the poor IE implementation of CSS. Browsers' main problem lies in their non-compliance with standards. Solution: test in multiple browsers. WOW, THAT WAS HARD.

      If having to test on every browser (not to mention browser versions) is not a mark of a poorly design technology i don't know what is.

      Next up: JavaScript. Poor design? I was shocked at how powerful the language is when I finally started digging into it after years of avoidance. Poor imlpementation? Not really - just many different implementations. Of course, this can and has already been worked around with libs that abstract the differences away for you.

      It's so well designed that people felt the need of doing many different implementations AND you need an abstraction layer on top of the language. Impressive.

      HTML? It still is used as a basic markup language, with all the heavy lifting being pushed into the CSS. Now, CSS is nowhere near perfect, but it does function admirably in the scope of AJAX (when not using IE's broken ass implementation).

      "nowhere near perfect, but it does function admirably in the scope of AJAX (when not using IE's broken ass implementation)"

      So how exactly are you making your case here?

      That sounds like marketroid speak, and is about 3/4ths BS. Perforate the abstraction layer? Jesus. And just who is running around writing C++ extensions for web apps? Almost nobody. Takes too damn long, and isn't as safe as running through the VM.

      The OP mentioned it's "possible" to perforate the abstraction layer in the context of a framwork which (according to the article) achieves it's increase in developer productivity by being very specific of a certain type of situation.
      In response you went into a half-insulting rant that really doesn't show any logical or coherent arguments ("sounds like marketroid speak" and "who [...] Almost nobody" are not logical or coherent arguments)

      Now for the real arguments:
      - AJAX is not a framework in any way at all. It is a natural evolution of DHTML (dynamic HTML, thus HTML, CSS and JavaScript) which adds asynchronous retrieving of data so that the displayed information can be asynchronously updated in specific locations (thus not the whole page) without having to use iframes.
      It's intended to solve a well known user interface problem with web-interfaces, which is that to users, (non-AJAX) web-interfaces feel slower and less responsive than GUI (thin/thick client) interfaces.

      However AJAX does not in any way whatsover improve software development productivity - it actually is slower to implement most functionalities (functionality being something an application does for the users, not some piece of programming coolness) in AJAX than it is to implement it as full-page refresh in whatever server-side dynamic page generation language you are using.

      A couple of reasons why software development productivity with AJAX is lower than with "traditional" approaches:
      - Comparative lack of frameworks/libraries that implement common functions in an AJAX compatible way. Meaning developers spend time reinventing the wheel while everybody else just creates new cars.
      - The platform on which AJAX runs (web-browser) is not properly standardized for some of the things which AJAX is heavy on (CSS, JavaScript), this meaning increased testing, increased amounts of "exceptional situations in the code" to "make this work with IE x.y" and increase duplication (with slight differences) of the code to have versions for multiple browsers.
      - JavaScript is a weak-typed language.

    20. Re:Relentlessly applying best practices by bogado · · Score: 1
      Old technologies put together, lots of hype...


      I don't understand why people complain about the hype of combining old technologies, as if it wasn't something new. Usually the new and incredible stuff that get's out is a simple combination of "old technologies". In fact people have to tinker and tinker with new technology to get used to it, when people are used to it and learned their potentials and limitations, that is the point when someone can have a briliant idea and say "well if I fit this and that, maybe the result is bigger then both".

      That is the hype behind AJAX, is a combination of old and tried stuff that when used in conjunction gets you a result that is better (or not?) then the parts. This is a good sign, is a sign that our tools are getting mature and people are confident enouth to use them, sure there will be some AJAX stuff that will suck and be all wrong, but AJAX is new now. People are just now getting the problems of this new way of doing stuff.
      --
      []'s Victor Bogado da Silva Lins

      ^[:wq

    21. Re:Relentlessly applying best practices by Kosgrove · · Score: 1

      One of the most important (and different) concepts behind Rails is that application frameworks (APIs) should come from exising applications. The dudes at 37 Signals created a framework for their one application, and that framework was so well-designed that it could be used for any general purpose greenfield (i.e. completely new development) web/DB application.

    22. Re:Relentlessly applying best practices by I+Like+Pudding · · Score: 1

      I can't believe you post is currently rated as +5 Insightful - it's a knee jerk, rant-like, fanboy reaction to the a criticism to your current "this is so cool" hype word du jour.

      I'm sorry, could you repeat that? Your knee was jerking too much for me to concentrate.

      If having to test on every browser (not to mention browser versions) is not a mark of a poorly design technology i don't know what is.

      If not testing every target platform you intend to deploy to is not a mark of poor QA methodology, I don't know what is. Say you wrote an app in C that builds clean on Redhat. Do you automatically claim compatibility with all Linux distros? No, because that is a trivialization of the complex technology you are buidling upon. Browsers are complex technology.

      It's so well designed that people felt the need of doing many different implementations AND you need an abstraction layer on top of the language. Impressive.

      Way to fly that argument right into the side of a mountain. People didn't "feel the need", they fucking have to for each browser they make. Then you make out like an abstraction layer is some sort of furthur insult when it is, instead, the logical reaction to their being multiple somewhat-incompatible implementations. On top of all that, the incompatibilities have nothing to do with the design of the language itself. That's all implementation-specific.

      "nowhere near perfect, but it does function admirably in the scope of AJAX (when not using IE's broken ass implementation)"

      So how exactly are you making your case here?


      Logically. IE CSS is a shoddy implementation, and the vast majority of users are running it. Can you blame AJAX for being compatible with the browser 90% of the web uses? Out here in the real world, you have to use what is available to you.

      The OP mentioned it's "possible" to perforate the abstraction layer in the context of a framwork which (according to the article) achieves it's increase in developer productivity by being very specific of a certain type of situation.

      If he had told me that in person I'd immediately set his ignore bit. OF COURSE IT IS POSSIBLE TO IGNORE ABSTRACTIONS. His statement was a tautology - no information content whatsoever. The question is never "can I ignore them?", it is "should I?".

      In response you went into a half-insulting rant that really doesn't show any logical or coherent arguments ("sounds like marketroid speak" and "who [...] Almost nobody" are not logical or coherent arguments)

      The OP's blurb I was replying to was barely coherent. Bullshit spoken, bullshit called. I actually thought I credited the OP too much by providing any sort of explantion whatsoever - it should have been obvious to anyone reading.

      Now for the real arguments:
      - AJAX is not a framework


      Thank you, we all knew this

      However AJAX does not in any way whatsover improve software development productivity - it actually is slower to implement most functionalities (functionality being something an application does for the users, not some piece of programming coolness) in AJAX than it is to implement it as full-page refresh in whatever server-side dynamic page generation language you are using.

      Thank you, we all knew this, and nobody was debating it. Why are you talking about it? AJAX offers additional functionality and polish at the expense of being more difficult to write. Everyone knows this. Additional functionality increases complexity and development time. This is SO. FUCKING. OBVIOUS.

      A couple of reasons why software development productivity with AJAX is lower than with "traditional" approaches:

      Again, why are you talking about this?

      - Comparative lack of frameworks/libraries that implement common functions in an AJAX compatible way. Meaning developers spend time reinventing the wheel while everybody else just creates new cars.

      Compared to what? What common functions? Can you be le

    23. Re:Relentlessly applying best practices by I+Like+Pudding · · Score: 1

      Testing in multiple browsers will only show you that's it's broken. Fixing pages so that they look right is hard, and sometime impossible.

      Nothing about that is AJAX-specific, and unfixable layout problems can always be worked around. This is a basic reality of the web. Using it to level pot shots at technology X simply doesn't work because it also affects technologies A through W.

      Powerful, yes. Well designed, no. (Of course, this is a subjective judgement, and javascript does what it does a lot better than the alternatives. But there is still a lot it does badly, or shouldn't do at all.)

      As far as embedded scripting languages go, I consider it damned amazing. We could have gotten something like TCL instead *cringe* ...and this makes it a bad choice for AJAX. If your only return type is marked up documents then you end up having to do funky stuff some of the time.

      I don't need a fucking CORBA connection to the sever. Marked up documents are fine. There is this "interweb" thing that uses them all the time!

      This is true to an extent. Rails makes it really easy to write most of your application, which leads to minimalism in your code.

      Minimalism is not how many lines of code you wrote. Minimalism is how many features you left out.

      It's not that slow.

      No, it's really, really slow.

      It should be quick enough for a lot of web apps. I find that any slowness is due to my bad coding rather than ruby's speed in the majority of cases. (Although this might say more about my coding that it does about ruby ;)

      It's definitely fast enough to do web work with, and it has good caching support which can make up for slow page rendering. Regardless, I think the development time/performance tradeoff is worth it. Ruby and Rails are just joyous to work in.

      No it doesn't. Rails providers helpers for AJAX and javascript, but it does not utilize them. People writing rails apps might utilise them, and the fact that rails helps you out is a Good Thing. It would be wrong, though, to suggest that rails somehow depends upon them.

      Utilize != use. Read the usage note in this definition. No dependency was suggested.

      Never get into a semantic war with me - I will end you :)

      I think the grandparent poster is right -- comparing AJAX and rails is misleading. Rails is much better thought out and designed; AJAX is more of a cobbled together pragmatic solution.

      The GP was the one who made the comparison (unless we are talking about a different post?). Really, AJAX is only a methodology, so the comparison is even more wrong.

      The real beauty of rails is that it makes it easy to write applications properly, and discourages you from reinventing the wheel badly.

      Agreement

    24. Re:Relentlessly applying best practices by jfmiller · · Score: 1

      I'm sure that I will not be the first or last to comment on this...

      It has a very poor design for long-term maintenance and growth of applications.

      The ActiveRecord pattern is of limited use, especially as implemented in Rails. Your code is not isolated from major changes in the schema, and the dynamic nature of Ruby means that the consequences of such changes can't be tracked by compilation or refactoring tools; especially as the model classes don't even exist as code.


      I for once can write from exprence. Rails sufferes from poor documentation. It is very easy to learn to do the basics -- basics that in something like JAVA or PHP would require moderate to advanced skill. When one needs to go beyond what any script kiddie can do, you enter a wilderness not easily seen through.

      On the other hand this does not mean that the framework can't handle these things. Indeed schema changes are much more convient the in other languages because you can maintain a standard and backward compatible interface for the rest of the MCV fraimework. Once you understand how ActiveRecord::Base works you can make all the changes you want to the schema and simply write code in the appropriate model to make the changes transparent. Where beginers get hung up is assuming that all those little stub classes in app/models are just there to look nice, and rely on ActiveRecord::Base to do all the hard work. My personal opinion here, but I thing that letting the controllers mess with the actuall data in the models is poor design. I write intelegent models with useful functions to play with the data they control in an abstract way and try to aviod too much use of the AR::B implied functionality because as you sait it will change with the schema.

      having writen all this I will now check out Kodo and Xcalia. My suspision is that RoR is not after their niche. If you are really interested in what rails does better than, download Slashcode and think about maintaining it! (appologies to CmdrTaco)

      JFMILLER

      --
      Strive to make your client happy, not necessarly give them what they ask for
    25. Re:Relentlessly applying best practices by Decaff · · Score: 1

      Once you understand how ActiveRecord::Base works you can make all the changes you want to the schema and simply write code in the appropriate model to make the changes transparent.

      The fact that you have to do this is an indication of poor design.

      Where beginers get hung up is assuming that all those little stub classes in app/models are just there to look nice, and rely on ActiveRecord::Base to do all the hard work. My personal opinion here, but I thing that letting the controllers mess with the actuall data in the models is poor design.

      You are missing the point. The point is that controllers and views are always dependent on the structure of the model, and unless you rely on nothing but scaffolding, this leads to fragile code. The model messes with the code in the controllers and views. The bad thing about the Rails design is that there is no isolation prevening the model from doing this. There is no set 'mapping' between model and schema, as the model is the schema.

      Other, more mature, systems isolate the object model from the database schema, allowing changes to be made safely in either one.

    26. Re:Relentlessly applying best practices by jfmiller · · Score: 1

      There is no set 'mapping' between model and schema, as the model is the schema.

      As oposed to JDO where the the model defines the schema? Actually the model classes generate that way but there is no reason to keep them that way. Models can be as close to or far from the data as you care to write them. I prefer to write mine in fairly abstract ways, but the default for lack of anything better is to tie the two tightly together.

      The point is that controllers and views are always dependent on the structure of the model, and unless you rely on nothing but scaffolding, this leads to fragile code. The model messes with the code in the controllers and views.

      This is incorrect. The scaffold makes it look like this because it is quick. However, ActionPack is a client of your models, and you can make that relationship as fragile or robust as you wish. The model does not "mess" with the code in the controllers or views. They are in a very strict client server relationship.

      Other, more mature, systems isolate the object model from the database schema, allowing changes to be made safely in either one.

      Rails can do this as well, just not with the generated code. ActionPack can work with any underlying data model. It is not necessary to use soley the classes derived from ActiveRecord::Base. However Rails is in the buisness of putting database applications on the web quickly and easily. It does this better then perl,python and most espicailly PHP. It does it better then Java for the 80% of the web that really just needs to put dynamic data out over the web. It may be a better solution for the other 20% if a clean purpose build system with a single language paradyme and rapid startup are better then a complex system of odd libraries and expensive propriatary tool.

      JFMILLER

      --
      Strive to make your client happy, not necessarly give them what they ask for
    27. Re:Relentlessly applying best practices by HaggiZ · · Score: 1

      I'm curious to know a bit more, purely because we are trying to re-invent the wheel where I currently work with a similar system that will across our different development environments (.Net, PHP, Java) in a unified way. Upon first usage, Rails appeared to have it nailed for me so much of our emulation has been holding that as a benchmark... but if there are better options I'd love to be looking closer at them. The most simple introduction to JDO I found was here:

      http://www.onjava.com/pub/a/onjava/2002/02/06/jdo1 .html

      So with the person class I define in the class all of available attributes, a getter and setter for each, and a constructor.

      On rails in a production environment it would be:

      class Person
      end


      and the first time the model is called its structure is defined by ruby/rails and cached. Now if you wish to define (or redefine) aspects of the model, you are free to do so. I can replace the automagically generated accessors with whatever I feel like. I can also redefine field mappings and all manner of other things. So from the example given by O'Reilly I can't immediately see the benefit JDO provides in terms of development, I can come to the exact same point with a comparable amount of code in Ruby or I can short cut it and accept the default behaviour with substantially less. All with no SQL at all.

      Where the difference may well exist is in the SQL generated in the back end, and I suspect this is where the original developers/engineers of each solution had a difference in opinion. I'm more accustomed to seperating the SQL logic into views and stored procedures from the outset to improve performance and provide means of controlling how everyone accesses the data. It means much playing around with SQL pre-deployment to improve queries and indexes on tables. Rails has taken the view that theoretical performance issues may never occur and time spent addressing them could well be time wasted, or even worse that your theoretical issues are wrong and bottlenecks occur in other parts of the system. It's this view which means that "high-performance SQL" can not be "automatically generated". The system can't intuitively know the best way to index a table or order data until real world usage occurs, and so that is left as an exercise to the reader. If/when it becomes an issue then it's time to incrementally start over-writing the default options in the areas that need to be addressed. I'd take this approach as under engineering at the outset and then engineering where required later. While I haven't had to deploy a site under serious load yet, I have to say that that it has definitely had it's benefits. And I'd back myself to write more appropriate and beter performing SQL (and indexes) for a given situation than a tool that attempts to do it automatically... so it's an approach that seems more sensible to me.

      So I accept that the O'Reilly example was fairly basic, but if the only difference is in the performance of the SQL generated by the two frameworks then personally I think the rails approach makes more sense as good performing queries aren't solely dependent on the way you write a select statement.

    28. Re:Relentlessly applying best practices by Decaff · · Score: 1

      As oposed to JDO where the the model defines the schema?

      No, it doesn't. You can work either way, or in a combined 'meet in the middle' approach. JDO does not specify this. The benefit of JDO is that there can be an explicit mapping that protects code.

      but the default for lack of anything better is to tie the two tightly together.

      Exactly.

      This is incorrect. The scaffold makes it look like this because it is quick. However, ActionPack is a client of your models, and you can make that relationship as fragile or robust as you wish. The model does not "mess" with the code in the controllers or views. They are in a very strict client server relationship.

      You are missing the point; I am not talking about scaffolding. I am talking about what happens when you abandon scaffolding - you then explicitly state field names in your own code. If the schema changes, the model classes change, and you code can break.

      Even if you put in some isolation, the dynamic nature of Ruby means that you can't use tools or compilation to locate all places where field names are used in code.

      Rails can do this as well, just not with the generated code. ActionPack can work with any underlying data model. It is not necessary to use soley the classes derived from ActiveRecord::Base.

      You are missing the point again. I am talking about RoR 'as shipped'. Whenever I criticise it, I always get the response 'well, you can always change things!'.

      RoR as sh

      It does it better then Java for the 80% of the web that really just needs to put dynamic data out over the web.

      Sorry, but this is nonsense. There is a niche that needs dynamic production and does not care too much about performance or internationalisation or scalability. But it is a niche.

      It may be a better solution for the other 20% if a clean purpose build system with a single language paradyme and rapid startup are better then a complex system of odd libraries and expensive propriatary tool.

      I think this shows a fundamental lack of understanding of how most Java developers with - with their modern free tools (like Eclipse) and their modern libraries with fast start-up (like Spring and Hibernate). Trashing Java because of the way it was in the last millenium is no way to defend RoR.

    29. Re:Relentlessly applying best practices by Decaff · · Score: 1

      So from the example given by O'Reilly I can't immediately see the benefit JDO provides in terms of development, I can come to the exact same point with a comparable amount of code in Ruby or I can short cut it and accept the default behaviour with substantially less. All with no SQL at all.

      Actually, you do need SQL. You need SQL to define your schema. You are putting exactly the same amount of effort into defining your data model in the database as you would put into defining your data model as Java classes. But, by defining it in the database you are losing a huge amount of flexibility and portability - it is a huge step backwards in terms of software design.

      With the JDO approach, you can freely use inheritance and freely define whatever object relationships you like. And you aren't limited to persisting to relational databases. And you don't need to use any SQL.

      Rails has taken the view that theoretical performance issues may never occur and time spent addressing them could well be time wasted, or even worse that your theoretical issues are wrong and bottlenecks occur in other parts of the system. It's this view which means that "high-performance SQL" can not be "automatically generated". The system can't intuitively know the best way to index a table or order data until real world usage occurs, and so that is left as an exercise to the reader.

      I fundamentally disagree. I think Rails takes this view because optimisation of querying is extremely hard to do. The system can know the best way to index a table and order data automatically. This is proven by the high-performance of many commercial JDO systems, which generate SQL of equivalent quality to hand-optimised systems. Of course if you want to have to develop hand-optimised SQL yourself, fine, but I thought a framework like Rails should improve productivity?

      If/when it becomes an issue then it's time to incrementally start over-writing the default options in the areas that need to be addressed.

      Which is a complete waste of time. Why not use a system that already does this for you? As soon as you start to do this, you lose portability.

    30. Re:Relentlessly applying best practices by code4life · · Score: 1

      If having to test on every browser (not to mention browser versions) is not a mark of a poorly design technology i don't know what is.

      I work in a project where testing on every browser platform is SOP. Only an idiot would say it's poorly design technology to not do that. Have you ever written web applications that actually have a front-end that is accessed by users with many different types of browsers? If you have, how can you actually say (with a straight face) that you don't test on those different browser platforms?

      Numbskull.

      It's not the dumbass project managers that get me upset (I've learned to deal with that)... it's the "enemy within", namely dumbass "developers" who like to foment opinions before they have time to get their brains in gear first...

    31. Re:Relentlessly applying best practices by jcinnamond · · Score: 1


      Testing in multiple browsers will only show you that's it's broken. Fixing pages so that they look right is hard, and sometime impossible.

      Nothing about that is AJAX-specific,


      Indeed not, but I said this in reply to your comment:


      Solution: test in multiple browsers. WOW, THAT WAS HARD.


      Testing in multiple browsers is not a solution, although it will form part of any solution. But you are right: the problem is as hard for non-AJAX applications as it is for AJAX ones.


      I don't need a fucking CORBA connection to the sever.


      Good. I'm happy for you ;) Sometimes I have wanted more than just a marked up document back from the server. For example, changing the currency changes the price of many basket items -- in many different places -- but I don't want my AJAX call to return the entire basket display again. (I know it can be worked around, but the point remains that HTML documents (or even fragments) aren't always what I want back from the server, even if they're just fine for you).


      Ruby and Rails are just joyous to work in.


      You know, I'm not convinced that we disagree really, but pointless arguing is fun :-)


      Utilize != use. Read the usage note in this definition. No dependency was suggested.


      So how exactly does rails "put to use, especially to find a profitable or practical use" AJAX? Rails does not put anything to use. It's a web application framework. You can install rails and it does not put AJAX (or javascript, or HTML, or XML, or kittens, etc.) to use. You can write a web application and it does not put AJAX to use. And so on.

      To say that "rails utilizes AJAX" is just plain wrong. You probably meant that rails makes it easy for the developer to utilize AJAX. If you didn't then we have a translation of idolect problem, which conveniently brings us on to:


      Never get into a semantic war with me - I will end you :)


      Cool. Always wondered what the end was like ;) You wanna start with Quine's theories of the indeterminacy of translation (frequently extended to include translation between idolects)? Or his theory that an extensional account of meaning is impossible? Or Tarski's theory that a study of semantics in natural languages is impossible? Or how about Davidson's assertion that substitutional theories of semantics are always subject to Taski's objections? I guess it doesn't really matter what you start with as I've got pretty good grounds for suggesting that semantic wars are impossible. Yay for (semantic) world peace.

      'Tis ironic really, because you threaten semantic war over the utilization of "utilize" with a non-intentional referring entity (rails), which is impossible by definiton. Cute.


      The GP was the one who made the comparison


      I guess GP is indexical then :-)

      My original GP was replying to a comparison between AJAX and Rails, and showing why it was flawed. Your's wasn't. ;-)

      (Really oughta go do some work now)
    32. Re:Relentlessly applying best practices by I+Like+Pudding · · Score: 1

      multiple browser testing confusion

      I should have dismissed this as not being pertinent to AJAX immediately in my original post. Didn't mean it as a slight against you, I was just trying to cull a useless subthread of my own making.

      Sometimes I have wanted more than just a marked up document back from the server. For example, changing the currency changes the price of many basket items -- in many different places -- but I don't want my AJAX call to return the entire basket display again. (I know it can be worked around, but the point remains that HTML documents (or even fragments) aren't always what I want back from the server, even if they're just fine for you).

      Return XML with the data points that need updating, then, and have the javascript update those values. I was already doing this with Flash 5's XMLSocket back in 2002 (possibly earlier). Less update latency, too, because XMLSocket can be server pushed.

      So how exactly does rails "put to use, especially to find a profitable or practical use" AJAX? Rails does not put anything to use. It's a web application framework. You can install rails and it does not put AJAX (or javascript, or HTML, or XML, or kittens, etc.) to use. You can write a web application and it does not put AJAX to use. And so on.

      To say that "rails utilizes AJAX" is just plain wrong. You probably meant that rails makes it easy for the developer to utilize AJAX.


      Your definition is very shortsighted. How does a developer utilize Ajax? Through code. Where is the Ajax implementation? In Rails. So, the developer is both using and utilzing Ajax via the Rails implementation. Frameworks are middle tiers - they use and are used, utilize and are utilized. Rails puts AJAX, HTML, and XML to use on behalf of the programmer. The "on behalf of the programmer" is redundant in that sentence because we're talking about a framework. It could also be argued that simply making a thing available in a framework causes the the thing to be utilized by said framework since encapsulating technologies in a set architecture for developer consumption is what frameworks do.

      You wanna start with Quine's theories of the indeterminacy of translation (frequently extended to include translation between idolects)? Or his theory that an extensional account of meaning is impossible? Or Tarski's theory that a study of semantics in natural languages is impossible? Or how about Davidson's assertion that substitutional theories of semantics are always subject to Taski's objections? I guess it doesn't really matter what you start with as I've got pretty good grounds for suggesting that semantic wars are impossible. Yay for (semantic) world peace.

      Why is it that, every time I call somebody on semantics, I get the board-clearing "well, everyone has their own definition of things" postulate instead of specific argument on why their definition or usage of the object of debate is more correct? I don't know whether I should award you extra points for citing sources or take them away for being needlessly obfuscatory. Some interesting reading in there, at least.

      'Tis ironic really, because you threaten semantic war over the utilization of "utilize" with a non-intentional referring entity (rails), which is impossible by definiton. Cute.

      I'm not sure what you mean by "non-intentional referring entity" here. Possible counter: Rails is a manifestation of intent.

      (Really oughta go do some work now)

      Same :) This conversation has been way, way above usual slashdot standards, hence all the time spent.

    33. Re:Relentlessly applying best practices by emil+wildschwein · · Score: 1


      It has a very poor design for long-term maintenance and growth of applications.



      Exactly. Officially RoR uses the MVC paradigm. But it turns out that the views talk to the controller through a global hash ("params"). Most script kiddies who are enthusiastic about RoR are too young to remember the COMMON blocks in FORTRAN-77. But that's the "design pattern" RoR is really based on. Ridiculous.



      As far as "object-oriented" script languages go, Ruby is particularly abominable. If you want to be OO, you should support encapsulation as a minimum. Ruby does not. The word does not even occur in the glossary at the end of the Pickaxe book. And if that were not enough, you may even assign new values to a Ruby constant. You get a warning though. Come on....



      I know that nowadays it is incredibly unpopular to build solid, reliable apps. Everybody must be "agile" and crank out crap very fast. Ada programmers, for instance, who must write code that never fails (because if their programs crash, the plane you may be sitting in will crash too) are regarded as living fossils by the rapid prototyping maniacs. In other words, the culture of writing solid, bug-free, maintainable software is missing. That's probably one of the reasons why so many apps actually look (and "function") like prototypes.


      Finally: the real problem is the concept of the web application itself. It is incredibly tempting to have a universally accessible thin client. Web frameworks abuse the stateless HTML protocol one way or another to achieve this... but remember, HTML was designed to transmit documents & hyperlinks, not to become a client GUI. I think it is high time we threw out all this crap and design a really new stateful protocol for client-server apps over the Internet.

  11. Django, anyone? by Bazman · · Score: 1, Informative

    Python programmers can get the same kind of experience without learning a new languge with Django. Yes there are differences to RoR but the productivity gains are there. Django gives you database/object linkage, templates, views and all that, and a free and very very usable database interface generated from your model spec.

      Oh, of course there's a big backlash against web frameworks these days isn't there?

    1. Re:Django, anyone? by Anonymous Coward · · Score: 0

      Yeah, although python seems like a better language, it smells too much like amway. Like in everything you do you own 50% to Guido van Rossum. Some people may be excited with this but real developers don't like this cultism. Ruby is a framework by developers for developers.

  12. Re:Rails zealots aren't hammers, they're just tool by sbrown123 · · Score: 3, Interesting

    I tried Rails for a bit. Found it nice. I found the language Ruby more interesting than the Rails framework. Rails code I looked at looked very much like JSP/ASP/PHP gone bad. All sorts of code in HTML land. Then their was the compilation oddities.

    I still believe that Java and PHP are better though. They also perform a hell of a lot faster and scale much better. For example, a friend was creating a site with Rails and wanted to put in integrated search. Several people attempted creating something like Apache's Lucene in Ruby but found that the Ruby's poor performance made the search incredible slow (you could time out before it finished getting your search results).

    What I would think would be really cool is a Lua plugin for Apache. That would be sweet.

  13. Conservative, not liberal. by Anonymous Coward · · Score: 1, Insightful

    Actually, it can be said that the MIT license is in fact a very conservative license. It truly harkens back to the days of the Founding Fathers, when freedom was the utmost concern.

    It places very minimal restrictions upon users, while promoting free use of the software. I must repeat, with the MIT license, the emphasis is placed on freedom and liberty. It avoids the corporate shenaniganery we have come to associate with corporate software (such as Java, or .NET), instead letting people focus on developing software.

    You don't need to be a lawyer to understand its terms. They're written so eloquently and comprehensibly that it is nearly impossible to not understand its terms.

    In short, the MIT license is all about essential freedom, the kind America was initially built upon.

    1. Re:Conservative, not liberal. by Ratatoo · · Score: 1, Funny

      "Conservative, not liberal." "...I must repeat, with the MIT license, the emphasis is placed on freedom and liberty..."

      I'm almost certain that liberty is liberal... Best commentary that refuses to notice that conservative and liberal are not opposite each other - EVAH!!!

      And FYI America was designed by the FF to bring Glory to God - that's science, look it up! How does the MIT license bring teh Glory? Hmmmm? That's right, ZERO Glory inside and you know what that means... Ruby on Rails is a one way ticket to H E (double hockeysticks) and the MIT license is the Devil. The founding fathers would not approve.

      B

    2. Re:Conservative, not liberal. by Cal+Paterson · · Score: 1

      You're both idiots. Wave or burn your flags elsewhere.

      The original posters' use of the word "liberal" really didn't need to be turned into a political soapbox.

    3. Re:Conservative, not liberal. by Anonymous Coward · · Score: 0

      Liberal used to imply liberty. Over the course of the 20th century however, it became to mean "I want the nanny state to breast-feed me and wipe my ass from the cradle to the grave."

    4. Re:Conservative, not liberal. by Discordantus · · Score: 2, Informative

      Insightful? Good grief; someone misunderstands a word, turns it into a politics discussion, and gets modded insightful. Amazing. I especially like how he thinks the founding fathers were conservative. Haven't heard one like *that* in a while.

      First point: "liberal" has more meanings than just "Democrat". It's use in the grandparent post was to refer to the fairly liberal (generous, ample, unlimited (see http://answers.com/liberal) qualities of the MIT license. A conservative license is more like a corporate license; "conservative" means "restrained; cautious, moderate; favoring traditional values; preservative" (see http://answers.com/conservative). A restrained license? doesn't sound very like liberty to me.

      Second point: The founding fathers were conservative? Please describe for me how they were cautious? Or restrained? They certainly didn't favor traditional values; no, they were revolutionaries, who rebelled strongly and bravely against the traditional governments of Kings and Lords. They favored ":maximizing each individuals rights and minimizing the role of the state" in their lives. They "believed in free will", and the fundamental right of a person to have the opportunity to create their own place in history. This, by definition (see http://answers.com/libertarian) makes them libertarian, not conservative or liberal.

      Sorry for the off-topic second point, but not replying to things like that are impossible.

    5. Re:Conservative, not liberal. by flogic42 · · Score: 1

      Actually, it can be said that the MIT license is in fact a very conservative license. It truly harkens back to the days of the Founding Fathers, when freedom was the utmost concern. Back then, they were considered liberals. Even radicals. Very Conservative = monarchy.

      --
      Check out my women's designer clothing store.
    6. Re:Conservative, not liberal. by micheas · · Score: 1
      You don't need to be a lawyer to understand its terms. They're written so eloquently and comprehensibly that it is nearly impossible to not understand its terms.

      Unless of course you are AT&T :-)
    7. Re:Conservative, not liberal. by Anonymous Coward · · Score: 0

      Classifying the founding fathers as libertarians would be a mistake as it takes a modern concept and places it upon ancient peoples. In the time of the American War for Independence liberal and conservative had different meanings than what they have today. Enlightenment era liberalism, harkening mainly from French and Scottish thinkers was all about the natural rights of man and free trade/capitalism. This was the ideaology they followed and the government they created, but it should be noted that they were fairly moderate, like the rest of England. This philosophy today most closely resembles libertarian and paleo-conservative schools of thought.

      The modern neo-conservative most closely resembles the conservatives of the Enlightenment era with its support for limited/no social mobility (coorporations), a ruling class (today - CEOs, times gone by - Nobles), and use of religion as a tool for ruling the masses.

      The modern term liberal is most closely related to the ideas of social liberalism which was the synthesis of Socialism/Communism and Enlightenment Liberalism. Though other idealologies are all too frequently lumped into it, like pro-choice or environmentalism, making it indistinguishable from the more general term leftist.

      America's assinine insistance on a two-party system and our sensationalist media (particularly Faux News) is largely responsible for the corruption of these words.

  14. porn. by Cheapy · · Score: 1

    Porn, and the consequences thereof, is the 'secret sauce' of Ruby on Rails.

    Those crazy open source programmers.

    --
    Would you kindly mod me +1 insightful?
  15. i thought Ruby on Rails by zwad · · Score: 1, Funny

    I thought Ruby on Rails sounded cool, until I saw that it automatically pluralizes person to people. any computer language that does that, in my opinion is just to unpredictable to use.

    1. Re:i thought Ruby on Rails by $1uck · · Score: 1

      Wha? seriously. I've never used Ruby and have no clue what you're talking about, care to expand? or someone with more Ruby experience care to clarify?

    2. Re:i thought Ruby on Rails by Krimszon · · Score: 3, Informative

      To enable some of the RAD Ruby will infer much information from simple syntax and naming schemes. So if you start a class naming it Person, Ruby will look at a table called People to try to figure out the different fields/properties for that class. That's why it comes with some knowledge about plurals built-in.

      It's probably not that disturbing if you are used to it, and it is exactly what makes Ruby so fast for development. It's convention over configuration. In a different toolset, you might have to make a mapping from class to table using XML for instance.

    3. Re:i thought Ruby on Rails by $1uck · · Score: 1

      Interesting... is all of that stuff well documented? I find overly-intuitive programs (MS-word in particular) that think they know what you want extremely annoying.

    4. Re:i thought Ruby on Rails by BorgCopyeditor · · Score: 1

      Yes, it's well documented and can be easily overridden. It just extends the String class to have a 'pluralize' method.

      --
      Shop as usual. And avoid panic buying.
    5. Re:i thought Ruby on Rails by arevos · · Score: 2, Insightful

      So you're not using Rails because it can pluralize "person" correctly? You'd prefer it to pluralize words incorrectly?

      For those unfamiliar with Rails, the it pluralizes the name of an activerecord class to get the name of the associated table. So if your class was named "Person", it would, by default, link it to the database table called "people". This is only default behaviour and, unsurprisingly, this can be overridden. It's a feature of the Rails framework, and nothing to do with Ruby.

    6. Re:i thought Ruby on Rails by RalphSleigh · · Score: 1

      Person -> People -> Peoples

      But where does persons fit in?

      --
      Come as you are, do what you must, be who you will.
    7. Re:i thought Ruby on Rails by BorgCopyeditor · · Score: 1
      class Person < ActiveRecord::Base
      set_table_name "persons"
      end
      --
      Shop as usual. And avoid panic buying.
    8. Re:i thought Ruby on Rails by Anonymous Coward · · Score: 0

      Forget Persons!

      What about Sheeps?

    9. Re:i thought Ruby on Rails by Anonymous Coward · · Score: 0
      Forget Persons! What about Sheeps?
      Don't count, they've already switched to RoR (until the next big thing comes along).
    10. Re:i thought Ruby on Rails by James+Kilton · · Score: 2, Informative

      Wow, frankly I'm glad people like you aren't joining the Ruby community. If you even spent 1 minute looking through the Rails code, you would have found the Inflector class that does this "magic". Ruby itself doesn't do that! and you're either naive, ignorant, or both to think that it would.

    11. Re:i thought Ruby on Rails by misleb · · Score: 3, Funny

      Yeah, next thing you know it will try to pluralize "dog" as "dogs" or something crazy and unpredictable like that!

      -matthew

      --
      "THERE IS NO JUSTICE, THERE IS ONLY ME." -Death
    12. Re:i thought Ruby on Rails by misleb · · Score: 1

      I also find "overly intuitive" things in programs like MS Word very annoying and I go out of my way to disable such "features." ON the other hand, i've found the intuitivness of RoR to be highly appropriate and predictable. When I was starting with Ruby/Rails, I was amazed at how many features were just obvious. If I wanted to do something new, I was often able to guess how it was done without ever needing to reference documentation. That is what being intuitive is about. Microsoft seems to think "intuitive" means throwing up a dialog box (or that goddamned Clippy!) telling the user what to do.

      -matthew

      --
      "THERE IS NO JUSTICE, THERE IS ONLY ME." -Death
    13. Re:i thought Ruby on Rails by baadger · · Score: 2, Insightful

      It's not a particuarly useful feature when you have a complex class and still want normalised database schema, considering when I last looked, Rails didn't support Class Table Inheritance very well. Instant turn off.

    14. Re:i thought Ruby on Rails by Anonymous Coward · · Score: 0

      The point is that the software should not be doing any pluralization. Change the name of tables to make it look better in english instead of doing what the programmer specifies is just a stupid idea.

    15. Re:i thought Ruby on Rails by Anonymous Coward · · Score: 0

      You know that you can turn it off with one line, right?

    16. Re:i thought Ruby on Rails by arevos · · Score: 1

      Sure, Ruby doesn't handle complex database structures well, but that isn't a problem with the pluralization functions ;)

    17. Re:i thought Ruby on Rails by misleb · · Score: 1

      It ia matter of sensible defaults. You're free to override the table name however you wish, but having a sensible default such as naming a table the plural version of the model name makes sense. The Person model has objects in the People table. That makes sense. It is little stuff like that which makes Rails a joy to program with. You spend less time worrying about trivial configuration and framework details and more time making your application do useful stuff.

      -matthew

      --
      "THERE IS NO JUSTICE, THERE IS ONLY ME." -Death
    18. Re:i thought Ruby on Rails by Anonymous Coward · · Score: 0

      How am I supposed to use this 'handy' feature in a foreign languages? English people aren't the only ones that can program.

    19. Re:i thought Ruby on Rails by Anonymous Coward · · Score: 0

      you are... exactly wrong wrt rails. if rails doesn't have db naming conventions, how can it produce the crud capability automagically?

      it can't.

      i suspect that...

      SELECT person FROM people

      sounds like crap to you, right? most folks will think it sounds just about right... which is what ruby and rails aspire to do... produce intuitive code that sounds just about right.

      welcome to "convention over configuration."

    20. Re:i thought Ruby on Rails by Anonymous Coward · · Score: 0

      To enable some of the RAD Ruby will infer much information from simple syntax and naming schemes. So if you start a class naming it Person, Ruby will look at a table called People

      actually, it will look for a table named people - notice the lowercase "p".

      i don't mean to be nit picky, but rails is nit picky if you want the auto-magic behavior.

    21. Re:i thought Ruby on Rails by shish · · Score: 1
      Ruby itself doesn't do that! and you're either naive, ignorant, or both to think that it would.

      If naive or ignorant applies to someone who doesn't want to spend hours looking through boilerplate code when checking out a framework, what does that make someone who doesn't read a single line post that they're repling to?

      (i.e. -- even though he said computer language, it was clear he was referring to RoR rather than just R)

      Also, I don't see how it's a troll -- the point is that it *is* unpredictable. "pluralise = X -> Xs" is predictable. So RoR pluralises "person" correctly. What about "sheep"? Or foreign words? Or "fish"? Does it check the table data to see whether you're referring to many of one species of fish, or many fishes of different species? If correct pluralisation only applies some of the time, then it is unpredictable (without looking up the pluralisation table every time); hence his comment was quite right~

      --
      I mod down anyone who says "I will be modded down for this", regardless of the rest of their comment
    22. Re:i thought Ruby on Rails by baadger · · Score: 1

      Who said it was?

    23. Re:i thought Ruby on Rails by shutdown+-p+now · · Score: 1
      Does it still pluralise "octopus" as "octopii" and "virus" as "virii"? 1.0 certainly does, and I haven't seen 1.1.

      All in all, I think automatic pluralisation is one of the worst design decisions in Rails. It is impossible to handle it properly without an exhaustive dictionary (which it doesn't have), and handling some cases incorrectly will do nothing but annoy the programmer. Why they did not just use singular table names is beyond me, but a wild guess would be that it is there just so that you can write things like has_many :people in "plain English". Which looks nice and all, but did not COBOL (and, to a lesser extent, SQL) teach us something about how useless and even harmful such a feature can be?

    24. Re:i thought Ruby on Rails by mdfst13 · · Score: 1

      You implicitly did by replying to a comment about pluralization. As with Ruby, discussion has implicit defaults. You needed to explicitly say, "This has nothing to do with pluralization, but ..." if you didn't want people to respond as if you were talking about pluralization. Or simply picked a different post to which to respond. Preferably one with more appropriate context.

  16. Yes, but can Ruby do this? by Intron · · Score: 1
    perl -we 'print "0 but true" ? 0+"0 but true" : "nope";'
    0
    --
    Intron: the portion of DNA which expresses nothing useful.
    1. Re:Yes, but can Ruby do this? by otomo_1001 · · Score: 2, Informative

      Well with your weird example, here is what I would use (not really because it violates lots of say what you mean rules).

      ruby -e 'puts 0 ? 0 : "not zero"'

      Have to take out the warnings because you are doing something weird. You do know that ONLY false, 1, and nil derive to a failing condition right?

      I like perl too, but your example isn't hard to come up with an equivalent. If you mean ruby can't do as many one liners from the command line, you are wrong there too.

      Anyway I need food.

    2. Re:Yes, but can Ruby do this? by Jerf · · Score: 1

      You're missing the point. The string "0 but true" is literally what it says it is. It's a perl value that evaluates as true, but numerically is 0.

      Ruby shouldn't have an equivalent. No language should, not right there is the base language with no operator overloading or anything. Not even Perl.

      You could probably program a (near) equivalent in Ruby, because I know you could in Python with some evil code. You can also code an object that isn't == to itself, as another example, but that is also evil.

      Basically, it's this evil perl wart; I doubt Intron is claiming this is a Perl feature. (If so, he's evil. :) ) Putting 0 on the left side of your ? wasn't the point at all.

    3. Re:Yes, but can Ruby do this? by chromatic · · Score: 1
      I doubt Intron is claiming this is a Perl feature.

      Of course it's a Perl feature. If you evaluate that string numerically, you get just what it says: 0. If you evaluate that string for truth, you get just what it says: true.

      Perl is an operator-oriented language. People who fail to understand this find themselves continually surprised.

  17. Re:What's the Secret Sauce in Ruby on Rails? by Anonymous Coward · · Score: 0
    Clueless newbies and disruptive marketing.

    QFT
  18. What Java can learn from RoR by tunabomber · · Score: 2, Interesting
    From TFA:
    • Enable hot deploy where it will shorten the development feedback loop or support frameworks that enable hot deploy. This priority should be much higher on the Java side than it is now.

    Amen to that. I think on-the-fly reinterpration of code is the biggest thing that Rails (or just about any other interpreted scripting language) provides that is a severe handicap for Java. I configure tomcat on my dev system to continuously rescan bytecode files for changes, but what is really needed is an easy, standardized way to make minor modifications to classes on production appserver without having to bring the whole thing down. I know some Java appservers support things like this, but I said "easy and standardized" meaning it can be done via an ant task that figures out exactly what classes have been changed, then notifies the appserver of this so that they get reloaded efficiently.

    • Use less XML and more convention. Conventions don't rule out configuration because you can use conventions to specify meaningful defaults and configuration to override convention. Using this approach, as Rails does, you get the best of both worlds: concise code with less repetition without sacrificing flexibility.

    I think the introduction of annotations with Java 1.5 also does a great job of cutting back on the amount of configuration files necessary. In addition, they leverage Java's biggest advantage over competing languages*- typesafety.

    *yes, C# has typesafety as well, but that's basically the same language.

    • Work to incorporate more scripting languages, including BeanShell (see Resources), for exploring Java classes during the debugging process.

    Eclipse's debugger does pretty much all I need, although things do get difficult when AOP or other bytecode modification is being used.

    --

    pi = 3.141592653589793helpimtrappedinauniversefactory71 ...
    1. Re:What Java can learn from RoR by CastrTroy · · Score: 3, Interesting

      That's one of the biggest things going against Java for the casual developer market too. Most shared hosts don't support Java for this very reason. You can't have users bringing down the server every time they need to update their code. This is probably the biggest reason why PHP is still as popular as it is. It's where a lot of developers get their start. I would love to use Java for my web development uses, but I'm not about to spend the money necessary to have web hosting that supports Java. I've also heard that there's some shared hosting companies that support Java, but they restart the server every night in order to accomodate this.

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    2. Re:What Java can learn from RoR by Anonymous Coward · · Score: 0
      What century are you guys in? Jboss takes care of all that, it's way easier to deploy than Rails is.


      I find myself restarting rails much more often. Once you enable any caching, it's the only mechanism for it to actually deal with code changes.


      Jboss, tomcat and resin all deal with deployment fine, I haven't had a problem with it since like tomcat 4.1, years ago.

    3. Re:What Java can learn from RoR by MassacrE · · Score: 1

      Shared dependencies between the application server and app can still really break things - classloaders are the devil. There are also instances where you can register with a global factory that will cause your class to be used across webapps and across deployments. Tomcat sets a flag on the classloader to tell it to break (with ThreadDeath) rather than to continue. This is still a very common problem for apps deployed with log4j - later executions of the app will ask for a method in log4j that hasn't been compiled using some globally registered reference to a previous instance.

      Java also supports compiling classes into native code, but AFAIK the VMs still don't support -removing- this code once you unload a web application. Your previous application instance will sit around in memory, unreachable (except perhaps by one of the previously mentioned classloader/sandboxing problems), until your app server restarts. My apps seem to generally add about 40-60 MB of required memory per deployment, so this limit is normally somewhere around 7-10 redeployments until restarting tomcat is required.

    4. Re:What Java can learn from RoR by killjoe · · Score: 1

      I think you are confusing strong typing with type safety. Ruby and python are type safe, they just don't require you to declare your types ahead of time.

      --
      evil is as evil does
    5. Re:What Java can learn from RoR by Maxmin · · Score: 1

      But what did you expect? Reloading the underlying classes for objects currently in memory is not the responsibility of the VM, it's the developer's.

      Let's say you have an application running, call it verion X, and you recompile and reload class XYZ. Your app has some XYZ objects, instantiated and running in memory, at this time -- and you want to upgrade the code they're based upon. How do you propose to do it? Either you, the developer, have implemented your own reloader for the objects of classes that changed, or you restart the whole application itself.

      And bringing interpreted PHP into a comparison with a compiled language running under a threaded, persistent server environment? Those complex OOP PHP applications sometimes run a huge amount of code each hit and EVERY HIT. I mean, c'mon, that's Java's advantage - the majority of your code stays running, ready to deal with requests much more quickly than a scripted language. By the time you're doing complicated PHP OOP apps, you've strayed into what Java does best - persistent services, object caching, minimizing the execution time needed to handle requests. PHP's still got that interpretation problem - your app has to reread all its class definitions, reinstantiate your security system to validate the next hit; that gets CPU-expensive.

      --
      O lord, bless this thy holy hand grenade, that with it thou mayest blow thine enemies to tiny bits, in thy mercy.
    6. Re:What Java can learn from RoR by Aceticon · · Score: 1

      In most of the recent Java Web-application servers all you have to do to re-deploy the Java code part of your web-application is "touch WEB-INF/web.xml" if you've deployed your web-app as a directory structure or place the newest WAR file in the deploy directory if your application is packaged in a WAR instead.

      If your application is deployed as a directory structure then JSPs are hot deployed - all you have to do is replace the old JSP with the new one and the server will do the rest.

      I think the reason why hosting of Java-based web-apps is rarer and more expensive than, say, PHP, has more to do with the bigger memory footprint of Java apps (especially due to the gazillions of 3rd party libs you need to use if you want to develop any serious application in an acceptable amount of time) and the comparative lack of experience with it within the Unix System Administrator community (Java web-apps have a longer and steeper learning curve than PHP) than with any lack of hot-deployability issues.

    7. Re:What Java can learn from RoR by guitaristx · · Score: 1

      You're closer to right, but still wrong. Strong typing and type safety both relate to the same property of a language. Ruby and Python are dynamically-typed languages, where C/C++ and Java are statically-typed. Static vs. dynamic typing lie on a different axis than strong/weak typing.

      --
      I pity the foo that isn't metasyntactic
    8. Re:What Java can learn from RoR by matfud · · Score: 1

      Shared dependencies are a problem if you don't use classlaoders properly. Classloaders are dificult to use correctly but are very very powerful.

      And VM's CAN unload code that is no longer referenced if you use classloaders correctly. Once the classloader becomes unreachable then all classes it was responsible for loading can be collected. Note that this does not mean they WILL be collected. Collection occurs if GC thinks it needs more space in the perm generation to load more classes.

  19. That or TurboGears. by cduffy · · Score: 4, Insightful

    (Django has been in use on high-volume production websites longer than Rails has existed, incidentally -- something which might be worthwhile when bringing it up in this kind of context).

    After evaluating Rails and Django, my company ended up going with TurboGears for some of our toolage (our main product is a Java Servlet-based application, and that's not changing). The reasons:

    • Rails and Django are very tightly integrated -- whereas with TurboGears the toolkit is loose enough that one can easily pull just one piece out for a project which doesn't need the framework as a whole. Our department does a lot of small and varied projects (many of which aren't webapps but which still could use an XML-based template engine or a simple OR mapper or a simple servlet-like API for handling requests independent of any content generation), so this was important to us.
    • We have more people in-house who know Python than Ruby.
    • TurboGears appears to be under more active development than Django.

    The opposing reasons:

    • Django and Rails have more high-volume production sites using them.
    • The OR mapper used by TurboGears, SQLObject, lacks some functionality and useful design attributes provided by others. This doesn't impact us for our little in-house projects, and is less relevant now that TurboGears 0.9 is adding support for using SQLAlchemy as an alternative to SQLObject.

    Anyhow -- Rails is nifty. Django is nifty. TurboGears is nifty. Quite likely all three of them have a place; I'd just like to urge people not to get so caught up in the hype over Rails that they forego evaluating other options.

    1. Re:That or TurboGears. by ubernostrum · · Score: 1

      TurboGears appears to be under more active development than Django.

      Out of curiosity, what did you use to come up with this statement? As someone who works at the company where Django was developed and thus follows development very closely, I'm frankly astonished by it; we just merged a gigantic development branch about a week ago, for example.

    2. Re:That or TurboGears. by cduffy · · Score: 1

      Out of curiosity, what did you use to come up with this statement?

      Mailing list activity. Not that either list is anything approaching dead -- but the TG list was substantially busier.

    3. Re:That or TurboGears. by Anonymous Coward · · Score: 0
      Rails and Django are very tightly integrated...

      I'm afraid I'm not familiar with Rails, but Django is actually quite loosely coupled. (Loose coupling is in fact one of the primary design goals.) There is nothing stopping you from using (say) SQLObject with Django views and templates, or using Cheetah instead of Django's template system, or both.

      The one downside is that by using a different DB model, you lose Django's very useful Admin interface.

    4. Re:That or TurboGears. by ubernostrum · · Score: 1

      Mailing list activity. Not that either list is anything approaching dead -- but the TG list was substantially busier.

      Odd choice, considering that both projects have public Trac installations which show the rate of commits.
    5. Re:That or TurboGears. by ubernostrum · · Score: 1

      And perhaps because I can't resist a snarky comment, maybe their mailing list is more active because TG is harder to use, or maybe because they've got a lot of catching up to do ;)

  20. My problem Ruby on Rails by bogaboga · · Score: 1
    My problem with this Ruby on Rails paradigm is that I have faled to find a single package that will install on either windows or Linux. On both systems I have encountered dependencies and errors that I have failed to solve.

    Could it be that case that I have not found it yet but it exixts? Point me to the URL.

  21. The secret sauce is ... by Anonymous Coward · · Score: 3, Interesting

    thar RoR is using Ruby, a programming language that:

    a. is fully object-oriented (not a hybrid like c++ or java). For example, you can have "hello".length() or 5.inspect() which means easier debugging and easy extensibility when you can ("can" != "should") add methods to any class at runtime.

    b. supports mixins (flexibility of multiple inheritance without the complexity)

    c. supports blocks and closures (if you've never used a language that supports blocks and closures, then you don't know what you're missing. I've coded professionally for more than a decade using assembly (intel & motorola chips), c, c++, cobol (ugh), delphi, java, python, etc. and when I discovered how to use blocks and closures in Ruby last year, I almost fainted because it makes coding so much more productive)

    d. practical for both one-liners like perl and large/complex applications with a GUI interface

    When I discovered Ruby last year and tried RoR for the first time this month (stayed away due to dislike of hype), it felt like I was previously chopping trees with a plastic spoon all this time instead of using a chainsaw--Ruby succeeds because it takes so many great features from other languages and combines them in a cohesive manner. RoR succeeds because it uses Ruby and provides a framework that encourages good coding (by providing MVC for example).

    But there is a price for all of this. Speed. In order to provide so many productivity features, the performance will never reach that of c, c++, and many other languages. And I don't know when/if a compiler will ever be practical or available (like gcj for java producing huge binaries to print hello world).

    Other drawbacks include poor release management (remember the ruby 1.8.3 fiasco) and poor support for wxWidgets (Ruby has better support for Fox toolkkit, but I use wxWidgets with C++ so this isn't ideal for me).

    Anyway, I hope another new language comes along that'll blow away Ruby and another new web framework comes out that'll blow away RoR.

    Blind loyalty to language/os/software/etc is for idiots who are afraid of change. Be aggressively disloyal to your products and force their developers to improve or fade away.

    1. Re:The secret sauce is ... by Dan+Farina · · Score: 1

      I need not remind anyone that Python supports closures as well. I'm surprised you never made use of things like map or list comprehensions in this way.

    2. Re:The secret sauce is ... by nostriluu · · Score: 1

      Minor nit: You can use "foo".length(); in Java.

      I like Java because of the synergy with IDEs such as Eclipse. I don't use code generation or any other "magic" facilities, I just like the IDE's comprehension of my code and the resulting ability to "work with me," for example when browsing code or refactoring.

    3. Re:The secret sauce is ... by Anonymous Coward · · Score: 0

      (like gcj for java producing huge binaries to print hello world)

      Yes, but I imagine their "save-the-world, make-the-coffee" binaries aren't much larger by comparison.

    4. Re:The secret sauce is ... by Breakfast+Pants · · Score: 1

      "and poor support for wxWidgets (Ruby has better support for Fox toolkkit, but I use wxWidgets", "Blind loyalty to language/os/software/etc is for idiots." Which is it?

      --

      --

      WHO ATE MY BREAKFAST PANTS?
    5. Re:The secret sauce is ... by finkployd · · Score: 1

      Be aggressively disloyal to your products and force their developers to improve or fade away.

      Imagine what the state of IT could be like today if everyone took that approach. Instead each vendor pretty much knows they have a certain amount of people brainwashed/locked in and will never change because change is harder than sitting still.

      Finkployd

    6. Re:The secret sauce is ... by Lodragandraoidh · · Score: 1
      Anyway, I hope another new language comes along that'll blow away Ruby and another new web framework comes out that'll blow away RoR
      ...

      Zope3 is cooking right along. Python blows away Ruby imho - the true measure is how productive it allows you to be. I've been a longtime developer of Perl, C and Java apps - but find Python is better for me mainly due to the ease of use and ease of debugging not possible with other alternatives.

      Down with the curly brace and the dollar sign!
      --

      Lodragan Draoidh
      The more you explain it, the more I don't understand it. - Mark Twain
    7. Re:The secret sauce is ... by Anonymous Coward · · Score: 0

      This one: "Blind loyalty to language/os/software/etc is for idiots."

      I don't use wxWidgets with Ruby but I can see how my sentence can be interpreted as such. I only use wxWidgets on my C++ projects and I just tried to express my annoyance at Ruby having poor support for wxWidets.

      Doesn't matter anyway. I will probably dump wxWidgets this year because they're license distributed with 2.6.0 has a much more relaxed exception (to LGPL) clause for binaries. The new wxWidgets license is a load of confusing mess they refuse to clarify. I'll probably just pay for the QT toolkit and avoid the confusing nightmare of LGPL which even Stallman (the guy who wrote LGPL) says shouldn't be used.

  22. Yes, Ruby's semantics are sweet. by cduffy · · Score: 1

    There are obvious borrowings from Smalltalk, LISP, Python, and Perl. There's a lot to like about Ruby's semantics; I just can't get past the syntax (which, in my opinion, borrowed quite a bit too much from Perl).

    1. Re:Yes, Ruby's semantics are sweet. by BorgCopyeditor · · Score: 1
      borrowed quite a bit too much from Perl

      Maybe it's obvious, but could you say what in Ruby's syntax is borrowed from Perl?

      --
      Shop as usual. And avoid panic buying.
    2. Re:Yes, Ruby's semantics are sweet. by tehshen · · Score: 2

      what in Ruby's syntax is borrowed from Perl?

      $_

      --
      Guy asked me for a quarter for a cup of coffee. So I bit him.
    3. Re:Yes, Ruby's semantics are sweet. by BorgCopyeditor · · Score: 1

      Maybe. But for most of the annoying places where you'd use $_ in Perl, you have Ruby's iterators and blocks. Call "it" something meaningful, call it what you like.

      --
      Shop as usual. And avoid panic buying.
    4. Re:Yes, Ruby's semantics are sweet. by cduffy · · Score: 1

      Could you say what in Ruby's syntax is borrowed from Perl?

      Heavy use of decorators to indicate how variable names should be treated. Regular expressions as part of the core syntax rather than part of the standard library. There are other things as well, but I don't remember them off the top of my head. The first is more important to me, as it relates to readability of code by people who don't know the language.

      And it's a shame, because I really, really like the semantics.

    5. Re:Yes, Ruby's semantics are sweet. by chromatic · · Score: 1
      The first is more important to me, as it relates to readability of code by people who don't know the language.

      Why does that matter?

      Seriously. Who cares if people who don't know the language can't read and understand it immediately? Do you expect them to maintain large, important projects written in the langauge without learning it? (If so, why?)

    6. Re:Yes, Ruby's semantics are sweet. by cduffy · · Score: 1
      Who cares if people who don't know the language can't read and understand it immediately? Do you expect them to maintain large, important projects written in the langauge without learning it?

      I care. I care because I like being able to read 3rd-party code, and consequently I want 3rd parties to be able to read my code. I care because using Python and writing for readability has helped when I'm teaching programming to beginners. I care because those same practices have allowed me to hand off important, mission-critical production code to programming staff with extensive experience in different languages but none at all in Python prior to starting work on the code I handed off -- which is important, because I work at a Java shop where not many staff members have scripting experience. (My most recent handoff of this sort was of a particularly involved piece of code which made use of dynamically generated classes, metaclasses, and dynamic retyping of existing objects; the handoff and training took not more than two hours).

      I like Ruby's semantics -- but so long as I'm not losing the massive productivity improvements that modern scripting languages provide, I care more about having a syntax that makes it easy to write code accessible to folks who don't know the language.

    7. Re:Yes, Ruby's semantics are sweet. by I+Like+Pudding · · Score: 1

      I have neither used nor encountered $_. If it is in there, nobody is using it. Really, very little syntax is borrowed from Perl. The $dollar and @at sigils are used, but only as scoping signifiers (which I find useful, being that self.at and @at are two different things in Ruby). First class regex support is also in there, but I consider that a feature. There's too much syntax in a regex to work nicely without either a bloated interface or first class support - look at preg_replace in PHP. Too ugly to use in a single line.

      Compare
      foreach my $b @{$foo->{monkey}->{bananna_array}} { $b->blahblah }
      to
      foo.monkey.bannanas.each {|b| b.blahblah}

      Perl doesn't get really ugly until you start using references. Ruby stays clean, fresh, and smells of pine.

    8. Re:Yes, Ruby's semantics are sweet. by Anonymous Coward · · Score: 0

      You're argument is valid, but please play fair. You used an extraneous arrow, and your Perl doesn't compile.

      Besides, I think most people would write it as

      $_->blahblah for @{$foo->{monkey}{bananna_array}};

      You could've written that and still made your point about Ruby's superiority in object/reference syntax. As it is, the point you made was that you don't use Perl, or at least that you don't use Perl well.

    9. Re:Yes, Ruby's semantics are sweet. by I+Like+Pudding · · Score: 1

      You're argument is valid, but please play fair. You used an extraneous arrow, and your Perl doesn't compile.

      I forgot a pair of parens, which demonstrates my point even better. As for the "arrow": I always include the extra infix in my own code because I think it makes things a bit more obvious and matches $foo->method->subMethod syntax, making the code slightly easier to scan through.

      Besides, I think most people would write it as

      $_->blahblah for @{$foo->{monkey}{bananna_array}};


      Have you never heard of TIMTOWTDI? I could have also done a

      map {$_->blahblah} @{$foo->{monkey}->{bananna_array}};

      , but I didn't. I don't like your preferred reversed syntax and use the foreach loop I provided instead (with the missing parens supplied, of course).

      You could've written that and still made your point about Ruby's superiority in object/reference syntax. As it is, the point you made was that you don't use Perl, or at least that you don't use Perl well.

      I use it daily in e-commerce. You have no concept of TIMTOWTDI and are posting AC. Who is the one full of shit here?

    10. Re:Yes, Ruby's semantics are sweet. by nuzak · · Score: 1

      This would be more idiomatic:

      $_->blahblah foreach @{$foo->{monkey}{bananas}

      Still pretty ugly. I hate the damn type sigils, perl6 keeps them, and even though I love the hell out of perl's power, I just can't stomach things like @{$foo->bar} anymore.

      What I really like when I just want to map over a list are python's generator comprehensions. Probably doable in ruby, but I've not seen an implementation of generators for ruby that lets you iterate over them with all existing syntax.

      --
      Done with slashdot, done with nerds, getting a life.
  23. Re:My problem Ruby on Rails by jrcamp · · Score: 1

    On Linux you just need to install ruby1.8 then download the gems package from online, install it, then do "gem install --remote rails". After that it's easy to keep things up-to-date and install more Ruby add-ons. I've never had any trouble.

  24. Re:My problem Ruby on Rails by rmm4pi8 · · Score: 1

    Umm, what are you running? Everything installs via apt-get without a hitch on my Debian Sarge servers and similarly with urpmi on my Mandriva 2006 desktop. Do you have a very strange configuration, or a system that doesn't auto-meet dependencies? If you're on Debian or Mandriva feel free to email me and I'll try to help you out.

    --
    U.S. War Crimes blog. Email for free Mandriva support.
  25. Rabid IP Hoarders and their Sauces by nead · · Score: 4, Insightful

    It really is tiresome to see people constantly ask "what's the special sauce" when in many instances it is clearly "nothing".

    Sometimes good people use good methods to build well conceived applications that work precisely as their audience expects they should. Because these well-formed applications do not fail randomly, scale well and are easily supported marketing and business types presume that there absolutely must be something patentable in the mix.

    One of the reasons I loath the term "Web 2.0" is because people presume there is some new wave of innovation occuring in application development when every Slashdot reader know's this isn't true.

    Technologies mature, standards mature and hopefully people mature. The result is better software, not an abundance of new and novel special sauces.

    1. Re:Rabid IP Hoarders and their Sauces by dubl-u · · Score: 1

      One of the reasons I loath the term "Web 2.0" is because people presume there is some new wave of innovation occuring in application development when every Slashdot reader know's this isn't true.

      I disagree utterly. The first big wave of commercial web development generally treated sites as standalone islands, users as information consumers, and browsers as a cross between a magazine page and an IBM 3270 terminal. None of this was bad, and some perfectly nice things were built.

      However, there's been an array of new applications based on three changes in perspective: the interconnection of sites (via APIs or a bit of hackery), treating users as content producers, and seeing the browser as a a smart UI platform. Sure, people did all of those before to some extent or another, but living in the Bay Area, I can assure you it has been an actual paradigm shift here.

  26. Re:Rails zealots aren't hammers, they're just tool by Anonymous Coward · · Score: 0

    Lighttpd embeds lua for use as a front end cache. There's also been a few attempts at a mod_lua for Apache. Lua is cool, one of my favorite languages and I much prefer it to ruby or python. If you haven't already, check out luajit and of course there's nekovm (& mod_neko) that looks like it's ready to deliver on some of parrots promises.

  27. it's just best practices, nothing more by Anonymous Coward · · Score: 0

    Rails just takes the best practices of "Web MVC" and factors them out so you can write code that's mostly YOUR logic instead of the MVC logic.

    Ruby is an awesome language that makes this just a little easier.

    Most web programmers who 1) know what they are doing and 2) are using a language like Ruby would already have their libraries laid out in a similar way. In fact, I'm sure a lot of good developers have their own "Rails-like" framework that they use to give themselves a competitive advantage.

    Ask any seasoned LISP programmer how to write a program and they'll tell you: create a domain-specific language for the problem domain and implement your program in it. That's what Rails basically is.. a domain-specific language for Web MVC. Ruby isn't quite as powerful as LISP, but I think it gives people a taste of what that kind of programming can be like.. just because YOU don't use all that dynamic stuff, doesn't mean it's useless.

    The one weakness in Rails is that the entire community apparently doesn't care about basic data management fundamentals. In fact, based on posts on his blog, I don't think DHH even ever studied the relational model. I don't think Rails and ActiveRecord encourages good database design, and in fact is a small step backwards. I would encourage people who care about this stuff to just ignore the "worst practices" offered by AR if you can.

    For instance, where is the "logical DBMS" in an AR design? According to DHH and others, it's accessed via the AR classes. However, that is a network model, which is obviously not as general as a relational model. Or, where is the "logical model" of your business rules? Well, again, DHH claims it exists soley in the Ruby code, but that's obvious nonsense, it is split between the SQL database and the Ruby code, which is fairly sloppy. I like to see that clearly delineated in one place.

    A relational DB with a Ruby-compatible type system would really blow the doors off Rails but I doubt I'll ever see that. I'd love to see that though! Imagine how Rails could simply derive the associations between entities by studying your relational design, and even derive error messages, forms, etc. Oh well.

  28. Podcast with Author Bruce Tate by muchawi · · Score: 3, Interesting
    SHAMELESS PLUG:

    I interviewed the article's author, Bruce Tate, for the Ruby on Rails Podcast. He's a brilliant thinker and has taken bold steps to embrace Ruby inspite of his fame in the Java community.

    Rails Podcast with Bruce Tate

  29. Ruby doesn't pluralize! by mano_k · · Score: 1

    It is Rails which does the pluralisation, this is not an inbuild Ruby feature!
    Ruby istelf, being japanese, doesn't care about plural! ;-)

  30. Special sauce? by BorgCopyeditor · · Score: 4, Funny
    Farnsworth: Hmm. Let me see that vial, Bender. [He takes it and puts it in a microwave-like machine. A readout prints and he looks at it and gasps.] Good Lord! According to the spectrolizer, Spargle's magic ingredient was ... water. Ordinary water!

    [Everyone gasps.]

    Hermes: No!

    Fry: Ah, so the real gift Spargle gave you was confidence. The confidence to be your best.

    Farnsworth: Yes, ordinary water.... Laced with nothing more than a few spoonfuls of LSD.

    --
    Shop as usual. And avoid panic buying.
    1. Re:Special sauce? by Brown+Eggs · · Score: 1

      Burger Shack Employee: You guys might have wanted to stay away from our special sauce tonight. Me and Pookie, we added a secret ingredient. I'll give you a hint. It's semen.

      Harold: Semen?

      Burger Shack Employee: Animal semen.

  31. Hidden reasons why ROR works so well... by smug_lisp_weenie · · Score: 4, Informative

    1. It's easy to build hash tables in Ruby- At any level of a hierarchical structure like HTML you can have an arbitrary number of child elements or attributes, all identified by a type tag. This happens to map perfectly onto ruby's hash tables, so to create an HTML link you can say:


    link_to :id => 'add user', :class => 'shiny button', :action => 'add_user'

    2. Lack of superfluous syntax It is very elegant how every programming idea in ruby seems to require only a single syntax concept at a single location to put it into practice- For instance, if you need a class member variable, you just create a name starting with "@" (like @firstname) without having to declare the variable in a separate location in the file. This is taken advantage of very cleanly by the ROR system, so that programming web pages has a very "WYSIWYG-ish" feel- Every concept in you web site has a clear, understandable equivalent embodiment in the Ruby code

    3. Dynamically detects missing methods- I don't know exactly how it works, but ruby classes are able to know when a method on an object is called at runtime that doesn't exist- So you can essentially enhance the functions an object supports at runtime... this allows Ruby toolkits, such as Rails, to essentially shoehorn their own custom language ideas into ruby (not quite at the level of Lisp's "defmacro", of course)

    4. It was scalable from day one- Right from the start, ROR was designed to scale- In fact, it was already part of a commercial app before it even existed as a stand-alone product. This means it already overcame the greatest hurdle of any web-development framework from day one- Most Scheme/Lisp frameworks, for instance, still haven't achieved the level of scalabilty that ROR had right from the start.

    5. It has a whiff of that mystical Scandinavian software guru-ism in it that make for seriously powerful software Creating a comprehensive web development system is a messy undertaking- ROR is the product of an obsessive Northern European fanaticism that somehow manages to combine an incredible pragmaticism and also manages to handle all of the many ways that web frameworks fail with the utmost of effectiveness. It isn't brilliant because it makes it easier to do complex things, as other frameworks try to- It's brilliant because it makes things that are already easy so much easier that all the complexity, though still complex, floats to the surface of your code and isn't obscured by the many "easy" parts.

    6. No pre-processor Many of the more advanced web-frameworks, as in JAVA, require pre-processing of HTML templates with embedded JAVA- The dynamicity of Ruby makes this step hidden- Explicit preprocessors are practically and cognitively difficult for programmers to deal with.

    These, I think, are some of the non-obvious reasons that give ROR the edge over other web frameworks.

    1. Re:Hidden reasons why ROR works so well... by Anonymous Coward · · Score: 0
      If they actually designed it to scale, they failed miserably.


      It doesn't. Simply saying it does doesn't make it so. Nor does recommending a database cluster because activerecord makes so damn many extra queries.


      It does scale nicely for your personal web site and it can handle static stuff as well as apache or lighttp does but it doesn't scale anything like j2ee.

    2. Re:Hidden reasons why ROR works so well... by Anonymous Coward · · Score: 0
      3. Dynamically detects missing methods- I don't know exactly how it works, but ruby classes are able to know when a method on an object is called at runtime that doesn't exist- So you can essentially enhance the functions an object supports at runtime... this allows Ruby toolkits, such as Rails, to essentially shoehorn their own custom language ideas into ruby (not quite at the level of Lisp's "defmacro", of course)


      From my rudimentary learning of Ruby, it passes message to object, rather than invoking its method, and when the object can't respond (no method to respond to the message), there is a mechanism to handle the situation, and that can be overriden to do what the object likes.
    3. Re:Hidden reasons why ROR works so well... by Fweeky · · Score: 2, Informative
      If a method doesn't exist, Ruby calls method_missing:
      irb(main):001:0> class Foo
      irb(main):002:1> def method_missing(method, *args)
      irb(main):003:2> puts "Called #{method.inspect}(#{args.inspect})"
      irb(main):004 :2> end
      irb(main):005:1> end
      => nil
      irb(main):006:0> Foo.new.bla(1,2,:moo => 'bla')
      Called :bla([1, 2, {:moo=>"bla"}])
      => nil
    4. Re:Hidden reasons why ROR works so well... by Anonymous Coward · · Score: 0

      I'm not sure any of this is particularly new -- just done well.

      1. It's easy to build hash tables in Ruby

      Same as Perl.

      2. Lack of superfluous syntax

      Certainly a plus, although not all that different from Perl.

      3. Dynamically detects missing methods

      What kind of methods do you truly need to check against at runtime?

      4. It was scalable from day one

      Rails scales no better or worse than any other major framework. They're all designed to scale, otherwise they'd all still be toys.

      6. No pre-processor Many of the more advanced web-frameworks, as in JAVA, require pre-processing of HTML templates with embedded JAVA

      I'm pretty sure that web frameworks that need to separately pre-process the templates are in a very small minority.

    5. Re:Hidden reasons why ROR works so well... by Anonymous Coward · · Score: 0

      That's what I said. :-)

      "Passing message rather than invoking method" is just another way of saying Ruby doesn't have a separate compile time where invocation is statically linked to a particular method - rather, it's all run time and Ruby provides a mechanism to handle cases where invoked method doesn't exist.

    6. Re:Hidden reasons why ROR works so well... by killjoe · · Score: 3, Interesting

      What's great about rails? Well other people have talked about it, basically it encourages good software practices. Test first, DRY, MVC etc.

      What's great about Ruby? Community, community, community. The ruby community seems to be adopting the mantra of DRY (don't repeat yourself). If any project comes along and it shows superiority then the whole community gets behind it and it quickly becomes a de-facto standard. That's what happened with rails even though there were/are competing frameworks. Same thing with Mutt for example.

      Lastly the Ruby community early on were not afraid to take great ideas from the ecosystem. Gems for example is the ruby version of CPAN (the best thing about perl is CPAN). The python guys still haven't figured out why CPAN and gem are important. Ruby community doesn't seem to suffer from the not invented here syndrome.

      --
      evil is as evil does
    7. Re:Hidden reasons why ROR works so well... by Richard+Jones · · Score: 1

      "The python guys still haven't figured out why CPAN and gem are important."

      You're a few years out of day, son.

    8. Re:Hidden reasons why ROR works so well... by ensignyu · · Score: 1

      I find it funny that they spend so much time saying 'don't repeat yourself" :)

      Python knows that CPAN is important, but the current efforts are pretty ugly and lacking. Package management is somewhat of a black art.

    9. Re:Hidden reasons why ROR works so well... by doom · · Score: 1
      Okay, so RoR is "scalable".

      What does that mean? What kind of load can a dynamic site using RoR take before it bogs down?

      The reason I ask is that RoR and all the competing fast-dev web app frameworks (of which there are many, e.g. "Jifty") sound to me like they speed up dev time by crippling the RDMS, and the database is the real bottleneck in a heavily used site...

      So the questions in my mind are how far can you push it before the database bogs down, and two, how easy is it to step around the default design and refactor it into something that really will scale?

      No one pushing Rails (and things like it) seem to want to talk about these aspects...

    10. Re:Hidden reasons why ROR works so well... by killjoe · · Score: 1

      Really. You mean a few years ago you could have typed the equivalent of "gem update" and updated all your libraries? You mean a few years ago you could have typed the equivalent of "gem install rails" and have it fetch all your dependent packages. You mean a few years ago there was a way to search to all the python libraries for a package using the equivalent of "gem search rails"

      I call bullshit. Show me. Heck show me how you can do that today.

      --
      evil is as evil does
    11. Re:Hidden reasons why ROR works so well... by killjoe · · Score: 1

      "Python knows that CPAN is important, but the current efforts are pretty ugly and lacking. Package management is somewhat of a black art."

      It it really? As I type this the following package mangement systems spring immediately into mind.

      Gem, CPAN, apt, yum, emerge, ports, darwinports, pkgsrc and fink. Those are the ones that I typed off the top of my head. I am sure there are a hundred more.

      It's not a black art. There is no reason why anybody can't take one of the existing ones and just port/adapt it to python (or zope, or whatever).

      --
      evil is as evil does
    12. Re:Hidden reasons why ROR works so well... by Richard+Jones · · Score: 1

      easy_install

      Really, do some research...

    13. Re:Hidden reasons why ROR works so well... by ensignyu · · Score: 1

      The relevant ones are Gem and CPAN. The others have pretty much full control over all the packages on your system.

      CPAN breaks if you have non-Perl dependencies, like bindings for libraries. And Python has a *lot* of bindings. On the other hand, key packages like wxPython/wxPerl are usually installed by your distro, which unfortunately fouls up CPAN and Python's easy-setup.

      Furthermore, if you have package A that depends on package X v1.5 and package B that depends on package X v2.0, and the packages are incompatible, you end up with some ugly hacks to make sure they can coexist. It's much better with scripting languages where you don't have binary compat problems, but there's no standard way for a package to say what version it wants to use at runtime -- they're designed so you just say "import X" and it works. Solvable but ugly.

    14. Re:Hidden reasons why ROR works so well... by killjoe · · Score: 1

      "The relevant ones are Gem and CPAN. The others have pretty much full control over all the packages on your system."

      I disagree. In end package management is simply making sure certain set of files exists on your system and a centralized index. Different systems have different features however. For example both gem and darwinports allow you to have multiple versions and variations of packages.

      "CPAN breaks if you have non-Perl dependencies"

      One would expect that given the system has no way of knowing about the external requirement.

      --
      evil is as evil does
    15. Re:Hidden reasons why ROR works so well... by killjoe · · Score: 1

      Bzzzt sorry but you are wrong.

      1) Easy install is not a hooked up to a centralized repository of pyton packages.
      2) easy install does not come with the default python install.
      3) Easy install is not "the official" package managment system of python.
      4) Eggs are a relatively new invenstion in python.

      Come back when easy install is installed by default part of python, there is an official and centralized package repository that is searchable both from the command line and the web, and when it's blessed by Guido.

      Till then take a back seat to languages that have all that.

      --
      evil is as evil does
    16. Re:Hidden reasons why ROR works so well... by Richard+Jones · · Score: 1

      Wow, it's amazing I get any work done. Thankyou for showing me the light!

    17. Re:Hidden reasons why ROR works so well... by killjoe · · Score: 1

      Well that was a nonsensical retort. Of course you get work done, it just takes you longer because you have to hunt down the libraries, hope that they come in an egg, and then run your installer. Good luck updating them too.

      The point is not that you can't get work done with python, it's that it's more work then Ruby.

      --
      evil is as evil does
    18. Re:Hidden reasons why ROR works so well... by Fahrenheit+450 · · Score: 1

      Of course gems is no magic bullet either if developers aren't packaging their libraries for it.

      For example, go looking for a crypto library with gems. gem search -b crypt turns up for results, an implementation of crypt(3), rot13 (did someone really need to create a rot13 gem?), crypt-fog, which is like rot13++, a PRNG, and finally, something that looks like a crypto library, ezcrypto. Although, when one looks at the docs for ezcrypto, he sees that this is just an AES (128) wrapper... whoo!

      Thanks for all the help gems! You really saved me a lot of time there...

      A centralized cupboard does no good if no one is stocking it with treats.

      --
      -30-
    19. Re:Hidden reasons why ROR works so well... by shmert · · Score: 2, Interesting

      I think a lot of the benefits of RoR mentioned in the article can be achieved with a good IDE like IntelliJ.

      I can recompile any changed java classes on the fly (unless changing class structure). No need to recompile and restart the entire application.

      Autocomplete kicks ass. When invoking a method that takes a Foo object, autocomplete can show a list of all methods that return Foo or its subclasses. This is impossible in rails for several reasons. Lack of type-safety means you can pass any object as a parameter. Also, the auto-magic method names in ruby (like find_by_last_name_and_department) make this impossible, since the methods don't really even exist until invoked.

      Immediate feedback about syntax errors: If I misspell a method name, the editor flags it instantly. Contrast to a rails application where you won't see the bug until you invoke the action.

      Compile catches bugs at compile-time instead of runtime. If I refactor a method and it's still used somewhere, the compiler will find it. I suppose writing good tests in your rails app should catch this, if you have 100% test method coverage, but that seems like a pretty steep tradeoff.

      Namespace conflict! This single issue pretty much soured a friend of mine who was trying to learn ruby on rails. He was writing a simple test app for a trouble ticketing system. On the request edit page, he defined a @request global var, which mucked up the @request used by rails. Unclear "missing method" error messages popped up, and it took quite a while to figure out.

      There are some serious benefits to rails as well, the list you have is a good overview of the subtler advantages. I love the way you generate XML in rails, it fits the language so perfectly, because of the variable args, code blocks, and on-the-fly hashtable generation. It's definitely gratifying to see how much you can do with how little code, although in some places (like error checking) I think the concepts may have been overextended a bit. After evaluating my list of gripes with rails, and how it could be fixed, I came right back to what looked pretty much like WebObjects + IntelliJ (except for the hideous URLs in WO apps).

      --
      You drank my drink, you drunk!
    20. Re:Hidden reasons why ROR works so well... by killjoe · · Score: 1

      So you would rather have no centralized package management at all then.

      Great. Keep on with python. That way when you need a crypt package you can search on google, find the one you like, donwload it on to your computer, install it, and then subscribe to the mailing list (if they have one) so that you can know when they make an update.

      That's so much better then nasty gems and the crappy CPAN.

      --
      evil is as evil does
  32. What Controversy? by sabat · · Score: 1

    There's controversy about Rails? Since when? I've never heard anyone say anything bad about it -- but maybe I'm too skewed in what I read. Maybe I'm listening to the programming equivalent of Fox News. =:-O

    --
    I, for one, welcome our new Antichrist overlord.
    1. Re:What Controversy? by misleb · · Score: 1

      Try bringing up Rails in a Java forum.

      -matthew

      --
      "THERE IS NO JUSTICE, THERE IS ONLY ME." -Death
  33. About this series by Anonymous Coward · · Score: 0
    In the Crossing borders series, author Bruce Tate advances the notion that today's Java programmers are well served by learning other approaches and languages


    OMFG! If this "notion" that learning about technology is a Good Thing has to be "advanced", something is seriously messed up at least in the Java[TM] community, but more probably in this whole "profession" of self-appointed Software Engineers.

    Now please excuse me while I quietly cry.
  34. Still no Unicode by shutdown+-p+now · · Score: 4, Informative
    The biggest problem with Ruby - and, by extension, Rails - in my book is almost complete lack of Unicode support. See for yourself:
    Please note that right now Rails basically knows nothing about Unicode and pretends everything is just bytes. It means that validates_length_of for multibyte characters will trigger errors at the wrong places, various kinds of Unicode whitespaces are not going to get trimmed and sometimes Rails will cut right into your characters. Absolute most of Rails internals makes no notion that multibyte text even exists, Rails just delegates all to the Ruby string handling code (which in current Ruby is all single-byte).

    This is being looked at, but in the meantime you use UTF8 encoded strings at your own risk and you can expect (and wil get) bugs and problems.

    It might not look like a big deal to English-speaking people, maybe also for Western Europe (they can usually get away with Latin-1). But the rest of us do need it... that, or going back to multiple charset/encoding hell.

    So, for now, it's Java or Python, and associated frameworks for me. But not RoR.

    1. Re:Still no Unicode by scheme · · Score: 1
      It might not look like a big deal to English-speaking people, maybe also for Western Europe (they can usually get away with Latin-1). But the rest of us do need it... that, or going back to multiple charset/encoding hell.

      That's pretty ironic given that ruby was developed by Japanese developers. I wonder what they did to deal with japanese characters.

      --
      "When you sit with a nice girl for two hours, it seems like two minutes. When you sit on a hot stove for two minutes, it
    2. Re:Still no Unicode by Dom2 · · Score: 4, Interesting
      That's pretty ironic given that ruby was developed by Japanese developers. I wonder what they did to deal with japanese characters.
      There's a well-known dislike of Unicode in Japan. They mostly use other character encoding schemes, such as SJIS. For more information on how to use UTF-8 in Rails so far, see HowToUseUnicodeStrings on the rails wiki.

      -Dom

    3. Re:Still no Unicode by NutscrapeSucks · · Score: 1

      There's a lot of people in Asia who are very anti-Unicode and pro-wierd local encodings. Counter-intuitive to the western developer who uses Unicode for supporting Asian languages. I don't really get it either.

      --
      Whenever I hear the word 'Innovation', I reach for my pistol.
    4. Re:Still no Unicode by misleb · · Score: 1

      This doesn't make much sense to me. Isn't Ruby developed primarily by Japanese speaking people? You'd think unicode support would be right near the top of their list of core features of the language. Or do lists in Japanese go up intead of down? ;-P

      -matthew

      --
      "THERE IS NO JUSTICE, THERE IS ONLY ME." -Death
    5. Re:Still no Unicode by IntergalacticWalrus · · Score: 1

      I completely agree. From day one I started exploring RoR due to all the hype, the first thing that came out of my mind was "Wait, they made this great new Web application framework, but it doesn't default everything to UTF8? Even worse, it assumes character sets don't exist? That's just dumb." Java and .Net don't just force Unicode strings for kicks. They do it because WE NEED TO GET RID OF CHARSET HELL NOW.

    6. Re:Still no Unicode by pilkul · · Score: 1

      As I understand it, it has mainly to do with rivalries between Japan and China dating from WW2. The Unicode consortium decided to fuse the Japanese and Chinese character sets -- a sensible decision, since there is a huge amount of overlap. Sometimes with Unicode, if your fonts aren't properly installed, a few Japanese characters might look Chinese (still readable, just a little strange) and Japanese nationalists go ballistic over this. Seems totally irrational to us, but nationalism brings into play very strong feelings...

    7. Re:Still no Unicode by NutscrapeSucks · · Score: 1

      I've heard that explaination. I've also heard it's a protectionist thing to guard the local software industry. Still seems rather silly to me.

      --
      Whenever I hear the word 'Innovation', I reach for my pistol.
    8. Re:Still no Unicode by Fujisawa+Sensei · · Score: 1

      Bullhockey, its perfectly justified. If the character doesn't display correctly, its wrong. If you disagree perhaps we should start importing out English instructors from India, after there are more English speakers there, than there are in the US.

      --
      If someone is passing you on the right, you are an asshole for driving in the wrong lane.
    9. Re:Still no Unicode by shutdown+-p+now · · Score: 1

      I am aware of the fact (and the link you gave was in fact in my original post) that Unicode is disliked in Japan. But SJIS is a multibyte encoding as well, no? Technically speaking, support for it should not be fundamentally different from support for UTF-8 - at least insofar as functions like String#length understand that character!=byte.

    10. Re:Still no Unicode by pilkul · · Score: 1

      I said if the font isn't properly installed. If your English fonts aren't properly installed, things will look glitchy too. It so happens that some systems ship with Chinese fonts instead of Japanese fonts enabled by default. This kind of bug wouldn't happen if it wasn't for Unicode, but it's still the fault of the system implementation not the core standard.

    11. Re:Still no Unicode by kahei · · Score: 1


      At the risk of plugging my own hopefully interesting page on the subject, I think this is one of the few places left in IT where the Japanese dislike of Unicode is still causing a problem in modern IT.

      --
      Whence? Hence. Whither? Thither.
    12. Re:Still no Unicode by The+Cydonian · · Score: 1

      A lot of people in North Asia, you mean. Out here in South East Asia, and certainly in South Asia, there's really no standards alternative to Unicode (other than ISCII, naturally, but I havent heard of any widely used application that implements it)

    13. Re:Still no Unicode by NutscrapeSucks · · Score: 1

      Interesting ... thanks for posting that!

      --
      Whenever I hear the word 'Innovation', I reach for my pistol.
    14. Re:Still no Unicode by Dom2 · · Score: 1
      Thanks! I knew I'd seen that somewhere!

      -Dom

  35. Re:Rails zealots aren't hammers, they're just tool by rmm4pi8 · · Score: 1

    1) Just like in any language, whether a programmer actually follows the MVC structure is mostly up to the programmer. I mean, I suppose you could specify a templating language which is less powerful in order to more strictly enforce things, but that takes language development time, programmer memory to remember two sets of syntax/conventions, and might be an unhelpful restriction for RAD/prototyping, which Rails is often used for. But rails generates models, controllers, and views, so you can hardly blame Rails for people who put app logic in their views. Or did you just think it was app logic because it was written in Ruby and you are used to single-purpose templating languages?

    2) Well-written Ruby which uses the C database bindings just isn't slow. My web app, Kiko, has been Slashdotted 3 times now, with up to 20,000 log ons an hour on a single processor box with 512mb of RAM -- and not only didn't go down, it never even got slow for our regular users. Erins.de gets millions of hits per day on just a couple of boxes. It has to be set up properly to take that kind of abuse, but it most definitely does. As for search, there's just no reason to implement full-text search in the scripting language. MySQL has full text search, PostgreSQL has tsearch2 (a set of C libraries), and presumably other mature databases have their own solutions. All Ruby/Rails has to do is call the C code and format the results. This is a textbook case of using the right library for the right job--if you're doing image processing in Python, do you write your own image processor or do you call ImageMagick just like you would in Rails? Seems to me that full text search on a database is the same kind of well-defined problem set, and should be treated the same way.

    --
    U.S. War Crimes blog. Email for free Mandriva support.
  36. I think the secret sauce is the marketing by Anonymous Coward · · Score: 0
    37signals and pragmatic programmers are pushing, pushing with blogs, books, podcasts, classes. I'm not aware of any RoR hype that doesn't come from that group or people connected to it.


    The reality is RoR is terribly raw. You want to make a AJAX CRUD or a blog or something, it's one of a handful of technologies (django, seaside, php, zope, are others) that will allow you to do it very quickly.


    If you want to build a real web application, it's terribly lacking. Don't believe me? Who is doing it? For real? Are there 500 RoR apps out there?


    It's slick, I'll give it that but it's far from as complete as a lot of things. It's certainly not enterprise grade. No SOA support. No threading. No cache at the DB tier. You don't need that for your blog but you do if you're doing serious webapps.

  37. Re:My problem Ruby on Rails by rudedog · · Score: 2, Informative

    A reasonably up-to-date version of Rails (1.1.0) is directly installable in Debian testing and unstable; just use "apt-get install rails".

    If you're using Debian stable or prefer to use Rubygems to get the most up-to-date stuff, add this to your sources.list:

    deb http://www.sgtpepper.net/hyspro/deb unstable/
    deb-src http://www.sgtpepper.net/hyspro/deb unstable/

    Then "apt-get install rubygems".

    Then "gem install rails".

    Then set GEM_HOME to "/var/lib/gems/1.8" and add "/var/lib/gems/1.8/bin" to your path.

    Then do "rails my_new_project" and have fun.

  38. The secret sauce is... by Anonymous Coward · · Score: 0

    The secret sauce is ... a super secret Perl 6 / Parrot interface!

  39. Re:Rails zealots aren't hammers, they're just tool by tourslafrance · · Score: 1

    I have started a new web project and looked at RoR. Having done an app with Tapestry/Spring/Hibernate, I was sick of all the work one has to do to bring up a bunch of views in a browser and then persist results. I love RoR and Ruby for all the reasons mentioned in TFA. Note - I don't like the pluralisation default, but one can easily turn it off by setting the following in config/environment.rb:

    # Include your application configuration below
    ActiveRecord::Base.pluralize_table_names = false

    There were two scalability concerns I had about RoR:

    (1) Ruby is interpreted and 'slow' - however, the JRuby team (http://headius.blogspot.com/) is working on running Ruby within a JVM (currently interpreted, but they are starting on a compiler). When they get to 1.0, the compiler won't be as good as Sun's, but it will probably be "good enough"

    (2) RoR uses the Active Record Pattern and Hibernate uses the Data Mapper Pattern (http://www.theserverside.com/tt/articles/article. tss?l=RailsHibernate). The Data Mapper Pattern is almost certainly more efficient when implemented well (as Hibernate does). The coolest thing about Hibernate is that it is much more efficient than I am without a big effort on the persistence side, and I am concerned that Active Record will not be nearly as good. However, what are the odds that someone (or some group of people) will work on implementing a persistence solution within Rails that uses the Data Mapper Pattern? Pretty good, I would say. Once again, it probably won't be as good as Gavin King's work, but it will be "good enough". And if someone else does not do it, maybe I will start the project.

    Given the above and the speed with which one can develop in RoR, the choice was obvious, to go with Ruby and Rails.

  40. Zealotry, or simply inexperience? by Anonymous+Brave+Guy · · Score: 3, Informative

    Reading TFA, I wouldn't use words like zealotry or fanaticism to describe either the article or the attitude of the Java programmers it seems to be aimed at. What I do see, though, is a terribly narrow-minded view of programming, and an obvious lack of broader experience. Let's take a few choice quotes.

    From the About this series box, before we even get to the article itself:

    In the Crossing borders series, author Bruce Tate advances the notion that today's Java programmers are well served by learning other approaches and languages. The programming landscape has changed since Java technology was the obvious best choice for all development projects.

    Surely most of us would agree that any programmer is well-served by familiarity with a variety of languages, programming styles and tools, and by choosing the most appropriate for any given job. Which, despite the absurd claim above, has never been Java in all, or even most, cases.

    From the "Hype and skepticism" section:

    Rails proponents boast of incredible productivity, with some claims of 10 to 1 over Java development. As a Java programmer, your knee-jerk response is to dismiss any wild productivity claims because you've likely heard them before and been disappointed.

    No-one who's looked into a wide range of programming languages (and I don't mean Java, C++, C# and Visual Basic.Net) would find those claims particularly surprising or implausible. The functional programming world has been outclassing workhorse industrial languages like C++, Delphi, Java and co. in productivity by an order of magnitude for a long time, at least for the kind of application that lends itself to a functional style. So-called scripting languages, which cut away much of the boilerplate baggage required by the workhorses, have proven to be a much more efficient tool for many kinds of project as well, often due to relatively simple features like supporting common data structures as first-class entities.

    Moving on to the Rails philosophies, we see things like "Don't Repeat Yourself" being highlighted as "core opinions pervasive within Rails". Surely abstracting common code and data structures into reusable units is a basic principle of sound programming in pretty much any language?

    Then we get to the "niche" for Rails:

    I'd guess that as many as half of the applications built today are database-backed, Web-enabled applications.

    I'd guess that's wildly optimistic, though it's certainly a common conceit among Java programmers IME. Not everything in the programming world is web-enabled, and much of it has no interest in becoming so either. Why would a high-performance scientific application, a CAD/CAM/CAE package, a FPS or the firmware in your washing machine care about database-backing and Web-enabling?

    All-in-all, this seems to be an article aimed at die-hard Java programmers with little experience of the wider programming world. Its arguments support wider exposure to programming and good general programming principles, though it forgets to mention that Ruby on Rails is far from the only way of achieving those ends.

    --
    If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    1. Re:Zealotry, or simply inexperience? by Anonymous Coward · · Score: 0

      Surely abstracting common code and data structures into reusable units is a basic principle of sound programming in pretty much any language?

      Sometimes yes, sometimes no. Simply because two or more pieces of code share similar or identical code does not mean they should be abstracted into some reusable component. You have to step back and ask yourself whether the code is the same because the underlying objects are of the same type and the methods are accomplishing the same thing. In many cases, the answer is yes and the code should be abstracted into a re-usable form. But in situations where the code happens to be similar but the instances of its use are two separate business concerns, it is better left duplicated. Common code can ease the amount of work necessary to make future improvements by allowing you to make changes in one single location rather than many, but it can also complicate your life if you need to make changes to just one area and, because that code is used in multiple instances, your modifications need to account for every usage of the code.

      Good design anticipates changes in the business logic based on effectively modeling the domain. Duplicated code isn't, in and of itself, a bad thing.

      And that's where my beef is with the Rails' claim of 10x productivity. That figure seems to me to be a measure of only initial productivity, not prolonged productivity. Java has a heavy initial development cost, but it really starts to pay dividends 3-10 years down the road when the code you've written is still useful and maintainable. Rails, no matter how easy the initial development, cannot make claims about long-term productivity. We have code in our web app that was originally written for the 1.2 JVM. Because it was effectively modelled and the business logic was separated from the interfaces to it (in our case, originally servlet and database), much of that same code is in use today in our spring-managed web app that has both a SpringMVC front-end and a web services front-end.

  41. It's Forth. by Anonymous Coward · · Score: 1, Funny

    So which "cheap imitation" camp is Forth in then with its dictionary?

    "I put the blame for this squarely on the shoulders of modern computer science degree schemes."

    Guess all those self-educated CS'ers are immune.

    "People graduate thinking languages like Java and C are the state of the art, and then go on to re-invent concepts from the '70s believing that they are novel."

    And yet Prolog is still in the closet.

  42. Re:My problem Ruby on Rails by RegularFry · · Score: 1
    --
    Reality is the ultimate Rorschach.
  43. Re:My problem Ruby on Rails by Anonymous Coward · · Score: 0

    i recommend getting the 2nd edition of agile web development with rails.

    here's how i did it on simply mepis... a debian distribution.

    Ruby On Rails Install

    1.Check to see if Ruby is installed. open shell and type "ruby -v". My result was "ruby 1.8.4", which is the latest version of Ruby.
    2.libyaml-ruby and libzlib-ruby need to be installed on debian (in addition to its base Ruby install). install libzlib-ruby and not libzlib-ruby1.6. After all, you are running 1.8.x.
    3.Go to http://docs.rubygems.org/read/chapter/3 (rubygems is like apt for RoR).
    4.Download rubygems-0.8.11.tgz here: http://rubyforge.org/frs/?group_id=126
    5.right click, extract -> extract here (should extract to its own folder).
    6.navigate to rubygems-0.8.11 diretory, switch to root and run ruby setup.rb.
    7.Update system by typing: gem update -system
    8.add export UBYOPT=rubygems to /etc/profiles
    9.Synaptic irb.
    10.Install PGSQL 8.1
    11.Synaptic postgresql-8.1, libpgsql-ruby1.8 (pgsql adapter) and pgadmin3

    btw, my php programming has improved by reading the agile web dev book. it is good - even if you don't end up going to it as a dev platform. if you are guru status, it won't be as helpful, but you could probably still pick up some good principles.

    good luck.

  44. What is retarded about VB? by raftpeople · · Score: 1

    As a programmer with a couple decades of experience, and having used a wide variety of languages, I don't see why people complain about VB. Can you give me some examples of why you think it's retarded?

    1. Re:What is retarded about VB? by atokata · · Score: 2, Insightful

      You know, I'm not sure that it's really so much the langauge, but the utter crap that people write in it. It's...disappointing....to download what you think might be a cool/useful/whatever program, only to find that it's a barely functional VB nightmare that crashes if your screen resolution is set wrong.

      Of course, it all depends on the programmer, in the same way that, say, carpenters can do both good work and bad. Good just takes so much longer, and is a lot more challenging.

    2. Re:What is retarded about VB? by Nataku564 · · Score: 1

      DLL Hell. This has been alleviated somewhat by VB .Net.

    3. Re:What is retarded about VB? by Anonymous Coward · · Score: 0

      "Where do you want to go today?"

      I agree..
      When regular everyday people have the ability to create applications, you get application created by everyday people.

      You could extend that same analogy to Windows in general. You have a large percentage of everyday people running and maintaining the OS which results in people getting attacked by spyware, viruses, bot and unstable computers. With Linux or any other OS besides Windows XP, there typically seems to be a somewhat higher overall knowledge level of computing by the users and they are not tripped up as easily. The crappy XP users make XP seem even worse then it could be, just like many VB applications.

    4. Re:What is retarded about VB? by Chineseyes · · Score: 0

      DLL Hell has closed its doors and is now reopening as the all new GAC Hell Emporium and Warehouse....

      --
      I think the invisible hand of the market has its middle finger extended

      --A wise old fart named SC0RN
    5. Re:What is retarded about VB? by Nataku564 · · Score: 2, Informative

      Indeed. Despite the touted benefits of .Net, and how it would rid us of all the system dependencies problems had with previous Microsoft technologies. Just a week ago or so I had the pleasure of running into a C# app that operated differently on 2 boxes. It was run from the same clean network directory, same version of the .Net runtime, same OS, all patched, and fetching data from an application server. There was absolutely no reason for it to behave differently, yet it did ...

      People wonder why I like Perl so much ...

    6. Re:What is retarded about VB? by glesga_kiss · · Score: 1

      Are you trolling? ;-) For me, it was the number of syntax gotchas that pissed me off. You'd have to think about variable declaration formats, what's that all about? Plus, IMHO, it's a very ugly language. Don't get me wrong, the conditional structures have a lovely retro charm, but it doesn't cut the mustard now. Using For/Next/Step makes you yearn for "Goto".

    7. Re:What is retarded about VB? by Bastard+of+Subhumani · · Score: 0
      I don't see why people complain about VB. Can you give me some examples of why you think it's retarded?
      First and foremast, the people who use it.
      --
      Only three things are certain; death, taxes, and apocryphal quotations - Ben Franklin.
  45. And that is a completely useless misfeature by Anonymous Coward · · Score: 1, Informative

    There was no need to add that special case because in Perl, "0.0" does the exact same thing as "0 but true". Perl has a lot of such useless special cases - for instance the string "ignore" will not generate a warning in void context.

    But Ruby, unlike Perl, has real booleans. So 0 is true. And "" is true. Thereby avoiding a very common source of Perl bugs. (Really, how many people religiously check defined in Perl? Not enough, else the need for "err" and "//" would have been apparent a long time ago.)

    1. Re:And that is a completely useless misfeature by Anonymous Coward · · Score: 0

      > But Ruby, unlike Perl, has real booleans.

      Perl, unlike ruby, supports unicode.

      How's this related? Whereas ruby has polymorphic scalars and perl requires that you use the proper operators, perl has polymorphic strings, while ruby requires that you use different methods to handle unicode.

      I need to deal with lots of unicode. Ruby doesn't cut the mustard.

      'course python has both, but has no syntax sugar, not even regex literals, and requiring the u'' for unicode strings is just ridiculous when I'd rather have it be the default, and use b'' for byte-strings or whatever.

  46. RoR hype == good product + good marketing. Period. by Qbertino · · Score: 4, Interesting

    RoR is a good OS product that helps people solve problems that really bug them. It doesn't - contrary to lot's of other OSS projects - have a website that looks and works like crap . It's lead developers actually have social skills (and running businesses) and can talk coherently in a way that normal people actually understand them. They are tight with the blogging community and are smart enough not to be arrogant and thus convince even the most fanatic Java people to check out their toy. They started the whole webcast thing and built RoR for an actual real life business project they wanted to do (www.basecamphq.com) before going OSS.

    Technology wise there is not that much new. Zope is still lightyears ahead of everything else (including RoR) but only last year did their website stop looking and acting like a total pile of doo-doo. Yet still Zope.org's Navigation is somewhat '99ish and much more intimidating and overwelming than the friendly and straightforward RoR Site.

    Then there's Django. Which is very neat, partly even better than RoR (and friends with the RoR project), but went OSS a little later than RoR and thus needs to catch up on awareness a little. Symfony is PHPs late answer to the RoR induced MVC frenzy and still to new to gain awareness momentum. CakePHP and P4A seem ok but don't have the marketing stance to be of any significance anytime in the future. They're both so nineties it hurts and thus will wither and die.

    Bottom line: RoR are a OSS project that isn't just good at coding or using exotic technologies, they actually have the skill to market it aswell. And they were the first in the framework camp. It's that simple.

    --
    We suffer more in our imagination than in reality. - Seneca
  47. Zealotry, or simply inexperience?-DSL. by Anonymous Coward · · Score: 0

    "So-called scripting languages, which cut away much of the boilerplate baggage required by the workhorses, have proven to be a much more efficient tool for many kinds of project as well, often due to relatively simple features like supporting common data structures as first-class entities."

    DSL's do even better without the "stuck in scriptland" effect. That's why things like Lisp and CLOS work so well because one can fit the language to the problem domain, rather than the other way around.

  48. The correct American way by jdbartlett · · Score: 1

    Sweet land of liberty, of thee I sing...

    (weeps)

  49. It's the retards that use it. by HornWumpus · · Score: 2, Insightful
    I agree with the sib poster. It's the apps that make VB look so bad.

    Only Access has consistantly worse apps. All languages have some stinkers, but there is something to be said for learning curves keeping PHBs from blowing their own peckers off.

    That being said you can be very productive in VB if you're not a retard.

    --
    John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
    1. Re:It's the retards that use it. by Anonymous Coward · · Score: 0

      Access has VB too innit - Visual Basic for Applications.
      Tried it -VBA in Excel- in 1999, managed to get a working app, and every simple step i wanted to take took hours and hours. Counterintuitive DOM, badly documented, the community -if any- can only think of money.

    2. Re:It's the retards that use it. by drkmtr · · Score: 1

      It was fine as long as developers stayed within the boundaries of its intended use. It was not meant to be used as a system programming language but too often was used in that manner.

  50. Japanese factor ... by MaoTse · · Score: 1

    Like it was pointed out in here other frameworks are older and more advanced then RoR.

    Still RoR managed to break the mindset barrier of a typical US java programmer - and the sheer amount of people with such profile is so overwhelming that, in the end of the day, that's all that counts.

    Folks ignored everything beyond J2EE for a long time. Think Zope history for example.
    RoR happened at the moment java burden factor just reached some kind of a critical mass point.

    The enthusiasm for RoR specifically surely is due to good marketing but I suspect typical American Japan-envy factor was as important.

  51. RoR works well with my brain :-) by MarkWatson · · Score: 1

    Seriously, once you know the naming conventions, directory layouts, etc., it is very easy to find your way around a Rails project.

    If you are working on a controller and want to mentally switch gears an modify the coresponding view, there is no doubt where to go (that is, which rhtml file to edit).

    I find myself thinking about application problems and not framework problems. I am a little prejudiced right now: I am just finishing up the book "Ruby Quickly" for Manning (http://www.manning.com/watson/). I hate to admit it, but I am simply tired of developing in Java. Ruby is fun, and productive. I started a new AI project a few weeks ago, and I started all of the prototyping in Ruby. For one part of the system, Ruby is too slow, and I am replacing this bit of code with stuff written in Common Lisp. Still, for a large part of the system, Ruby is a great fit.

  52. Tutorial for RoR? by Jugalator · · Score: 1

    Can anyone give me a good, preferrably online, tutorial/introduction to RoR?

    Being thorough isn't really a disadvantage; I'm not looking for a sloppy "learn RoR in 2 days" intro.

    I thoroughly enjoyed e.g Bruce Eckel's free online books for C++ and Java, as a hint of what I'd be looking for.

    Is there anything good out there online? :-)

    --
    Beware: In C++, your friends can see your privates!
    1. Re:Tutorial for RoR? by JoeRails · · Score: 1

      http://www.onlamp.com/pub/a/onlamp/2005/01/20/rail s.html
      Hard to find a Rails developer who hasn't made The Cookbook.

      Also, for test deployment - HostingRails.com is giving away free Rails hosting at the moment. But for large apps I'd recommend DreamHost (w/ promo code X50) or Site5 if apache/mysql is your gig, or TextDrive if you're down with LightTpd/PostgreSQL.

    2. Re:Tutorial for RoR? by BorgCopyeditor · · Score: 1

      There's a good list of RoR tutorials here.

      --
      Shop as usual. And avoid panic buying.
    3. Re:Tutorial for RoR? by jfmiller · · Score: 1

      Try Google.

      There are at least a dosen out there and none of them get much beyond basic. In an afternoon any of them will get you started. Now, when you what to do something that the developers didn't think of and go looking for the advanced documentation that's a whole nother story.

      JFMILLER

      --
      Strive to make your client happy, not necessarly give them what they ask for
  53. Re:My problem Ruby on Rails by Anonymous Coward · · Score: 0

    You could install it from Cygwin: http://www.cygwin.com/

    When I first heard about Ruby, I just popped open a bash shell and typed "ruby". There it was! Cygwin has tons of utilities that you'll find when you really need them.

  54. It takes two to discuss by jdbartlett · · Score: 1

    Since we're being pedantic: it wasn't a politics "discussion" until you joined in. :-P

    1. Re:It takes two to discuss by Discordantus · · Score: 1

      Okay, a politics "exponunciation" :P

      You're right, I used the term "discussion" too "liberally" :)

      "Quotes", too, I "think".

  55. No it's not by RahoulB · · Score: 1

    all that stuff is lifted directly from Smalltalk

    1. Re:No it's not by daviddennis · · Score: 1

      Okay, I tested this proposition by looking at the Wikipedia entry on Smalltalk.

      And you are right in many respects. It seems obvious that Ruby's developer did grab a great deal from Smalltalk, down to the rather odd | ... | variable declaration that's used to declare Ruby variables within a block.

      However, it would not surprise me at all if there are more people looking at Ruby on Rails right now than there are people who use Smalltalk on a regular basis. Clearly Ruby and Rails have inspired the mainstream in a way Smalltalk hasn't.

      I think Ruby's secret is that it expresses these object-oriented ways in a manner that's easier for programmers from other languages to adjust to. Because of this, Ruby doesn't look nearly as alien as Smalltalk, and appears enormously easy to learn, particularly when combined with the overall simplicity of Ruby on Rails.

      So what I believe is that Ruby made formerly complex concepts easier to grasp. This means that more people will be coding in a "true" object-oriented way than ever before, and this means that perhaps the promise of Smalltalk can finally be realized, even if some purity is sacrificed in the process.

      D

  56. Hype and skepticism by KidSock · · Score: 1

    Well now I know RoR is bull because any article that is 90% about trying to debunk hype and talk about philosophy must be hiding something. You can easly find 10 Java programmers but if you're an expert in something that offers 10 to 1 productivity then you're going to be popular. My guess this is just another guy trying to drum up some business for himself. Not that there's anything wrong with that but you have to technical content to backup your claims. Let's see that "three lines of code to render a table".

    1. Re:Hype and skepticism by Cederic · · Score: 1


      How about you do the obvious thing and download Rails and give it a go?

      There are many applications - web applications - that I wouldn't use RoR for. There are also certain applications that can be written in a day using RoR that will take a couple of weeks in (e.g.) Java.

      Throw in testing time, ease of maintenance, likelihood of bugs, and there are situations where RoR is clearly the right answer.

      I'm a hardcore Java fanatic, but Rails is for certain uses quite superb. What I don't know and want to find out is where the boundaries are - at which level of complexity/functionality/scale does Rails cease to have productivity gains and other frameworks/approaches become better choices.

      The article is not hype; it may not be entirely objectively written but it also doesn't lie. Ruby on Rails is not bull.

    2. Re:Hype and skepticism by Anonymous Coward · · Score: 0

      Sorry.. 5 lines, but ya know the html gets in the way.

      <table>
      <% Person.find(:all).each do |person| %>
      <tr><td><%= person.name %></td> <td><%= person.number %></td> </tr>
      <% end %>
      </table>

      Prints all the names and phone numbers from a table named people.

  57. Actually... by jdbartlett · · Score: 1

    Actually, Java developers ARE concerned about opening Java up. Here are some recent news articles from Googling "open java":

    http://www.thechannelinsider.com/article2/0,1895,1 955870,00.asp
    http://opensource.sys-con.com/read/216731.htm
    http://www.tmcnet.com/usubmit/-analysis-new-ceo-su n-needs-turnaround-plan-that-/2006/04/26/1611586.h tm
    http://www.technewsworld.com/story/50449.html

    To all of which, Gosling has responded, "Nope", much to the chagrin of Java developers. If you haven't heard them, it's because you've been too busy complaining on Slashdot about Slashdotters using Slashdot to Slashdot.

  58. Posted on IBM by zlogic · · Score: 2, Informative

    This article is hosted at IBM, and IBM invests heavily in Java (SWT, Eclipse, etc.) So this article should be taken with a grain of salt. It's like Microsoft comparing .NET with Java (remember Microsoft's ".NET is X times faster than Java" statements?)
    However it's nice to see that IBM knows that Ruby exists and knows its strong points - so that they may borrow the good stuff into Java.

    1. Re:Posted on IBM by Anonymous Coward · · Score: 0

      If I had mod points, and an account, and ... well, anyway, I was hoping someone would point this out. It does look more like a jab at Sun and Java (just before the Java conference, by the way) than a serious look at rails.

      That being said, I think the reality of software as a service is still a long way off for desktop applications. So there is a big hole that Sun, Java, and Rails are missing.

      Mono, Eclipse, gcj, swt (gtk), classpath are converging rapidly to make (unencumbered::trolltech) rad development a reality for the Linux platform.

      People are going to be able to develop, with a rad tool, with an extremely well documented OO language on Linux that generates native code apps on Linux and cross compiles to win32--without sun's tools or control. To me that's a big deal.

      but will it be enough to slow down .NET and visual studio? That's the bigger question as I see it.

    2. Re:Posted on IBM by misleb · · Score: 2, Insightful

      Umm, TFA was actually making a good case for Ruby on Rails. So if they are being biased, it is in the opposite way that you would expect given IBM's interest in Java.

      -matthew

      --
      "THERE IS NO JUSTICE, THERE IS ONLY ME." -Death
    3. Re:Posted on IBM by Anonymous Coward · · Score: 0

      And the author is currently trying to make a living off RoR.

      Article seemed fairly neutral to me, if there's bias it might as well be in favor of Rails (Which does rock, btw).

  59. Catwalk by Bazman · · Score: 1

    If catwalk (TG's automatic DB front-end) had been working when I was exploring web frameworks a few months ago I probably would have gone with TurboGears.

    The docs say its 'slated for 0.9'...

  60. Re:What's the Secret Sauce in Ruby on Rails? by mikaelhg · · Score: 2, Interesting

    Ruby on Rails - the Bush administration of web frameworks.

    This is what they do. They spam their marketing materials on one forum after another, glossing over finer points like the lack of Unicode and threading support, along with quite a number of tools professionals need in their development, and then use their meat or sock puppet accounts to downmod messages they don't want to reach their target marketing audience.

  61. RAILS is a different tool? by Anonymous Coward · · Score: 2, Interesting

    After using Ruby for several years, for general purpose scripting, and various other web development frameworks in Java/Perl/PHP/C#, etc... It seems clear to me that ROR really isn't another 'kind' of tool at all. It's simply a well desgined web framework, expressing some of the philosophy of the Ruby programming language.

    The programming techniques ROR promotes aren't new, they're not crazy, or magical. They're not in the least 'different'.

    The article lists:

    1.) Seamless integration
    2.) Convention 'over' configuration.
    3.) Low Repetition.
    4.) Immediate Feedback.

    What web-framework would not want the framework they're using to work well with the underlying language? And Convention over configuration doesn't mean a lack of configuration, it simply means that intelligent defaults are generated. It makes common things easy, and uncommon things possible. And DRY is a main goal of software engineering, of design patterns, of object oriented programming--- which all have been in practice for over twenty years.

    In this article, the author points out that it's based on an underlying MVC architecture. This isn't anything new for any other web development framework, for instance Struts. And even outside of an environment which starts with this design by default, software engineers are wise to follow design patterns. It seems he views the philosophy of convention over configuration as somehow making ROR inflexable, and incapable of solving some imagined wide range of web-development programs. Sure, 50% of applications are web-based and database backed--- but ROR programs don't have to be database backed (See Rails Recipes, page 57). And, I figure if a person is using a web-development framework, the lack of configurability in the expression of the application as being web-based is acceptable (although I suppose it's possible to replace the view portion of the application as well).

    It's clear, from some messages I've read here--- several people choose 'not' to adhere to MVC, and code the majority of their application in the view portion. ROR really does little to 'enforce' the user to do one thing, or another, it merely provides tools that aid a person in producing a scalable, modularized, and reuseable, web-application.

    Ruby is a fully object oriented programming language, that was built from the ground up on the principle of least surprise. Language constructs aren't built directly into the syntax, as they are in perl--- it adheres very closely to the smalltalk view of a truly object oriented language being composed of objects, and messages. The script isn't being augmented with a new 'breakpoint' keyword, but instead with a breakpoint function. There's very little that's magical about what ROR does, and most everything it does can be extended upon, reused, or changed.

    It's not a new 'kind' of tool, it's just a clean integration of existing tools. It's an environment that has integrated a great deal of the components that have been in wide use by other web-development platforms for years, and provides a clean way to generate a template project using those pieces.

  62. Rails is nice, but definitely limited... by otis+wildflower · · Score: 1

    ... by design. Thus, I presume, the use of the word 'Rails'.

    You want a DB-driven site that hooks into a single DB for all its tables? You got it.

    You want a site that hooks/controls multiple DBs, or want to stray too far from the paradigm? Not so much.

    If your project is contained mostly or entirely within the Rails Venn diagram, you'll be happy. Otherwise, not so much.

    (I looked into it for a site that would manage large #s of XML files, and found that going outside the one-DB-per-site model was very unfriendly, but then again, IANARP.. :p)

    1. Re:Rails is nice, but definitely limited... by misleb · · Score: 2, Insightful

      You want a site that hooks/controls multiple DBs, or want to stray too far from the paradigm? Not so much.

      This is by design, obviously. And in a way it can actually encourage good modular design. Where someone doing Java or PHP might be tempted to write one monster application that controls two DBs, the Rails developer is encouraged to write separate applications that communicate with each other trough a well defined interface. And if the two databases don't represent two differnt modules/applications, maybe they shouldn't be different databases.

      That said, I agree, Rails is limited and there will always be a place for other frameworks or unstructured freeform coding such as one might do in PHP.

      -matthew

      --
      "THERE IS NO JUSTICE, THERE IS ONLY ME." -Death
    2. Re:Rails is nice, but definitely limited... by kpharmer · · Score: 0

      > You want a site that hooks/controls multiple DBs, or want to stray too far from the paradigm? Not so much.

      Note that if you're using databases like DB2, Oracle or SQL Server that support database federation, you can easily connect to multiple databases through a single one. Sometimes this is easier than connecting to multiples anyway (for example when writing sql). There are potential performance issues, so you may need to be thoughtful when configurating the databases this way.

      No idea if postgresql supports this yet, and I doubt that mysql does.

      Note also that a full-featured database allows you more capability to match the RoR paradigms with legacy components: yet another reason for views (yay, mysql now supports them) is that they can allow you to rename tables to match RoR preferences if that is your desire.

    3. Re:Rails is nice, but definitely limited... by taybin · · Score: 1

      Rails supports multiple databases.

    4. Re:Rails is nice, but definitely limited... by nuzak · · Score: 1

      From the very article you linked to:

      This guide will only explain how to determine which database to connect to per request.

      Yawn. Let me know when I can have model objects in two databases. I have two Oracle databases and a Postgres DB of my own, all for the same app, the whole point of which is to integrate all their data.

      But RoR is unsuitable for that by its design, and I suppose that's fine. I also need to localize it someday (more of a "would be nice" thing though) and it also deals with multiple character sets. Again, these are screws for RoR's hammer.

      RoR seems to me to be a really nice CRUD screen generator, but it's hardly more than that.

      --
      Done with slashdot, done with nerds, getting a life.
  63. Ruby limitations by jopet · · Score: 1

    Unfortunately, Rails is limited by a couple of limitations that are really Ruby's limitations: most importantly the total Lack of Unicode support. I like most of the design of the Ruby language, but to not support Unicode in 2006 makes it essentially unusable for most projects where I would need it, including practically all Rails applications. Ruby is also not particularily fast, in some respects quite slow which also impacts Rails.

  64. Re:RoR hype == good product + good marketing. Peri by ensignyu · · Score: 1

    Zope has a seriously bad reputation from their 1.x and 2.x days. I don't know if they've reformed enough with 3.x, but Zope is "enterprise-grade" in a very real sense -- huge and complicated.

    I do appreciate RoR's marketing skills. They're really reaching out to Java and PHP users -- who I suppose are somewhat easy targets, considering how terrible web programming can be in those languages -- which I don't think the Perl or Python communities really tried to do. Since I'm a Python fan and Python is somewhat of a middle-ground between the looseness of Ruby and the solidness of Java, I'm hoping the Rails marketing brings some people our way :)

  65. The Kepler Project by Anonymous Coward · · Score: 0

    Try Lua's Kepler project; it can be deployed standalone, with Apache, or on Tomcat (throug JavaLua)!

  66. Re:Rails zealots aren't hammers, they're just tool by Overly+Critical+Guy · · Score: 1

    Rails code I looked at looked very much like JSP/ASP/PHP gone bad. All sorts of code in HTML land.

    How is that the fault of Ruby on Rails? You're supposed to move code out into helpers for MVC reasons, readability reasons, and re-usability reasons.

    --
    "Sufferin' succotash."
  67. CRUD screen secrets - Data Dictionaries by Tablizer · · Score: 0

    The best CRUD (edit/search/report screens) technologies I've seen involve data dictionaries (field tables) who's values/behaviors can be overridden as needed. The use of DD's turns app design into mostly data entry so that one does not have to code a bunch of attributes via zillions of set/get's. And, one can do relational operations on the DD's to search, modify, or copy them. The real secret sauce to fast CRUD includes:

    * Data dictionaries
    * Overridable event options as needed for stuff DD's don't do well or nitty exceptions to the rule.
    * A good table browser to edit the DD's (something lacking in current web UI stuff).

    I'll pit such against R-Rails any day. It is a lot quicker to fill out a table and inspect a table than to type in and verify code (at least for me). Coding nitty attributes is for people who like wrist injuries.

    1. Re:CRUD screen secrets - Data Dictionaries by killjoe · · Score: 2, Insightful

      Why not provide a couple links to a couple of projects using DDs so we can check them out.

      In ROR the database IS your DD.

      --
      evil is as evil does
    2. Re:CRUD screen secrets - Data Dictionaries by Tablizer · · Score: 1

      Why not provide a couple links to a couple of projects using DDs so we can check them out.

      It has never been tried formaly in a commercial product I know of except for FoxPro. However, FoxPro did not document it and their implementation was poor IMO. However, here is a set of links about the concept:

      http://www.geocities.com/tablizer/ddsamp.htm

      http://www.geocities.com/tablizer/top.htm

      In ROR the database IS your DD.

      I am not sure what you mean. The DB native schemas usually don't contain sufficient info for GUI interaction by themselves. At best they can serve as a starting point.

    3. Re:CRUD screen secrets - Data Dictionaries by Anonymous Coward · · Score: 0

      [b]I am not sure what you mean. The DB native schemas usually don't contain sufficient info for GUI interaction by themselves. At best they can serve as a starting point.[/b]

      i believe this relates to intelligent defaults. if you name your table and its id column correctly, rails knows enough about it to display a crud page without the designer coding one iota of html. of course, it is basic. but it does work.

      and not just the list page with the CRUD options. click on the CRUD links and you get pages that will perform the functions. again, w/o one iota of html coding. it is basic, but entirely functional.

    4. Re:CRUD screen secrets - Data Dictionaries by Tablizer · · Score: 1


      i believe this relates to intelligent defaults. if you name your table and its id column correctly, rails knows enough about it to display a crud page without the designer coding one iota of html. of course, it is basic. but it does work.

      Well, most column names I encounter are not well-suited for report listings as-is. Anyhow, that is a matter of grabbing the schema information. Whether the existing schema is copied into a starting Data Dict or used for coded defaults is really the same thing more or less. A data dict approach can default to the column name for titles also if no title is given. I've implemented DDs this way.

      click on the CRUD links and you get pages that will perform the functions. again, w/o one iota of html coding. it is basic, but entirely functional.

      I am not sure what you mean by "CRUD links". A lot of cross links and drill-downs can be specified declaratively also, such as providing the name of the description column to serve as the click-link, and telling it what the primary key is. I just like working with such info in tables rather than code if given a choie. If you like it the other way around, I will respect your choice as your personal preference.

  68. Web Soup by Anonymous Coward · · Score: 0

    Will there be no end to this Noah's Ark of web languages? Must I be expected to learn every new web language some one trots out?

    Allow me to list the animals in the Web Ark thus far:

    After learning (either directly or about, and in order during my career)
    C/C++
    Perl
    Java
    Python
    PHP

    I am now reading about Ruby/RoR, I have been asked if I knew Rebol by one prospective employer, and I have also read on the web an article expounding the virtues of Lisp for rapid web development. Every one has been touted as the killer language for the web, every one has been "improved upon", every single one has been a requirement for some project or another. I have attempted to become familure with all of them, but come on! If I have to learn one more new web programming language in the next 6 months I'm going to blow a gasket.

  69. what about Phython, Perl, PHP frameworks? by ManyLostPackets · · Score: 1

    So many frameworks, so little time...

    I would love a comparison between Rails and perls Maypole and Catalyst or Phythons TurboGears and Django or php's cakePHP and smart3

    Hard to find Ruby programmers, and their are more commonly known languages with comparable frameworks, some of which have been around longer (like maypole). Then again, Ruby fanatics are generally cream of the crop programmers and one wouldn't have to worry about PHP n00bs who can't really code or perl programmers who write line noise or the overhead of Java and it's seemingly required department of architects

    Seems other languages are just as good, just harder to manage, but if you have top notch PHP programmers and Perl programmers who work well together to write maintainable code , I wonder how they would compare then?

  70. Re:What's the Secret Sauce in Ruby on Rails? by arevos · · Score: 2, Insightful
    This is what they do. They spam their marketing materials on one forum after another, glossing over finer points like the lack of Unicode and threading support, along with quite a number of tools professionals need in their development, and then use their meat or sock puppet accounts to downmod messages they don't want to reach their target marketing audience.

    What on earth are you talking about? Sure, Rails isn't appropriate for some projects, but it certainly is appropriate for others. Rails isn't missing any critical feature that makes it useless for web development in general, and it makes good on its promise of rapid development. Rails performs well in its (sizable) niche; take it outside that niche and of course you'll have problems, but that doesn't imply that it's useless for all applications.

  71. What about PHP? by mangu · · Score: 1
    I read TFA expecting to learn something about why people talk so much about Ruby today. Unfortunately, there was only a comparison between RoR and Java. So, if the only reason to use Ruby is that it allows an agile development method to be used, sorry, Ruby came too late for that. I have been using PHP with phpGroupWare/eGroupware, which has every one of the advantages cited in the article, plus some more.


    One reason why I have so much impedance against Ruby is the different syntax. PHP has a C-like syntax, which makes it very easy to catch for someone who knows C and Perl. What's wrong with Ruby's syntax? Well, the dangling "end", for instance. It's too FORTRAN-like for my taste. "end" what? With curly braces, there is never any doubt on the block structure if you use a modern editor, with Ruby's "end" you can never be sure of what ends where. I also prefer the curly braces instead of "begin"/"end" for the simple reason that it means less ink on paper, less clutter, easier to read listings. They say the Ruby syntax is "flexible", well so is Forth.


    Using Ruby instead of Java, OK, I can see why it's better. But I'm still waiting to see a good explanation why should someone use Ruby instead of PHP, or Perl, or Python, the three languages that have become so much associated with the "agile development" trend of software development.

    1. Re:What about PHP? by swimmar132 · · Score: 1

      In vim (at least), you can match the 'do'/'if' to their corresponding 'end' fairly easily.

    2. Re:What about PHP? by misleb · · Score: 2, Insightful

      I read TFA expecting to learn something about why people talk so much about Ruby today. Unfortunately, there was only a comparison between RoR and Java. So, if the only reason to use Ruby is that it allows an agile development method to be used, sorry, Ruby came too late for that. I have been using PHP with phpGroupWare/eGroupware, which has every one of the advantages cited in the article, plus some more.

      phpGroupware? You've got to be kidding! There is just no comparison.

      One reason why I have so much impedance against Ruby is the different syntax. PHP has a C-like syntax, which makes it very easy to catch for someone who knows C and Perl.

      Try Ruby for a week, seriously. I came from a mostly Perl/C/PHP syntax background and had little trouble picking up on Ruby. Once you start using code blocks, closures, true OO design, and all the Ruby nicities, you'll never want to fart around with PHP again. Here is an example of some really slick (in my opinion) ruby code. Lets say you have two arrays of objects that you want to add together, remove duplicates, and sort by an arbitrary attribute:

      combined = (array1 + array2).uniq.sort_by { |obj| obj.someattribute }

      What's wrong with Ruby's syntax? Well, the dangling "end", for instance. It's too FORTRAN-like for my taste. "end" what? With curly braces, there is never any doubt on the block structure if you use a modern editor, with Ruby's "end" you can never be sure of what ends where. I also prefer the curly braces instead of "begin"/"end" for the simple reason that it means less ink on paper, less clutter, easier to read listings. They say the Ruby syntax is "flexible", well so is Forth.

      Of all the trivial complaints, that has to top them all.

      Using Ruby instead of Java, OK, I can see why it's better. But I'm still waiting to see a good explanation why should someone use Ruby instead of PHP, or Perl, or Python, the three languages that have become so much associated with the "agile development" trend of software development.

      Of the 3 you mention, only Python really matches Ruby. Perl is still king for processing text, but it is somewhat specialized in that. PHP is more or less just the lowest common denomonator among modern web programming languages. As a language it is nothing special and in many ways it is sloppy on inconsistent. I haven't used PHP 5 much, but last tiem I checked, object oriented PHP was a complete joke. Its only advantages are that it is easy to learn and runs just about anywhere.

      -matthew

      --
      "THERE IS NO JUSTICE, THERE IS ONLY ME." -Death
    3. Re:What about PHP? by mangu · · Score: 1
      Lets say you have two arrays of objects that you want to add together, remove duplicates, and sort by an arbitrary attribute:

      combined = (array1 + array2).uniq.sort_by { |obj| obj.someattribute }


      Tell me, exactly why is this better than


      select distinct (array1.col + array2.col) as combined from array1, array2 order by someattribute


      I used to do this twenty years ago with Oracle PL/SQL, now I do it better with PHP + Postgres


      Until Ruby offers something that's distinctly an advantage over old things, I will not waste one minute, not to mention a week, on it.

    4. Re:What about PHP? by misleb · · Score: 1
      Tell me, exactly why is this better than

      select distinct (array1.col + array2.col) as combined from array1, array2 order by someattribute

      Because it works on objects not coming directly from a database. That much should have been obvious. It was just an example. Doesn't have to be model objects. Could be any type of object (everything is an object in Ruby).

      Let me take a crack at the PHP code to do the near equivilent to my Ruby oneliner: http://monet.pnca.edu/~misleb/phpcode.txt I say "near" because PHP doesn't treat objects and arrays the same way so this PHP code will only work for arrays. Sorry I couldn't put it in this post. It wouldn't retain formatting because slashcode seems to strip tags.

      Did you follow all that PHP code? I can't tell you how many times I have had to waste my time writing shit like that in PHP when it could have been done in like 1 or 2 lines in Ruby. Note that the Ruby oneliner I gave doesn't use anything other than the core Ruby libraries. .sort_by is a core method for any Enumerable object.

      Until Ruby offers something that's distinctly an advantage over old things, I will not waste one minute, not to mention a week, on it.

      How much is your time worth?

      -matthew

      --
      "THERE IS NO JUSTICE, THERE IS ONLY ME." -Death
    5. Re:What about PHP? by DerelictMan · · Score: 1

      Lord knows that I have no love for PHP, and I agree that it is an abomination. However, I feel compelled to point out the existence of the array_unique() function, which would considerably shorten your PHP version.

      Ick, you made me defend PHP. I feel dirty now. :)

    6. Re:What about PHP? by misleb · · Score: 2, Insightful

      Ah, but array_unique() only works on arrays with integers or strings for values. I looked it up. Check out the documentation on php.net for the array_unique() function and see all the ugly hacks that people have come up with to do what you could do with 1 or 2 lines of Ruby. My Ruby oneliner would work with any arbitrary object type. The reason the Ruby version is so much more powerful is because strings and integers are just objects like everything else. As long has you implement the == method for an object, it can be uniq'd or sorted (and many other operations) just as easily as an integer. In PHP you have to have special functions to do even simple things.

      Sorry, I don't mean to sound like such a Ruby fanboy. I am really not. It is just that it frustrates me when people like the grand parent shut themselves out to learning something new. He says that he doesn't want to "waste a minute" on Ruby but he doesn't realize that he's probably already wasted countless hours writing PHP hacks that aren't even very reusable.

      -matthew

      --
      "THERE IS NO JUSTICE, THERE IS ONLY ME." -Death
    7. Re:What about PHP? by mangu · · Score: 1
      it works on objects not coming directly from a database


      If you read TFA, it says "Ruby on Rails (aka Rails) is a Ruby framework for database-backed Internet applications". My point was that, for this particular niche, it isn't any better than PHP using either phpGroupWare or eGroupWare which was forked from phpgw.


      Developing new applications in these frameworks using the eTemplates system is a really quick and painless procedure. In that context, I mix SQL and PHP, using whatever language is best for a given operation. For the example you mentioned SQL works fine, although one could do it in PHP in a much shorter way than the code you presented, using "sort(array_unique($array))". Check the PHP standard library functions for array manipulations.


      Of course, the application mentioned in the article is rather specific, for other type of work I wouldn't use PHP, I prefer Perl for smaller applications without too much number crunching or C/C++ for large ones.


      Ruby reminds me of languages like Smalltalk, created in the academic world by professors for the delight of professors. The "everyhting is an object" concept is fine for the classroom, but in the real world I fail to see real advantages in it. OO offers some advantages in a very large project where you must coordinate the work of different programmers, some of which are less experienced than others. For smaller projects OO can be rather a hindrance than a help.


      I have browsed the /. comments on this article and am still unconvinced by Ruby. Unfortunately, most of the arguments are like "Hey, Ruby is great, you should try it!", without real substance behind. OK, the one-liner you showed is cool, but the PHP counter example you presented shows that you don't know PHP that well to do an objective comparison between the two languages.

    8. Re:What about PHP? by misleb · · Score: 1

      If you read TFA, it says "Ruby on Rails (aka Rails) is a Ruby framework for database-backed Internet applications". My point was that, for this particular niche, it isn't any better than PHP using either phpGroupWare [phpgroupware.org] or eGroupWare [egroupware.org] which was forked from phpgw.

      So you never have to sort arrays in databased-backed internet applications? You never have to manipulate data after it has come out of a database? Never have to manipulate data that doesn't come directly from the database?

      Developing new applications in these frameworks using the eTemplates system is a really quick and painless procedure.

      They're OK if you happen to be writing a phpGroupware application.

      In that context, I mix SQL and PHP, using whatever language is best for a given operation. For the example you mentioned SQL works fine, although one could do it in PHP in a much shorter way than the code you presented, using "sort(array_unique($array))". Check the PHP standard library functions for array manipulations.

      Yeah, I looked at the standard library and sort(array_unique($array)) would not do what what the code that I posted would do. It only works for arrays with strings or ints as values. Goto the php.net documentation for array_unique() and see all the ugly hacks that people had to do just to uniq multidimentional arrays.That is actually where I lifted the code for my PHP example from. It doesn't even work at all for objects. Same deal for the sort() function. Note how there are like 5 different sort functions, each covering a special case.

      Ruby reminds me of languages like Smalltalk, created in the academic world by professors for the delight of professors. The "everyhting is an object" concept is fine for the classroom, but in the real world I fail to see real advantages in it.

      I guess you missed the oneliner that I posted then. It is exactly the "everythign is an object" part that makes that oneliner so powerful.

      OO offers some advantages in a very large project where you must coordinate the work of different programmers, some of which are less experienced than others. For smaller projects OO can be rather a hindrance than a help.

      Uh, ya, sure, whatever you say.

      I have browsed the /. comments on this article and am still unconvinced by Ruby. Unfortunately, most of the arguments are like "Hey, Ruby is great, you should try it!", without real substance behind.

      So a realworld example (one that I have actually used) of ruby code vs. PHP code isn't substance? Hmm.

      OK, the one-liner you showed is cool, but the PHP counter example you presented shows that you don't know PHP that well to do an objective comparison between the two languages.

      But you don't know Ruby AT ALL! How do you make an "objective comparison?" Go ahead. Try to implement my ruby oneliner in PHP. I lifted the code directly from the PHP.net documentation for array_unique(). Read the comments for the function. Look at all the ugly code that people wrote to sort/uniq multi dimensional arrays. Note how it ONLY works for multidimensional arrays too. How about ANY type of array of objects? Guess what? Have to write different functions for that.

      Again, it was JUST an example. I could give you plenty more examples of ruby code that is concise and easy to follow where the equivilent PHP code woudl be 10x as long. I used to write PHP apps. And I still might do some PHP coding now and then if I need to get something done quick and dirty, but beyond that, PHP is a joke.

      -matthew

      --
      "THERE IS NO JUSTICE, THERE IS ONLY ME." -Death
  72. No. by Anonymous Coward · · Score: 0

    Thank goodness.

  73. Re:RoR hype == good product + good marketing. Peri by Haeleth · · Score: 1

    They're really reaching out to Java and PHP users -- who I suppose are somewhat easy targets, considering how terrible web programming can be in those languages

    And they're doing so from a position of strength and knowledge. Why, they even use PHP for the official Ruby on Rails site! Presumably to make sure they really know how their product stacks up against the competition.

  74. mod parent up by Anonymous Coward · · Score: 0

    Nice to see someone making some sense around here.

  75. Ruby is slow by SanityInAnarchy · · Score: 3, Insightful

    When it comes to Ruby, I have one wish:

    Compile it. For the love of God and all that is holy, Ruby is at least as slow as JavaScript, if not slower -- at least you can compile JavaScript into Java!

    Perl6 shows some promise in that area, but I have some serious doubts. Ruby, as a language, does far too many things that simply assume it's a "scripting" language. For instance, it's possible to modify any class at runtime -- thus many core libraries probably rely on that feature. Also, all names in Ruby are kept around at runtime. I'm pretty sure that it actually is doing a hash lookup every time. For instance:

    irb(main):026:0> class Fixnum
    irb(main):027:1> def method_missing (name, *args )
    irb(main):028:2> print 'Attempt to call '
    irb(main):029:2> puts name
    irb(main):030:2> end
    irb(main):031:1> end
    => nil
    irb(main):032:0> 5.foo
    Attempt to call foo
    => nil
    irb(main):033:0>

    I'm sure that someone will find a much simpler / more efficient way of doing the above, but the point is the same. Obviously, whenever Ruby executes code that attempts to call '5.foo', or even '5 + 5' (which becomes something like 5.+(5)), it actually stores the code for the call as a call to a given name, and then looks up that name at runtime.

    Now, good OO design generally involves making lots and lots of small classes, and even the bigger classes will have lots and lots of small methods. Good programming design in general tells us to refactor mercilessly, which will, in any language, tend to reduce the amount of code per method and increase the number of method calls. And even if you go the other way, and don't use any methods at all, the simplest line in Ruby (since it's a pure OO language) will break down into 5 or 10 method calls, at the very least.

    What all this means is, Ruby is back to that old argument of developer time vs. application run time, and I hate that. I really love it when we can break out of that mold -- when we find that, most of the time, a compiler will produce better code than handcoded assembly, or a language-based garbage collector can actually run as fast or faster than a hand-coded, application specific refcounting scheme. Or when we find that Java, despite being bytecode, will, once you JIT it, run as fast or faster than equivalent C++. Or when we find that mod_perl can be close enough to the speed of a C program that it's not even worth considering using C instead.

    But when it comes to choosing a language, they all have their performance wrinkles. C++ probably uses more memory than C, and always seems to take far longer to compile. Perl isn't anywhere near as fast as C, so whenever we find something where we need that extra speed, we rewrite chunks of a Perl module in C. Python is the same way, though Psyco looks promising, but Psyco is also x86 only, not even amd64. Java is as fast as anything, once a program starts, which takes far longer than anything else even if you've gcj'd it -- plus, the language sucks compared to Ruby. C# is as fast as Java, and so far seems to load much faster, but the language sucks (really a rehash of Java/C++), IronPython is nowhere near done, and even IronPython isn't as nice as Ruby -- plus, the platform is controlled by Microsoft.

    Ruby has absolutely awesome syntax, can be 10x faster to develop in than most other languages, but due to the language design itself, it will always be much, much slower than Perl, and that's saying something. And it's just depressing when you find you can make a chunk of your program run 10x faster by porting from Ruby to C, only it will take 50x more code.

    I guess what would make me happy is an insanely intelligent compiler for Ruby, that targeted the .net environment. Performance comparable to C#, developer time comparable to normal Ruby, bytecode obfuscated enough to use in commercial products.

    But that's depressing, too, because in the amount of time it would take me to learn enough about Ruby and .net to do that, not to mention the programming of that insane compiler, I could write hundreds of useful Ruby programs.

    --
    Don't thank God, thank a doctor!
    1. Re:Ruby is slow by Anonymous Coward · · Score: 0

      For the love of God and all that is holy, Ruby is at least as slow as JavaScript, if not slower

      Can you show a real example instead of timing the amount of nanoseconds it takes to add two numbers together? I suspect that you haven't done any website development at all with it.

    2. Re:Ruby is slow by RPoet · · Score: 1

      Compile it. For the love of God and all that is holy, Ruby is at least as slow as JavaScript, if not slower -- at least you can compile JavaScript into Java!

      How?

      --
      "Oppression and harassment is a small price to pay to live in the land of the free." -- Montgomery Burns.
    3. Re:Ruby is slow by CaptainPinko · · Score: 1

      I hope you realise that even compiled Ruby will not be as fast as C/C++. The more dynamic the language the more run-time processing it needs. Like all methods of abstraction dynamicism entails overhead. I suppose what could benefit Ruby is a Java-like run-time re-compiler that assumes things are not going to change, compiles and optimizes, and then if something changes switch to interpreting until the changes have compiled during lulls in processing.

      --
      Your CPU is not doing anything else, at least do something.
    4. Re:Ruby is slow by Eli+Gottlieb · · Score: 1

      Compilable dynamic language which has both the speed and capability for web apps? I have two words for you: "Common" and "Lisp".

    5. Re:Ruby is slow by Coryoth · · Score: 1

      Can you show a real example instead of timing the amount of nanoseconds it takes to add two numbers together?

      Well, with some basic benchmarks Ruby is indeed slower than javascript, though it uses massively less memory. Compared to Perl it does very well in one test, but is notably slower for everything else. Compared to Python it is occasionally slightly better in terms of memory, but consistently significantly slower. Compared to Psyco Python it simply gets its ass handed to it.

      None of which says that Ruby is a bad language, nor inappropriate for the uses you are putting it to. It does say that it is quantatively slower than many of the alternatives that the OP mentioned.

      Jedidiah.

    6. Re:Ruby is slow by Fweeky · · Score: 1
      "Ruby is at least as slow as JavaScript, if not slower"

      That's a meaningless statement; JavaScript has lots of different implimentations, ranging from the so-slow-you'll-want-to-gouge-your-eyes-out iCab to the pretty blazing VM-maybe-even-JITed Opera one that seems to just keep getting better.
      " -- at least you can compile JavaScript into Java"

      Uh huh. I'll be sure to keep that in mind when my JavaScript DOM manipulations are too slow.
      "I guess what would make me happy is an insanely intelligent compiler for Ruby, that targeted the .net environment. Performance comparable to C#, developer time comparable to normal Ruby, bytecode obfuscated enough to use in commercial products.
      But that's depressing, too, because in the amount of time it would take me to learn enough about Ruby and .net to do that, not to mention the programming of that insane compiler, I could write hundreds of useful Ruby programs."

      Microsoft are sponsoring development of a Ruby implimentation for CLR. Meanwhile YARV will be giving us a Ruby 2.0 that's rather a lot faster. Also, as for "porting to C", you do know that writing C extensions for Ruby is about as easy as it gets, right? Even without using RubyInline it's simple enough that you can replace a single small method in a single class with an extension and not end up writing 10x as much support code as actual useful C. If you're lucky you might even be able to automate the conversion.
    7. Re:Ruby is slow by Eivind+Eklund · · Score: 1
      Ruby is slow. In practice, the development speed advantages you get from it will let you optimize the relevant parts from profiling, so you can get a higher effective speed from the same development time. Or more functionality, for the cases where the speed is "good enough". My experience with this has been that mostly the performance has been "good enough", that I've very occasionally had to optimize, and that there's been a single case where I just was too ambitious about how much a program had to do, and had to drop that program (some real time music generation which Ruby turned out to be too slow for.)

      Eivind.

      --
      Doubting the existence of evolution is like doubting the existence of China: It just shows that you're uninformed.
    8. Re:Ruby is slow by Eivind+Eklund · · Score: 1
      Parent is wrong. Being more dynamic does not necessarily increase run time processing; there's a lot of ways to resolve that. In practice, more dynamic solutions are often slower - and the present Ruby is certainly a case in point - yet it's often possible to be more dynamic programming-wise without requiring run time processing. For a taste of this, look up the type inference work that was done for e.g. Self (search for Ole Aagesens "Concrete Type Inference: Deliviering Object Oriented Applications").

      Eivind.

      --
      Doubting the existence of evolution is like doubting the existence of China: It just shows that you're uninformed.
    9. Re:Ruby is slow by Anonymous Coward · · Score: 0

      Javascript != Java. To my knowledge, there are no compilers for Javascript.

    10. Re:Ruby is slow by MenTaLguY · · Score: 1

      The main performance issue for Ruby right now (relative to e.g. Perl) is that it still uses an AST-walking interpreter rather than a VM or JIT.

      That part's being worked on (YARV), though.

      I've also been told that the parser is slow, but I haven't looked into that much yet.

      --

      DNA just wants to be free...
    11. Re:Ruby is slow by hamsterboy · · Score: 1
      You're right - Ruby actually IS looking up every method call in a hashtable at runtime. I know this is hard to swallow, but it doesn't matter (OCTAOE).

      What you're seeing is the dragon of Premature Optimization. In only one case out of a hundred thousand is your performance bottleneck the mechanism for calling functions. It doesn't make sense to spend a hundred hours optimizing your application so that a 500ms SQL call is performed 1ms sooner.

      And it's hard. Most coders I know love to tweak the bits, find that extra cycle of performance out of a function, save that extra 4 bytes of memory. But in the real world, your time is better spent elsewhere. Write your tests, get it working, and move on. Later, run a profiling tool, and speed up the parts that are slowest.

      Using a more powerful set of tools gets you to that "later" a LOT faster. A compiler is only one of those tools.

    12. Re:Ruby is slow by CaptainPinko · · Score: 1

      How would something like dynamic binding NOT take longer? Being dynamic ain't free... though it can nearly free, or sometimes it's cost is irrelevant. Just like Qt sockets take longer than C++ virtual functions which are slower than C functions which take longer than inlined code. I'm not knocking it (I'm a Java developer who dabbles in LisP), but it is a fact.

      --
      Your CPU is not doing anything else, at least do something.
    13. Re:Ruby is slow by Anonymous Coward · · Score: 0

      Part of the reason C++ takes so long to compile is that, unlike almost every other programming language (for example, C, Java, Lisp, and ML), the grammar is not LALR(1). (Unsurprisingly, Perl is also an exception.) In fact, the C++ grammar is not LALR(k) for any k. This means that the only way to parse a C++ program is to try compiling small pieces of it, and then to use that semantic information to reparse the syntax.

      In 1996, a couple of Australian computer scientists came up with an alternate grammar for C++, which they called Significantly Prettier and Easier C++ Syntax, or SPECS. The grammar looks very similar to ML, which makes sense considering that C++ inherited its static typing discipline and its functional and generic features from ML. SPECS is also LALR(1), which means that it can be parsed with conventional tools like yacc, and the resulting parse tree can be compiled a single time -- no feedback loop is necessary.

      SPECS just goes to show that you shouldn't judge a language by its syntax. On the other hand, it also makes you realize that, unless you really want to deal with pointers, there isn't much of a reason (in general) to use C++ over OCaml; the former might have better libraries, but the latter is far easier to use and will often produce code that is just as fast as C++, or at least fast enough.

    14. Re:Ruby is slow by Eivind+Eklund · · Score: 1
      Dynamic binding from the point of view of the programmer can be optimized away by the compiler. This is done using type inference and type feedback, partial evaluation and JIT compilation. A good compiler will often (though not always) turn your dynamic binding into either a function call or inline code, depending on what's most efficient. Function calls are often cheaper than inlining code, due to code size busting caches.

      Of course, the optimizations will not apply to all cases, and actually handling things as full dynamic binding in the moment is more expensive than a static binding. However, in a good compilation environment, most of what could be static is AFAIK resolved as static, without the programmer intervening.

      Eivind.

      --
      Doubting the existence of evolution is like doubting the existence of China: It just shows that you're uninformed.
  76. just another tool by tgone · · Score: 1

    I've spent the last month experimenting with RoR and Django. Although I prefer Python as a language, I found RoR much more exciting to use. Everything is nestled into a nice package. I understand why it appeals to .NET and J2EE developers who are used to rigid environments. Despite all this, I don't think RoR is going to save your life. Get over it fan boys! Here are some things I noticed about RoR: - The RoR community is full of obnoxious zealots (similar to the those who idolize Steve Jobs). Many tutorials are filled with chit-chatty authors who believe programming is a whimsical ride. I don't want to hear your cute jokes. Get to the point and tell me how to use the tool. - PHP is installed on almost every *nix host out there. I can cook something up in PHP and deploy it just about anywhere. This is not the case with RoR. You have to find a RoR-friendly host or have your own server. - Lack of Ruby programmers. This is likely to change with time though. - What's wrong with PHP? It's is great for rapid development and not every site fits into the MVC paradigm. So why choose one language over the other when they both excel at different things? People didn't stop using telephones when the Internet was invented. You're better off using both tools and knowing when to use them. People get obsessed with this stuff, and take it too seriously. Why are you programming in the first place? To be cool?

  77. Re:RoR hype == good product + good marketing. Peri by killjoe · · Score: 2, Interesting

    Zope is the single largest waste of talent and innovation in the history of computer science. It's an amazingly well thought product, it solves every problem you might have when designing dynamic web sites, it solves problems you didn't even know, it comes functional out of the box, it takes seconds to install and get going, yadda yadda yadda.

    Never in the history of computing science has so much innovation been so impossible to deal with. No real documentation, the simplest things are difficult, a buttload of half finished products none of which have any documentation to speak of. Most (yes MOST) zope products have no documentation other then it's name. You want to see a joke, go the zope collective on sourceforge. Now there is a crackup.

    Dear Zope Community. I love the technology you have built, please make it so that I can use it. While you are at it please make it perform better then 1/10th of the speed of apache, php. You don't have to make it as fast, just don't make it like a joke.

    While I am asking. Please create a sourforge or a CPAN for zope products so I can just install products without wading knee deep into dependency hell. Make it easy for me to keep my products updated. For examples of how to do this please see perl CPAN, ruby gems, apt, and yum.

    Do this in time for zope3 so that the effort that went into that won't end up being a waste too.

    Sorry if I am coming across a little harsh, I really love the ideas behind zope, I run a zope(plone) site, but it's much harder then it needs to be. Much harder then ROR for example.

    --
    evil is as evil does
  78. Catalyst does Unicode by Anonymous Coward · · Score: 0

    ... or you could use http://www.catalystframework.org/, which has utf8 and internationalization support built in and tested from the core upwards and due to being written in perl can talk to pretty much anything you can find a CPAN module for (and via Inline::Java, ::Python etc. pretty much anything you can't, too).

  79. Lisp, Smalltalk, and...Tcl! by DavidNWelton · · Score: 2, Informative

    Perhaps you should look at Lisp/Smalltalk/Your favorite academic language not being able to market their way out of a wet paper back:-) If they've had since the 70ies to build something that'll take off, and they haven't, they're doing something wrong, and it sure isn't the languages themselves, because they are very nice indeed.

    Changing subjects, one of *my* favorite "cheap Lisp imitations" (it's Lisp, not LISP) is Tcl:

    http://antirez.com/articoli/tclmisunderstood.html

    which is in some ways more flexible than Ruby - you can redefine existing control structures like if and while, or create new ones of your own (such as do ... while, which is not part of the core language).

    1. Re:Lisp, Smalltalk, and...Tcl! by shutdown+-p+now · · Score: 1
      Perhaps you should look at Lisp/Smalltalk/Your favorite academic language not being able to market their way out of a wet paper back:-) If they've had since the 70ies to build something that'll take off, and they haven't, they're doing something wrong, and it sure isn't the languages themselves, because they are very nice indeed.
      I guess it is largely because academia is not normally interested in (or even capable of) proper marketing. And now it's too late - the field is already dominated by languages such as C++ and Java, and noone is going to rewrite thousands of libraries, frameworks and IDEs out there. The rewrite is still going on as languages themselves evolve, of course, but it is much more of an evolutionary process.

      Right now my main hope lies in C#. It has already got full-featured closures ("anonymous delegates") and decent generics in 2.0, and next major version promises even more candy.

      Though there is also weak hope that someone will make a full-featured Common Lisp implementation for .NET one day...

    2. Re:Lisp, Smalltalk, and...Tcl! by schlenk · · Score: 1

      Tcl isn't commercially dead. Its just nearly invisible for most commercial uses.

      You have:
      - BSD license -> no need to advertise the use
      - Easily embedabble -> no simple sign of tcl in the filesystem if done right
      - highly configurable -> You won't recognize many Tcl scripts as Tcl if you see them, because you can do radical domain specific languages including new control structures, new object oriented paradigms, new assignement operators, etc. etc.
      - stable and well tested -> You don't have as many users crying out because things are obscure, cryptic, under documented or plain stupid
      - binary compatibility for extension since Tcl 8.1 (about seven years!!) -> With the Tcl stubs layer you don't need to compile all your extensions for use with a newer Tcl version, unlike many other dynamic languages, where C-coded extensions need to be in version lockstep, so you don't see as many 'maintenance releases', because they are not needed.

      But if you generalize from a view 10.000 ft above reality, you may come to wrong conclusions.

      Michael

    3. Re:Lisp, Smalltalk, and...Tcl! by mikemulvaney · · Score: 1
      which is in some ways more flexible than Ruby - you can redefine existing control structures like if and while, or create new ones of your own (such as do ... while, which is not part of the core language).

      Its interesting that you think flexibility is a selling point. Did you read the article? One of the main conclusions is that Ruby on Rails is successful precisely because it is not flexible. It sacrifices flexibility for conventions, which simplifies a lot of code (AFAIK -- I have never used Ruby, but I did RTFA).

      I really hate it when languages let you do things like redefine 'if' statements. We had a lengthy debugging process when we found out a previous developer redefined $[ to 1 (meaning that array subscripts start at 1 instead of 0) in some perl script. do you really want to write a bunch of code that says:

      $x[$[ + 3];

      instead of just

      $x[3]

      ? flexibility is usually bad. (And perl basically took this away in 5.something, I think)

      Its almost always better for everyone to do things the same way. Its why Java beat out C++, its why XML beat out SGML, and according to the article, its why Ruby on Rails is so popular.
    4. Re:Lisp, Smalltalk, and...Tcl! by schlenk · · Score: 1

      I think you miss the point here: - Flexibility of the language means you can create a more powerful domain specific language - Convention over configuration means you have reasonable defaults RoR has both. The flexibility of Ruby was used to create a powerful domain specific language for creating database backed website: Ruby on Rails This domain specific language has very reasonable default settings and the right language constructs for the problem domain, which make further configuration unnecessary for most cases, also you can configure things if you have to. Tcl is more powerful in the 'flexibility' domain then Ruby, you can create more powerful domain specific languages with Tcl then you can with Ruby. No one did yet for the web domain. Your Perl examples just shows a programmer going to where madness is. If you define a powerful domain specific language you raise the abstraction level for solving your domains problems. This brings you the increase in productivity RoR shows so dramatically. Designing a good domain specific language is hard. If you just litter shorthand notations in your code you don't design a good domain specific language, you define shorthands to save some keystrokes, but do not raise the abstraction level. Michael

  80. Yes, the Founding Fathers are conservative. by Anonymous Coward · · Score: 0

    You're thinking of the Founding Fathers relative to Europe. Yes, they were liberal in that case. However, at the moment we're discussing America. So while they may have been liberal in Europe, today their beliefs form the true basis of conservatism in America.

    That is evidently correct according to your definitions, as well. The traditions we're talking about in this case are those of the Founding Fathers. So anyone who follows their traditions of freedom, liberty and justice is indeed a conservative.

    Remember, 'American conservatism' is all about freedom. From an American political standpoint, the only fairly mainstream party truly following such conservative traditions is the Libertarian Party. Most Republicans these days are best classifed as neoconservatives, who basically have nothing in common with the true conservatives. And of course the Democrats today are basically the same as the Republicans.

    It is quite correct to state that a license like the MIT license, which aims to maximize freedom for all parties (even those who wish to proprietarize a piece of MIT licensed software), is indeed conservative from an American viewpoint.

  81. Re:RoR hype == good product + good marketing. Peri by Anonymous Coward · · Score: 0

    they even use PHP for the official Ruby on Rails site!

    Nope

  82. Perl vs. Ruby: sigils by Santana · · Score: 2, Informative

    The heavy use of sigils is not Ruby's fault, it's yours. I've written a lot of Ruby code and have rarely used sigils.

    Sigils in Perl are mandatory and define whether a variable is a $scalar, a %hash, an @array or a &block of code. Ruby's sigils define scope: local (no sigil), @instance, @@class or $global variable, which is a good approach since it let's you know instantly whether a variable is local to the block of code or comes from another scope, which is far more important than its type.

    So, unless you're using a lot of global variables, you shouldn't be heavily using sigils.

    Finally, I don't see anything wrong with having regular expressions as part of the language. But if you don't like that, nothing stops you from using Regexp and Match objects.

    --
    The best way to predict the future is to invent it
    1. Re:Perl vs. Ruby: sigils by cduffy · · Score: 1

      I've written a lot of Ruby code and have rarely used sigils.

      I'm surprised you don't use instance variables much.

    2. Re:Perl vs. Ruby: sigils by Santana · · Score: 1

      Then you'll be surprised too if you pick an important Ruby piece of software, let's say ActiveRecord, and see that not many sigils are used.

      I wonder why you need to heavily use instance variables.

      --
      The best way to predict the future is to invent it
    3. Re:Perl vs. Ruby: sigils by LatinRoots · · Score: 1

      I have no problems with a sigil giving both the interpreter and myself scope information, and since Ruby is a very dynamic language without any sort of variable declarations I don't see how else the interpreter could determine scope, but if you never want to see the @ sign again, here you go...

      class Klass Object
          # create instance variables @num1 & @num2,
          # instance accessors Klass#num1 & Klass#num2,
          # and instance mutators Klass#num1= & Klass#num2=
          attr_accessor :num1, :num2

          def add_nums
              var1 + var2 # note, these are method calls
          end
      end

    4. Re:Perl vs. Ruby: sigils by cduffy · · Score: 1

      since Ruby is a very dynamic language without any sort of variable declarations I don't see how else the interpreter could determine scope

      Something longer, more explicit and less line-noisey than sigils... like "foo" versus "self.foo" versus "Klass.foo" (actually, the last one sucks, and I wish Python had a better way to do it).

      That said... if newcomers can get over Python using whitespace (which, while a frequent up-front objection, comes to be appreciated by folks who've used it a while), I can probably make another attempt to get over Ruby using sigils.

    5. Re:Perl vs. Ruby: sigils by Doctor+Faustus · · Score: 1

      Ruby's sigils define scope: local (no sigil), @instance, @@class or $global variable
      Dude, I think you just sold me on Ruby. I've wanted a language with explicit scope for ages.

      Of course, I still can't use it at work...

  83. Re:RoR hype == good product + good marketing. Peri by Anonymous Coward · · Score: 0

    Um, aparently they do:

    http://www.rubyonrails.org/INDEX

    ----
    Multiple Choices
    The document name you requested (/INDEX) could not be found on this server. However, we found documents with names similar to the one you requested.

    Available documents:

            * /index.php (common basename)
    ----

    Though perhaps they're just slapping on PHP extensions, but I don't know why they would.

  84. Easy one by arodland · · Score: 2, Funny

    The secret sauce is "Hype". And if you lift the bun, you find that there's more secret sauce than meat.

  85. 5 to 10x more productive than Java? by Anonymous Coward · · Score: 3, Insightful
    If you know java, I simply find that hard to believe. If you don't know it, maybe you've taken a class, read some books on JSP, you "can write it." It starts to be more reasonable. There might be some O(1) type operations like the initial setup that can be done in Rails in a hour vs. the full work day for Java or something like that but very little in terms of actual production.


    The crux of the problem with that argument was brought up by the author of webwork, if I'm not mistaken. If you're coding so much that you really can get a 10x improvment then you're clearly not doing enough design work to be making an app that's worth shit, regardless of the tool. Rails doesn't cut down on the thought time.


    DHH kind of tries to disown that comment when he's challenged on it. It's just rails marketing and hype, someone has whispered "10x faster" and they repeat it but they don't stand behind it. One thing that you can bank on, there is a lot of hype around rails, the people who make it are responsible for contributing to that hype and there is very little in the way of concrete information about these outlandish claims.


    It's okay at what it does. I personally don't care for the hype and I generally distrust when all you have is hype.


    Something else to consider, rails by design scales by pushing everything in to the database. They have some minimal caching at the web tier but none at the db tier. You need to render more pages, buy a bigger database, that's the quick answer and they suggest that it works because "yahoo does it that way" This is kind of an, um, interesting way to address scalability. I like how they make sure that they compare rails to what yahoo does too, it's just a quick and subtle comparison but it works and leads you to believe that you could do something yahoo like in rails, when it couldn't be further from the truth. Activerecord doesn't exactly conserve queries, some fairly simple joins seem to result in a lot of queries and it's kind of heavy. It's sales and marketing's way of saying they haven't really addressed the issue. To be pragmatic about this, why on earth are there all the elaborate caching schemes in EJB and J2EE and JDO? Surely people didn't just think it was something fun to build, I know the rails crowd seems to hate java but don't they think anyone with any real skill worked on it ever? I buy the j2ee is complex argument but I need to understand their argument for the complexity being unneeded. If you're planning to move on to a different project before it actually has to scale, that's not really an argument. From my own experience building clustered j2ee apps, scaling by just shoving everything into the db and hitting it for each page simply isn't a practical option if you have any real traffic.

    1. Re:5 to 10x more productive than Java? by Anonymous Coward · · Score: 0

      1. i don't think ror is any less complex than j2ee. however, ror tries to remove much of the complexity from the programmer - the language and the framework handle much of the complexity that the j2ee folks have to battle face to face. sort of like specifying "background: #fff" vs having to write all the code to do it from scratch.

      2. you might be right on the use of the db - i'm not far enough along to know. if it is important, bring it up on the mailing list or the irc channel. ror has a lot of defaults - and not everyone likes them. however, i've found that most things people complain about can be overridden to work other ways. this may be true here, too.

    2. Re:5 to 10x more productive than Java? by jfmiller · · Score: 1

      Activerecord doesn't exactly conserve queries, some fairly simple joins seem to result in a lot of queries and it's kind of heavy.

      Wht you say is for the most part correct. If queries are a problem (they arn't for the vast majority of small web apps) then you need to do a little intelegent programming. Rails will let you do this but you have to ask nicely.

      Your comment about joins above is a common optimization in Rails that is in the docs somewhere where it is not obvious. Rails does not automatically do JOINs because it has no idea if you will need all that data and asumes you don't. If you need a join add an :include => statment to any of ActiveRecord::Bases find like methods. For example if you know you are going to look at all the books an author has writen do this:

      Author.find_by_department('cooking', :include => :books).each do |author|
          author.books.each {|book| puts book.isbn}
      end


      --
      Strive to make your client happy, not necessarly give them what they ask for
  86. Talking out my ass... by localman · · Score: 2, Insightful

    I haven't used Ruby or Rails. I only read the ten minute tutorial that got posted here a while back. Actually reminds me a lot of a object wrapper I wrote for perl that built class heirarchies automatically from a DB schema. It was pretty cool if I do say so myself, and so is Ruby on Rails.

    However: I don't think it matters. In my experience it doesn't matter that much what programming language or model you use. Object oriented or procedural, strongly typed or loosely typed, monolithic or microscopic, chocolate or vanilla. Everything eventually bows to the reality of inherent complexity. I've seen each style done right and wrong, and if they're done right, the differences sort of wash out over time. My prediction is that Ruby on Rails is great for prototyping, but if you ever have a large buisness project that grows and develops for years it'll end up no more productive and maintainable than any other competently written code base, and probably no less productive either.

    I'm not saying none of these choices matter: they do. There are certain things I've written that are much more sensible OO than procedural and visa-versa. In the end you make decisions on how to go about a particular project, and if you've made the right ones five years later you can still carefully move at a crawl and bring new people into the codebase with only a few weeks of training. And I don't think any technology shift will notably beat that. I'm still a believer that there's no silver bullet that will make development (especially long term development) a breeze.

    But what do I know? Use what makes sense to you.

    Cheers.

    1. Re:Talking out my ass... by Anonymous Coward · · Score: 0

      not so much.I.e. what you say makes sense.

  87. The parent is an honest complaint by Anonymous Coward · · Score: 0

    Ruby is sorely lacking unicode (not that other languages do so hot). Otherwise Ruby is great.

    1. Re:The parent is an honest complaint by Dasch · · Score: 1

      Yup, but it's coming in Ruby 2.0!

    2. Re:The parent is an honest complaint by achacha · · Score: 1

      Unicode is a sore on the face of programming. UTF-8 may not be superoptimal but it definitely makes life a lot easier when dealing with L11N and I15N. This is more than just "Speak English Or Die" mentality, it's more of efficiency and in many cases ASCII is more than adequate for the program, yet it has to cater to double size characters that eat up memory with pretty little zeros everywhere.

  88. So what you're saying... by James+A.+V.+Joyce · · Score: 0

    ...is that you'd have to be tripping to use Ruby on Rails? Sounds about right.

  89. Re:Rails zealots aren't hammers, they're just tool by Maskull · · Score: 1

    What I would think would be really cool is a Lua plugin for Apache.

    Google for "mod_lua".

  90. I thought the secret to Ruby on Rails' success was by jonadab · · Score: 1

    Alliteration. Ruby on Rails: it just _sounds_ good.

    What it actually _is_, I don't know. I know approximately what Ruby is, although not intimately, but I have no idea what the rails signifiy in technical terms, although they presumably connote rapidity of some sort. If I were a Ruby programmer, I'd certainly want to know what this Rails thing is all about.

    Whether it sounds good enough to make me (as a Ruby outsider) want to learn the language is another question. Frankly if I were to learn Ruby it would probably be more due to the good things I have heard about it from sources like perl6-language, than due to Rails, because whatever other tools you use the quality of the core language is critical to their usefulness, so as a programmer it's the style of the language I want to know about first. (This is part of why I never picked up Java: the GUI libraries it comes with are supposed to be really great, but nobody with similar tastes in languages to mine ever has many attractive things to say about the design of the language itself; Ruby, OTOH, does regularly get positive comments from people whose opinions on language design I respect greatly.) Nonetheless, if I *did* take the time to learn Ruby, and if I found that I liked it as a language, Rails would definitely go on my to-learn list then, *despite* that I don't actually know what it does. Because, you know, it just sounds good. Probably looks good on a resume too.

    --
    Cut that out, or I will ship you to Norilsk in a box.
  91. Isn't that... by Tatsh · · Score: 0, Offtopic

    ...the gayest name EVER?!

  92. scaling rails by jbellis · · Score: 0, Flamebait

    "This means it already overcame the greatest hurdle of any web-development framework from day one"

    You give Rails far too much credit.

    First, among popular development environments, anecdotal evidence strongly suggests that Rails is _hardest_ to scale in the sense of "serving lots of pages really fast," mostly due to Ruby itself being pretty damn slow. I'm not a J2EE snob trolling here: it really is. For small sites this doesn't matter because your glue language is much less of a factor than hitting your database, but as you start caching appropriately and so forth Ruby really does become a liability.

    Now, Rails does make it easy to scale in the sense of "if I throw more hardware at the problem, throughput improves." But this is not a difficult problem. Arguing that "[m]ost Scheme/Lisp frameworks, for instance, still haven't achieved [that] level of scalabilty" is silly and probably false, but I'm not enough of a Lisp weenie to know. I _do_ know that Python, PHP, Java, TCL, .NET, hell, even Objective-C frameworks manage it. It's a solved problem; bragging about it just makes you look clueless.

  93. Scaling... by fak3r · · Score: 1

    I'm reading more and more about how ROR as a web app scales very well for large scale sites. For yself I'm learning how to do some advanced things with it, here is my HOWTO speed up ruby-on-rails with memcached:

    http://fak3r.com/articles/2006/05/11/speed-up-ruby -on-rails-with-memcached

  94. Re:RoR hype == good product + good marketing. Peri by Anonymous Coward · · Score: 0

    Hah, that's pretty funny. Apparently they *do* use PHP for parts of their site, as the creator admits.

  95. Hype by Junky191 · · Score: 1

    There is no special sauce. It's just the latest hyped toolkit that will be gone next week. Look for Jarva or D++ or whatever trendy new thing pops up in software next week that does absolutely nothing.

    Listen kids, there is no silver bullet. For all you folks that dropped out of college/high school who generate the ad clickthroughs that make these stories submittable: Fred Brooks, The Mythical Man-Month. Read it.

    1. Re:Hype by chromatic · · Score: 1
      Listen kids, there is no silver bullet.

      Read the whole chapter, not just the title. Brooks argued that no single technique offered an order-of-magnitude improvement. The last part of the chapter describes several techniques which, when combined, may improve productivity.

      The important question is instead "Does Ruby on Rails take advantage of multiple techniques to bring about an improvement in productivity?"

    2. Re:Hype by jfmiller · · Score: 1

      I have a professor that liked to call thinkg like Ruby "Silver Plated Bullets". They arn't the perfect solution, but they are better then a rusty stake knife. (a.k.a. PHP)

      JFMILLER

      --
      Strive to make your client happy, not necessarly give them what they ask for
  96. secret sauce is herione by Anonymous Coward · · Score: 0

    ROR is just a tool. like all tools, it's good for certain things and some people find it useful. It's no magic bullet, but the ROR crowd feels like they have a magic sauce. The sauce is herione from crack addicts like Bruce Tate who feels a need to sell more books and call himself smart, a thought leader or what ever bullshit title he thinks is appropriate.

  97. Re:Rails zealots aren't hammers, they're just tool by bloodroot · · Score: 1

    Actually there's only one ruby lucene port, ferret, which is now written in c.
    It's running plenty fast for me.

  98. Roll your own MVC? by Anonymous Coward · · Score: 0

    I don't understand the advantage of a pre-designed framework, MVC really
    isn't that difficult to implement.

    I find that, rolling my own MVC results in exactly what I need, nothing more. Simple and very easy to follow.

  99. Biggest downfall of rails is not even mentioned by Jondo · · Score: 3, Informative

    I've used rails for only a few months, but already have quite a good understanding of how everything works, and have even done some hacking/patching on the backend. I've also used ActiveRecord with some applications that are not web-based, all with good success. I love every convention in Rails, except for one, which I dearly hate.

    ActiveRecord was designed quite obviously from the perspective of a MySQL user. The train of thought that a DB should only be a place to dump your data and nothing more is extremely prevalent with ActiveRecord. Things like referential constraints on foreign keys are completely ignored/not used, instead being defined in entirety in the model code. Perhaps my biggest aggrivation with ActiveRecord however is that it assumes I implement enumerations as varchar datatypes. I find this just plain wrong. Here's an example:

    ActiveRecord way:
    CREATE TABLE Users (
        id integer primary key,
        username varchar,
        usertype varchar
    );

    ActiveRecord will then use its single-table inheritance logic and each subclass of User eg "Administrator" will have that name in the usertype field, stored as a string. From a data-modelling perspective, I find this so wrong. I naturally implement this using an extra table of usertypes and a foreign key in Users:

    CREATE TABLE UserTypes ( id integer primary key, type varchar);
    CREATE TABLE Users (
    id integer primary key,
    usertype integer references UserTypes(id)
    );

    I have managed to get ActiveRecord to play somewhat nicely with these types of constructions by redefining some class methods in ActiveRecord::Base, but I'm definately violating DRY.

    This all said, and including the time I needed to spend hacking around in the ActiveRecord code, I am still more productive with Rails. Highly recommended, just with a hint of caution towards ActiveRecord paradigms and database integrity.

    1. Re:Biggest downfall of rails is not even mentioned by taybin · · Score: 1

      Actually, the reason Ruby's migrations (which is what you're talking about) doesn't support foreign keys is *because* not all databases support them. If they were just looking at MySQL, they would have been thrown in as well.

      The first edition of Agile Web Development with Rails didn't use migrations, but added the tables by manually and used foreign keys in the examples.

    2. Re:Biggest downfall of rails is not even mentioned by nuzak · · Score: 1

      > Actually, the reason Ruby's migrations (which is what you're talking about) doesn't support foreign keys is *because* not all databases support them.

      No, he's not talking about migrations, he's talking about ActiveRecord. AR will not look for foreign keys in your schema when scaffolding your model objects, and you need to repeat the relations instead. The sole reason for this is MySQL. Or at least their excrable MyISAM table type (which the system catalog uses ... you feel lucky when using GRANT?)

      Even Access supports foreign keys.

      --
      Done with slashdot, done with nerds, getting a life.
    3. Re:Biggest downfall of rails is not even mentioned by jfmiller · · Score: 1

      Amen.

      The nice thing about the Ruby framework though is that you can glue a solution into either your model or ActiveRecord::Base that will make stuff like this work. With other frameworks I've tried, either you had to reinvent the wheel every time or you were perminatly stuck with whetever cheep tire came with the thing.

      JFMILLER

      --
      Strive to make your client happy, not necessarly give them what they ask for
  100. Ruby is not a 'wrapper over C++' by kahei · · Score: 1


    Ruby programs run in an interpreter written in C/yacc. The interpreter is slow and problematic (threads, unicode, it's all been said). Since ruby is defined by this one interpreter implementation (there's no written standard and the only way to create one would be by _fully_ understanding the interpreter), this tends to form a ceiling on Ruby's scalability.

    --
    Whence? Hence. Whither? Thither.
  101. Hype, Fanboyism by fforw · · Score: 1

    I think most of the attention ROR is getting is just hype and secondary hype. The first wave of hype drew a lot of PHP developers (90% without any real clue about programming) to evaluate ROR. And of course, compared to PHP ROR is like a gift from heaven.

    After the hype around it persisted I tried it out myself. My impression was that it is nice but nothing worth that much hype -- plus I don't really like Ruby that much, its syntax seems to make too many things different just for the sake of it.

    The good thing about ROR is that it belongs to a new current breed of web development framework putting emphasis on rapid, easy development. I like the pythonic Turbogears very much (especially the upcoming 0.9 release).

    --
    while (!asleep()) sheep++
  102. Sorry, but you are wrong. by master_p · · Score: 1

    1. Hierrarchical structures and hash tables are not related in any way. The advantage of easy declaration comes from syntax and not from hash tables. A language with syntax that allows easy declaration of hierrarchical structures has the advantage over a language that does not offer such a functionality, but overall this has nothing to do with hash tables. You could do the same thing in LISP and in a much better way.

    2. Declaring members within methods is a bad practice: it makes maintenance more difficult. Suppose you want to change a member's name from @foo to @bar; the compiler\interpreter will not inform you that you did not change all references of @foo; now your object will have two members @foo and @bar.

    3. The VM does a loopup in a map or a table. If the relevant entry in null, the method is declared as missing. But changing methods of a class at run-time is not good, because it allows the programmer to easily violate the contracts of the class. Not only you have destructive update in Ruby (please search online why destructive update is the root of all problems), but you can also change methods on the fly. Furthermore, LISP's 'defmacro' has nothing to do with methods: the 'defmacro' function introduces a new function which is to be invoked at compile time (thus a 'macro').

    4. Scalability is not a factor of language, but of framework. Don't you think that J2EE scales well?

    5. A web development system is not a messy undertaking; in fact it is very easy to build a web framework, since a web application is nothing more than a message-driven application. There are various frameworks in the market which make web development very easy in all languages (even C++ with FastCGI is a good solution).

    6. There are Java frameworks that do not have a "pre-processor", like Echo, for example: all you have to do is write a web application as a desktop one, replacing Swing views with Web Views. I agree it is a bad idea to write Java within HTML, but you are presenting Java as if it is not capable of having a "language only" framework, i.e. a framework without XML/HTML, which is totally wrong.

  103. Re:My problem Ruby on Rails by Anonymous Coward · · Score: 0

    I followed the instructions here http://www.rubyonrails.org/down on Windows XP and it worked straight away.

  104. Tagging by cerberusss · · Score: 1

    I tagged this one as sauce. Nobody else did. Tagging ROCKS! :D

    --
    8 of 13 people found this answer helpful. Did you?
  105. Re:RoR hype == good product + good marketing. Peri by telbij · · Score: 1

    Why, they even use PHP for the official Ruby on Rails site!

    That's because it's a website not a web application. The strength of PHP is for a little dynamic code here and there as you need it. The strength of Ruby on Rails is developing web applications.

  106. Ruby on Rails by StupifiedT · · Score: 1

    Hey guys I am a student and I have been working with ruby on rails for the past 4 months. I have to say taht I dont like it. I find that it is a pain to learn a new programming language just to use it. Instead of HTML ruby on rails uses RHTML. This is a pretty easy code to learn and use but I still dont enjoy it. However I am impressed at how quickly you are able to set up a web site. I havnt been able to make a very good looking website but i was still able to make it quickly. Over all I think that RoR is not as great as I thought it would be and I prefer the old way of making web sites with DreamWeaver and Photoshop. I know that RoR is all free software which is good but I think that the price is the only good thing about RoR.

    1. Re:Ruby on Rails by youthoftoday · · Score: 1

      Hm. What kind of student? How old are ye? You've got the wrong idea. RoR is a
        *ahem* scripting framework for writing web-applications. The bit that does the 'thinking' on the server. You're still putting HTML in the View files, the .rhtml file extension just tells the server to interpret the <% bits. You can still develop your code in Dreamweaver and Photoshop (if you choose).

      Incidentally, I think that the whole native separation of View and Controller alone brings RoR about 200% above PHP in terms of dev speed. Even if it ain't unique to RoR, it's probably one of the most accessible frameworks (to the masses) to pit against PHP in the more casual arena.

      --
      -1 not first post
  107. If you like RoR, try TurboGears by Eil · · Score: 1

    TurboGears is similar to Rails, but in Python. I don't believe it was inspired by Rails, but the TG people are using the Rails momentum to guide development (in terms of what's working for Rails and what isn't) as well as borrowing a few marketing ideas. (For example, the 20-Minute Wiki tutorial.)

    I'm neither a RoR or TurboGears guru by any stretch, but near as I can tell, these are the main differences between Rails and TurboGears (real gurus are welcome to correct/add to this list):

    1. No need to learn a new language (if you already know Python). Relatively few developers knew anything about Ruby before RoR became a hit, while lots of people know Python.

    2. TurboGears comes with less magic built-in. Which is actually a boon for most people because a few that I've talked to thought that all of the magic in Rails ended up making non-trivial applications hard to both develop and debug. TurboGears is much more verbose. Sure, you have to write a few more lines of code for many typical tasks, but you also have a much better idea of what's going on in your application and can debug it quickly when it breaks.

    3. TurboGears ties together several pre-existing projects into one framework rather than rolling their own. This offers a couple of nice benefits. First, it's less work that the TG developers have to do. They neither had to write nor have to maintain much of the code that TG rests upon. Second, it's possible that one sub-project can be substituted for another later on down the road. (I understand that they're already using this feature and are in the process of migrating SQLObject out and bringing SQLAlchemy in.)

    4. Better documentation. Python is already exceedingly well documented and the TG folks are going out of their way to make sure that their framework is documented just as well. By contrast, if you're just starting out with Ruby and Rails, the best documentation available right now is a Ruby book and a Rails book, both by the same publisher. Part of the reason I didn't go too far into Rails was because I couldn't afford to invest in the books at the time. (There is a TurboGears book in the works by Mark Ramm which should be out later this year.)

    Of course, one potential downside to TurboGears is that you have to learn how the various sub-projects work in order to use TurboGears. But they're not all that hard and are probably about the same amount of effort to learn as all of Rails.

    There are also a couple other really nifty things about TG that I'd like to mention. (I don't know if rails has these or not.)

    The templating engine, Kid, allows you to draft up a template and give right to your web designer, with placeholder text and all, and have them hack on it in Dreamweaver or whatever they use. When they're done, just copy it back into TurboGears and it simply works. Kid uses real HTML tags and attributes, so web browsers can view the templates directly and HTML editors can edit them without mucking up the template-specific stuff.

    CatWalk, the built-in AJAX database editor can be enabled in your TurboGears app by inserting like two lines of code. Talk about sweet.

    1. Re:If you like RoR, try TurboGears by nuzak · · Score: 1

      > 4. Better documentation.

      You have got to be joking. The documentation for RoR is poor, but for TG it's simply abominable.

      Catwalk's nice, but SQLObject only (I prefer SQLAlchemy since I use custom operators in Postgres). I'd rather have breakpoints. Pylons has some interactive debugging, but the extent of TG's error handling is to dump a traceback at you, which I think is actually just CherryPy's default behavior. Hell, with Kid, it doesn't even bother to show you the location in the template with the error.

      TG's got some promise, but still has ground to cover.

      --
      Done with slashdot, done with nerds, getting a life.
  108. Good God! by Run4yourlives · · Score: 1

    If you don't realize the issues with putting logic into the database (never mind the performance hit) you've got some serious learning to do.

    If you're looking for "advantages", I would suggest MVC architecture in general. Without that basic understanding, you will never see the benefits in Ruby/Rails.

  109. Easy Answer by Run4yourlives · · Score: 1

    Rails solves problems. Plain and simple. It was built from day 1 to address a specific problem, (basecamp) and now the creators have found that a lot of people have very similar problems to solve. That's it. That's why it's so good.

    It does not try to solve every problem, like J2EE. It is not a solution looking for a problem, like it's many Python-based cousins. It won't solve every problem, and makes no claims to do so.

    But if your problem is a web-application with a (smallish) number of variables, RoR is a godsend.

  110. Please by wurp · · Score: 1

    Do not associate 'secret sauce' with 'porn'. I had a Big Mac for lunch, and it brings, er, unsettling images to mind.

  111. Re:Rails zealots aren't hammers, they're just tool by Anonymous Coward · · Score: 0

    ...when implemented well (as Hibernate does).

    You're joking, right? Hibernate has so many flaws as to be almost unusable for large projects. We evaluated it for our project and found that Hibernate wasn't performant for anything beyond simple simple 1-1 domain-object-to-table mappings. We ended up going with a custom persistance solution based on code generated from Java5 annotations on our domain objects (and yes, we know that annotating model objects with persistance logic is bad practice, but it saves us so much work that we chose to do it anyways). Our generated queries are just as fast as Hibernate for simple 1-to-1 mappings and up to 4 times faster for more complex logic. Our implementation (which admittedly isn't wrapped in as nice a user interface), implements the same pattern as Hibernate and is much more flexible and performant.

    Is it possible to get more performance out of Hibernate, definitely. There are experts who understand the inner workings of Hibernate that can bring it closer to our performance metrics. However, if you read the Hibernate boards, you'll see no shortage of discussions about working around bizarre Hibernate behavior. So much so that we decided it wasn't ready for prime time.

    So yes, Hibernate out-performs ActiveRecord...it would be hard not to. But Hibernate is still a pretty poor implementation of the DataMapper pattern. Not that SQL Maps, EJB 3 or TopLink are/will be any better.