Slashdot Mirror


Thinking about Rails? Think Again

wolfeon writes "In 2005, Derek Sivers of CD Baby wanted to scrap his site and perform a rewrite in Rails. He hired Jeremy Kemper, also known as bitsweat on Freenode, to help on the project. Two years later, through blood and sweat, the project was then canceled because of limitations of Rails. Rails just wasn't meant to do everything since it is very much "canned" project. Mr. Sivers has written an entry in the O'Reilly blog: 7 reasons I switched back to PHP."

4 of 482 comments (clear)

  1. (I'm the author of the article) - Please read: by linuxbaby · · Score: 5, Informative
    Hey gang -

    Longtime Slashdot reader, surprised to find my little personal blog post on Slashdot today, especially since the lead-in description framed it with the completely wrong point.

    I never said "the project was cancelled because of limitations of Rails" - more like I spent two years trying to make Rails do something it wasn't meant to do, then realized my old abandoned language (PHP, in my case) would do just fine if approached with my new Rails-gained wisdom.

    That's all.

  2. Re:thinking about something new? think again by Anonymous Coward · · Score: 3, Informative

    I'd just like to point out that the parent is decieving. He's not a programmer. According to his website, "Bill is employed by Century College working on developing new recruitment and retention programs." I seriously doubt that means programs in the slashdot sense.

    He's just pissing in the GP poster's cornflakes; he isn't for real and should be modded appropriately. His only technical qualifications seem to be messing with his own blog, which he describes as "working on the website."

    Don't take my word for it though -- follow the links and decide for yourself how technical Bill might be. I personally have formed the opinion that he's a cereal-pisser.

    Here's his own list of articles with a more technical bent:

    http://www.lazylightning.org/taxonomy/term/6

  3. Re:thinking about something new? think again by TheRaven64 · · Score: 3, Informative

    * a rich standard library with a good reference Common Lisp probably wins here. The Common Lisp spec is a weighty tome filled with small writing. Smalltalk doesn't really have much of a standard library, but the most popular implementations have quite large ones. If I can add Objective-C to the list, OpenStep is pretty close to a standard library for Objective-C and is a joy to use.

    * a good extended library like CPAN Hard to answer without understanding what it is you like about CPAN. There are a huge number of Common Lisp libraries around (from FastCGI to OpenGL bindings). Squeak (Smalltalk) has its own system for distributing third party libraries. Not sure about Haskell and OCaml. There is a huge amount of Objective-C code out there too, although a fair bit of it is Apple-only.

    * easy extension in C This is where Objective-C totally wins over everything else, since it's a pure superset of C. There is a standard mechanism for calling C from Lisp code, so it's fairly easy. Calling C from Smalltalk depends on the Smalltalk you use; it's hard in Squeak, but pretty easy with GNU Smalltalk. Not sure about Haskell and OCaml.

    * good documentation Lisp has a huge amount of documentation. Smalltalk does, but it tends to be specific to a given implementation (although modern Smalltalk tends to be a superset of Smalltalk80, so the older the documentation, the more likely it is to be applicable).

    * easily available compiler, etc. There are a few Smalltalk implementations around. The popular free one is Squeak, which is close to the original Smalltalk. There is also GNU Smalltalk, which is file-based, and so closer conceptually to other languages. For Common Lisp there are lots of compilers, but the best Free one is Steel-Bank Common Lisp (sbcl). There are a few Haskell implementations available. The one I learned on was HUGS, but I think GHC is more popular. For OCaml, I've honestly no idea. For Objective-C, the only compiler anyone really uses is GCC (although, no doubt the author of POC will no pounce on me and tell me he and at least one other person use it).
    --
    I am TheRaven on Soylent News
  4. Re:Why rewrite existing systems? by tacocat · · Score: 3, Informative

    Ruby is nice, Rails has some severe limitations on what it can do without major hacks.

    Examples:

    Business Model versus Business Rules

    There is a distinction between the Rules and the Model. Rules are those things that must be enforced against the data. Examples of this would be (in database terms) referential integrity, unique values for certain fields or combination of fields.

    Without this distinction you can easily run into rampant data duplication and your ability to determine what is actually going on becomes a major challenge. Rails fails on this enforcement of the rule because when you identify something as being unique according to Rails, it's managed by a Model declaration to check for uniqueness before making an UPDATE/INSERT SQL execution. Problem with this is you are assuming that you have only one active rails session at a time. If you don't, then it's trivial for two web sessions to insert the same username in the table, thereby fucking your database and your business. Without the database actually enforcing the data through database constraints, you cannot guarantee the results.

    Things get even more difficult/tricky when you have to ensure that combinations of fields remain unique or referential constraints are preserved.

    I'm know there is some way to do all of this in Rails, but it's counter productive and essentially a hack. For example -- I would have to create additional unique SQL constraints in the database migration files, in some cases, I have to write out the SQL directly -- bypassing that which is Rails. Then the Model would not only have to run the extraneous SQL statement to check for uniqueness, but also be modified to accomodate the error handling that is going to happen when you violate the database integrity. Again, this makes for a lot of non-Rails and non-elegant code.

    Don't get me wrong, Rails is nice but it is not really going to be a useful product for some major site that is going to just get crushed in transactions. Do you really think you can open the next MySpace and have it keep all the data properly synchronized? I know it's possible to get around the application rules of the Model, so I know it's also likely to muck up your data.