Slashdot Mirror


What is Ruby on Rails?

Robby Russell writes "ONLamp.com has published another article by Curt Hibbs titled, 'What is Ruby on Rails?.' In this article, Curt goes on to discuss all the major components of the popular Rails web framework and shows it does a lot of the heavy lifting for you. This article highlights all the major features, from Active Record to Web Services, which are going to be included in the upcoming 1.0 RC release of Ruby on Rails. With one book published already and four more on the way, do you think Rails will continue gaining as much popularity in the coming year?" An interesting follow-up to the two part tutorial from earlier this year.

61 of 296 comments (clear)

  1. Re:YASLFFFSC by MemoryDragon · · Score: 4, Insightful

    Actually no, Rails has heavily inspired many developments in many languages over the last year. Pretty much every framework currently at least is looking at the stuff the rails guys are doing and whether some of the concepts are viable. Stuff like Seam which also is excellent is heavily inspired by the ease of use metaphor of Rails, and the Prototype javascript libary used by rails currently sort of becomes a defacto standard for more advanced javascript stuff with many projects building on top of it. Rails definitely does not scale into the average J2EE project dimensions, but it has its merits and definitely made huge inroads in the web development domain over the last year.

  2. Summary of thread by physicsphairy · · Score: 5, Funny
    "With one book published already and four more on the way, do you think Rails will continue gaining as much popularity in the coming year?"

    "Yes." -- some slashdotters
    "No." -- other slashdotters

    Oh, and your horoscope for today is "Give generously to people you meet online who make you laugh."

  3. Watch the demo... by fak3r · · Score: 4, Informative

    Before any bashes it as being a flash in the pan, watch the demo and see the framework that it provides and how natural it is to build webapps on top of. Truly an interesting language for the web.

    Speaking of, why don't you check out my Ruby on Rails/Typo based blog, fak3r.com ;) be sure to try out that 'live search' (try 'bsd') for a taste of RoR/AJAX fun!

    1. Re:Watch the demo... by fak3r · · Score: 5, Funny
      Wow - thanks to all that are hitting my site, I'm sitting here at work watching multitail try and keep up with all the requests on my home server! Typo uses Lighttpd (I have Apache2 running, but it's using mod_proxy to pass all requests to fak3r.com to Lighttpd) which is supposed to be 'lighter' and perform much better under load than Apache. I assume that's true because the logs are flying by, and the log from the Typo server is saying things like:
      Completed in 0.01254 (79 reqs/sec) | Rendering: 0.00618 (49%) | DB: 0.00146 (11%) [http://fak3r.com/articles/search?q=bsd%5D
      Am I reading this right? Most are coming up with 10-40 /reqs/second, but damn, this is on a homeserver (FreeBSD 6.0 - 1.2Gig - 512Megs) with a 384/1.5 DSL! I'm doing full refreshes here and not seeing any obvious lag - I've never had this much sustained traffic, but this looks very good for Lighttpd! (only been using it for this blog, which started ~ a week ago). Checking top I see 'ruby' but it's way down there, below multilog/tail and such... Hmm...need to check that migration from Apache to Lighty perhaps! ;)

      For those late to the party, that's fak3r.com! (just try and bring it down hehe...)
    2. Re:Watch the demo... by fak3r · · Score: 3, Interesting

      Yep, mostly what I'm seeing (apache's http-access.log and typo/logs) are straight web-server access (mod_proxy on apache -> lighttpd) but plenty of 'live searches' (which is why I suggested it) when fcgi (dispatch.fcgi) takes over and chats with the database. Still, even those are coming back faster than I'd expected. Yes, I've had 1 minute refreshes of the front page, but I didn't expect it to be perfect, I've just never had this kinda sustained traffic to study, and am really impressed with how Typo/Lighttpd are working.

      It's just something when it's a box that you built by hand from newegg parts, then installed/tweaked freebsd on, and then setup a new blog just a few weeks back, to see it perform.

    3. Re:Watch the demo... by consumer · · Score: 2, Informative

      Well, given those hardware specs, I would expect apache to be able to serve about 800 or so static pages per second. Your bottleneck is your bandwidth, so your choice of webserver is pretty much irrelevant here.

  4. Re:we already know by MemoryDragon · · Score: 4, Insightful

    Actually many web developers keep a constant eye on rails, I am heavy into J2EE and like it, especially the stuff which is coming along Seam, Spring, JSF and EJB3, but almost every one I know who works in the domain, keeps an eye on rails as a fallback option for quick small webapps. Besides that many concepts and libaries currently are heavily evaluated for inclusion into other frameworks.

  5. What is Ruby on Rails?. by CSHARP123 · · Score: 2, Funny

    I know this. This is that ruby going on the choo-choo train.

  6. Is Rails useful to aggregate web services? by shic · · Score: 2, Insightful

    I am intrigued by Rails and have the book waiting for me to read at home. I am curious, however, is Rails only really useful to implement something which uses the MVC (Model View Controller) architecture - where the model is defined in the context of a SQL RDBMS... or would Rails also be useful, for example, to aggregate a number of, say, local web-services to implement a single combined web service or site?

    1. Re:Is Rails useful to aggregate web services? by stevenprentice · · Score: 2, Insightful

      Rails is useful in so many ways. Rails is a very cohesive collection of components that make up a complete web development platform, but it is easy to use the indivdual components standalone.

      For example, I've used ActiveRecord by itself for database access. The application was a simple command-line utility that interacted with a local database. No web development, but ActiveRecord made it extremely easy to interact with the db.

      Another example, I've used ActionView and ActionController without ActiveRecord to create a non-database driven website. I did this to take advantage of the controller/routing features of ActionController and the layout and templating features of ActionView.

      Very useful stuff--either together or as separate components.

    2. Re:Is Rails useful to aggregate web services? by jazzyfox · · Score: 2, Informative

      The models in Rails are not required to be ActiveRecord (the SQL object layer) classes at all. You could have model classes that delegate calls out to another web-service like you describe, and even make use of some ActiveRecord facilities with a little more work to override the default functionality that hits up the database.

      As the article says, there are really two components to the framework, ActiveRecord and ActionPack, which handle the model, then the controller/view sections respectively. Each of these can be used without the other, in fact I'm considering using ActiveRecord for a non-web project in the near future.

  7. Strange Vibe from the Article by WhoDey · · Score: 4, Interesting

    TFA seems to be written by a used car salesman. Or maybe those guys on the infomercials late night for different "enhancement" drugs.

    1. Re:Strange Vibe from the Article by jallen02 · · Score: 2, Interesting

      I am pretty big on Java. I have done several years worth of Java work. I decided to finally try Rails out so I could finally see if the hype was worth it or not. I was *quite* impressed. I realize there are about 10 million concerns that pop into my head. Legacy applications, complex ORM mapping, ona nd on. But for new software it truly is amazing. Its fast and easy and it just seems to work. I am not generally to excitable about new technology I have seen a lot. When I was finished playing with RoR for about 4 hours the amount of working software I had was impressive.

      It has to grow a lot. However, if you are implementing from the ground up it is a rather solid choice. The architecture and tools are quite good. You can get hung up on the semantics of things if you want to.. you just can't argue with the results. Fast and easy. When I started describing my initial experience I realized I sounded just like a sales person trying to convince people about the greatness of something. So I can actually understand. Years and years of doing Java work and configuring XML and working hard at throwing out skeleton code. Generating getters and setters and connecting together several layers of components to all play nicely together. I compare that to Rails and it makes me wish I had this power all along. I have not tried anything truly complicated in RoR yet, but I will. I don't think Ruby, or RoR will let me down in the long run. Its such a light weight framework that you can easily grow it to fit your needs.

      Jeremy

  8. Finally, a breath of fresh air by some_canadian_hacker · · Score: 4, Interesting

    It's good to see that a structured methodology is being introduced into the world of web development. I've seen some really shoddy implementations of *SQL APIs into a myriad of differing web platforms, and because this helps to tie together the actual implementation of database-driven web apps, the developers are freeer to work on other things... security issues? Maintaining database structure? Doing the groceries? It doesn't matter all that much when less time is spent making the framework for a web application.

    Looks promising.

    --
    Your eyes are full of hate. That's good. Hate keeps a man alive. It gives him strength.
    1. Re:Finally, a breath of fresh air by Krimszon · · Score: 4, Insightful

      I can't feel frameworks take away my control. It's like I want to do all those things myself, even though I know I can't do it as good as them. Also, I don't know if I can ever really understand what it is, only that I have to type something like :scaffold whatever and I'll hit the ground running. Wonderful, but...

      I feel like the real skill of development lies in making stuff like that, and if it becomes defacto, all you do is build applications from building blocks. I feel it takes away some of the 'art' of development. You'd say, oh I build a nice webshop, and the other person would sya, what did you use, and your answer wouldn't be php, mysql, some html/css and javascripting. It'd be Ruby on Rails, of Smarty Templates combined with some Data Access layer, or a whole lot of those java spring/hibernate thingies. And all you did was tie up the ends.

      I know it makes no sense not to use it, it's much a better choice. Make more money, easier, faster. But still, there's that feeling, know what I mean?

    2. Re:Finally, a breath of fresh air by Phleg · · Score: 2, Interesting

      I feel like the real skill of development lies in making stuff like that, and if it becomes defacto, all you do is build applications from building blocks. I feel it takes away some of the 'art' of development. You'd say, oh I build a nice webshop, and the other person would sya, what did you use, and your answer wouldn't be php, mysql, some html/css and javascripting. It'd be Ruby on Rails, of Smarty Templates combined with some Data Access layer, or a whole lot of those java spring/hibernate thingies. And all you did was tie up the ends.

      Not at all; you have it all backwards. Rails ties up the loose ends for you, letting you actually do the artistic stuff that makes your program really go. You don't have to bother writing an ORM to your database, tying unit testing to your framework, creating your own templating code, etc., all the ends are tied together for you. It's up to you to write the contents.

      --
      No comment.
  9. Question about RoR by fatboy · · Score: 2, Funny

    Everything from templates to control flow to business logic is written in Ruby

    Uh, doesn't business logic belong in the database where the datagnomes live?

    --
    --fatboy
    1. Re:Question about RoR by PhilipPeake · · Score: 3, Funny

      You have been drinking too much Oracle Koolaid....

  10. Seaside ? by roard · · Score: 3, Informative
    While Ruby on Rails is nice, particularly for CRUD applications, I wonder why nobody speak of Seaside ...

    \begin{rant}
    Ok, I know, it's probably because it's written in that extremely complex and arcane language, Smalltalk... not. Smalltalk is extremely simple to use -- literally a child's play ;-)
    \end{rant}

    Anyway, Seaside is an incredible framework to develop Web Applications -- not just CRUD apps. It has a wonderful component system, inspired by WebObjects (another wonderful framework !), and leverage Smalltalk: you have compilation on the fly, you can modify something at runtime (and I mean, even without quitting the current web session !), use the incredible debugging/refactoring possibilities, and reuse of the zillions of libraries and code available for Squeak.

    More over, it has continuations. And that's really useful (as Paul Graham demonstrated..) for building neat webapps. Basically with Seaside you program applications nearly the same way you'd program a "normal" application. The whole HTTP process is completely abstracted (check the videos).

    Frankly, it's really a joy to develop with Seaside, and you should have a look :-)

    1. Re:Seaside ? by iggymanz · · Score: 2, Interesting

      Ruby has a heavy Smalltalk heritage, including the continuations. Just for fun, have a look at Borges , Seaside 2 ported to Ruby!

  11. forget Rails by the_2nd_coming · · Score: 2, Informative

    I love TurboGears. It is easier to set up and SQLObject is nicer to work with than the database tools in Rails. but it is also a Python based framework, so if you are a rubynista, then rails is defiantly the way to go.

    --



    I am the Alpha and the Omega-3
  12. WebServices not new to Rails by Anonymous Coward · · Score: 2, Informative

    The article summary seems to imply that WebServices will be new to the 1.0rc of Rails. This is not the case. I've been writing WebServices with Rails for several months now using the built in WebServices support.

  13. I've been using it... by Fished · · Score: 4, Interesting
    I've been using RoR, and I'm convinced that it is not just a flash in the pan. Let me preface this by saying that I've programmed in just about everything out there... from perl/mod_perl/cgi development, to php, to Zope, to Java, to Struts, etc. I have never seen a framework that makes it so easy to quickly develop well-architected applications as rails. A lot of the credit for this goes to two things. First, Rails features, out of the box, excellent use of automation to setup the structure of your app for you. I can have basic CRUD functionality for a table with literally one command ('script/generate scaffold TableName'). Second, Rails has a built-in ORM layer (ActiveRecord) that greatly simplifies everything, in particular because it is very good ORM.

    On one of the Rails pages they talk about a functional website in less times than other frameworks would have you spend on XML situps, and I have to agree. (Excursus: am I the only one who is underwhelmed with XML for application configuration? Apparently not!) Everything depends much less on configuration and much more on convention. This means less code to debug, which means more time to write the really distinctive stuff that was why you were custom-coding an app in the first place.

    Ruby is also a dream come true. The speed of perl, the OO features of python, but without perl's crufty syntax and python's rigidity. Where in the past Ruby was often poorly documented, and sometimes slow and buggy, it has largely overcome these limitations.

    Try rails. You'll like it.

    --
    "He who would learn astronomy, and other recondite arts, let him go elsewhere. " -- John Calvin, commenting on Genesis 1
    1. Re:I've been using it... by phurley · · Score: 4, Interesting

      I have also been using it -- and love it, but a quick note (not that I think it is that important generally speaking) -- ruby is not as fast as perl. It still uses an interpreted syntax tree, that is not as fast as perl's bytecode interpreter. YARV, should fix this, but it is still development level code.

      Of course having said that, the heavy lifting in ruby (like most scripting languages) is implemented in C, and I rarely have application performance issues with my ruby programs (including but not limited to rails). When there is a performance problem, ruby has very nice benchmarking/profiling tools and a good extension system for writing code in C/C++, so for me this is a non issue.

      --
      Home Automation & Linux -- now I know I'm a geek
    2. Re:I've been using it... by I+Like+Pudding · · Score: 2, Informative

      Rails' caching system gets around most performance problems. The templating system allows you to cache partials, which are sub-templates used for recurring page elements. Using slashdot's front page as an example, you could update the fortune at the bottom with every page view and still keep the other expensive-to-generate page elements in cache. This is the primary reason it was beating Java in certain benchmarks.

  14. Re:YASLFFFSC by endgame · · Score: 3, Insightful

    > Rails definitely does not scale into the average J2EE project dimensions

    From my experience the "average" J2EE does not have to scale very far at all. J2EE architectures are capable of scaling very well, but a great deal of the time the extra comlexity is unwarranted for the task at hand. Rails is a great for a the large percentage of applications that fall into this category.

  15. Don't knock it before you try it... by SwedeGeek · · Score: 3, Insightful

    To anyone who has yet to try Ruby on Rails but refuses to do so because they think it is for speghetti coders, script kiddies, etc., I just have this one comment to make...

    Who do you think the people evangelising RoR are? Do you think they are actually people who have only learned Ruby, so they don't know any better in trying to get other to try it? For some reason, I doubt it... While I don't necessarily have any hard evidence on user profiles, I would suggest such promoters have likely tried more than one programming language and web framework, and are using their own experience to come to the conclusion that RoR is worth at least trying out. Ruby has now been publicly available for 10 years, but there certainly wasn't much widespread excitement about Ruby in general until RoR came along. There has to be some valid reason for that. If it was really just a mob of script kiddies trying to build the momentum, development firms such as 37signals would not be as successful as they have been. Not to mention, the fact that the functionality of the RoR framework has or is being ported to many other languages of late.

    I'm not trying to convince you it's the best thing since sliced bread, but I don't see the logic behind swearing Ruby on Rails off before even looking under the hood for yourself...

    1. Re:Don't knock it before you try it... by ajwitte · · Score: 2, Informative

      37signals is not just a user of RoR.
      37signals made RoR.

      --
      chown -R us ~you/base
  16. Learn Ruby Book by N8F8 · · Score: 4, Informative

    I came across this awesome (actually funny) online book teaching Ruby: why's (poignant) guide to ruby

    --
    "God fights on the side with the best artillery." - Napoleon, Marshal of France - speaking truth to power
  17. Re:YASLFFFSC by partenon · · Score: 2, Informative

    Who told you RoR doesn't scale? Take a look at http://basecamphq.com/ and http://article.gmane.org/gmane.comp.lang.ruby.rail s/24863 . Basecamp is being "used by tens of thousands of people in over 40 countries!" . And it doesn't scale? C'mon, java-boy. All we know that 90% of projects doesn't need to be done in Java. Actually, if you need a *really* huge web-application, java isn't your choice too. Examples? Amazon, eBay, Google...

    --
    ilex paraguariensis for all
  18. Big Nerd Ranch has Ruby on Rails Bootcamp by bignerdranch · · Score: 4, Informative

    Marcel Molina (one of the Core Ruby on Rails Team members) is teaching a five-day Ruby/Ruby on Rails bootcamp at Big Nerd Ranch, December 5 - 9.. I work for Big Nerd Ranch, so I'm biased, but I think it is going to be an incredible class. - Aaron Hillegass

  19. Ruby on Rails on Fedora Core 4 by clear_thought_05 · · Score: 2, Informative

    I've found this guide very useful for Rails on FC4: http://digitalmediaminute.com/howto/fc4rails/. Very thorough.

  20. More than just Scaffold by jazzyfox · · Score: 3, Informative

    One thing that I feel people should keep in mind is that Rails is more than just the scaffolding. After many of the breathless "zero to web in 15 minutes" articles it seems like Rails is no more than a simplistic CRUD framework. While you can go from nothing to a basic app in such a short time, it will be using the Scaffold, which is just that, something to get you started.

    After the first few tutorials I read my impression was almost "that's it?" There demo/article Four Days With Rails gives a better view of going beyond the scaffolding, as does the Pragmatic Programmers' rails book.

    1. Re:More than just Scaffold by Bazman · · Score: 2, Interesting

      I've just read that Four Days thing and one thing is glaringly missing. You get to write a TODO management application, but there's no security. Anyone can edit, add, change, delete the TODO items.

      So now you want to add security - for simplicity's sake lets suppose you just want you to be able to edit or change anything, and anyone else to be able to view the todo list. How do you add this sort of security framework into a Rails app? I've not seen this done anywhere. Can someone point me to docs that would do this?

      In Zope, you get security built into the basic objects, with permissions and roles, so what can be done by users is built into the framework.

      Baz

    2. Re:More than just Scaffold by fleadope · · Score: 5, Informative
      The developers of Rails are quite clear that they are trying to create a framework for developing a web applications, leaving the actual implementation of all the application logic, including security (or lack thereof!) up to the application developer.
      That being said, I know of at least three secirity implementations being actively worked on and used (in order from least to greatest complexity):

      1) There is a generator on the rails wiki:
      A controller/model/view generator for easily adding authentication, users, and logins to your rails app.

      http://wiki.rubyonrails.com/rails/pages/LoginGener ator

      2) Bruce Perens has just released ModelSecurity:
      ModelSecurity helps Ruby on Rails developers implement a security defense in depth by implementing access control within the data model.

      http://perens.com/FreeSoftware/ModelSecurity/

      3) ActiveRBAC
      The goal of this project is to create a portable, simple but effective RBAC implementation with common User infrastructure and models for Rails.

      https://rbaconrails.turingstudio.com/trac/wiki

      There has also been considerable work done on a component model that will make these even easier to use and extend.

      --
      "The problems in the world today cannot be solved by the level of thinking which created them" --Albert Einstein
  21. My experience by spludge · · Score: 4, Informative

    I'm a somewhat experienced web developer and I have developed significant applications (1000s users) in Java, .NET and PHP (and a little Perl). I recently tried out Ruby on Rails and, so far, it is by far the best web development environment that I have seen.

    It forces you to create a web application that is done-right(tm). The way it forces you is very insidious. If you create your application and database in a certain way then everything is very simple and easy to do. If you stray outside that way though, then suddenly you have to do so much more work. In this way you are led down the path of least resistance to a good design, and it actually works! Please try it for a week or two before you dismiss this, I was skeptical too :)

    In Java to get the same functionality that I would get for free in rails I might have to use: Ant, XDoclet, Spring, Hibernate (or iBATIS), JUnit, jMock, StrutsTestCase, Canoo's WebTest, Struts Menu, Display Tag Library, OSCache, JSTL and Struts. The amount of configuration that all of those things take is very daunting, and can often have issues. Rails will give you all that functionality (well most of it) for free.

    There *are* problems with with rails. The biggest in my mind is documentation. The wiki sucks. You really have to buy the Agile Web Development With Rails book to learn, but hopefully that will improve. This lack of documentation makes it hard when you want to stray outside of the framework. Rails really needs the equivalent of the PHP documentation with annotated comments.

    Anyways, Rails is here to stay. I'm sure of that now having tried it myself. It feels painful to have to go back and develop in other languages for web development now!

  22. Dear Slashdot by VAXGeek · · Score: 4, Insightful

    Dear Slashdot:

                    At this point, I am quite aware of Ruby on Rails. It is agile, the next big thing, etc. Could you possibly link a few more half brewed articles about AJAX, Ruby, and Rails? "Ruby's the next big thing!" "Ruby's hot!" Wow, really?! It certainly has more hype than anything else out there. I think if it was really that good, there would be less people hyped about it and more people actually using it. I've heard about 50000 people say it is the next perl. Of course, with perl6 highly late, who knows what will happen.

    --
    this sig limit is too small to put anything good h
  23. Re:XML? by phurley · · Score: 2, Informative

    REXML is a very nice ruby XML processor, but does not do XSL transforms. There are some less polished libraries - ruby-xslt and xslt4r that wrap C XSLT libraries, they do not appear to be in active development, but (at least for me) ruby-xslt works fine.

    --
    Home Automation & Linux -- now I know I'm a geek
  24. New Security Framework for Ruby on Rails by Bruce+Perens · · Score: 4, Informative

    ModelSecurity helps Ruby on Rails developers implement a security defense in depth by implementing access control within the data model.

    If you are like most developers, you think about security when you program controllers and views. But a bug in your controller or view can compromise the security of your application, unless your data model has also been secured.

    The economical, flexible, and extremely readable means of specifying access controls provided by ModelSecurity makes it easier for the developer to think about security, and makes security assumptions that might otherwise live in one developers head concrete and communicable to others.

  25. Heavyweights taking on Rails by Bruce+Perens · · Score: 3, Interesting
    I visit Fortune 100 companies in my work for Sourcelabs. The managers comment that their engineers are clamoring to use Rails and the managers are holding back until the product is more mature. They continue to watch the trend.

    There are some interesting sites. Note Epson Developers. You might find this note about a large medical application interesting. I also noted a Rails project being developed in a department of the New York City government.

    Bruce

  26. You cannot intuit your way to understanding by guet · · Score: 3, Informative

    You're talking in generalities about complicated things you're not familiar with - it's not very productive.

    Ruby - OOP language which is really quite elegant, tidy, and intuitive and has a bunch of standard APIs
    Ruby on Rails - Additional structure and helpers for building a web application, written in Ruby

    The only way you'll find out if you like it is to try doing something with it - if you seriously want to make a web application or something, you could get an idea of how to use it by watching the tutorial video.

    http://www.rubyonrails.org/media/video/rails_take2 _with_sound.mov

  27. Re:How does it deal with changes? by vendull · · Score: 3, Informative

    Rails looks at the database (not XML files!) to figure out the table structure, so the changes are visible in RoR automatically. You do not have to change anything to make ActiveRecord (RoR's ORM) see the new table structure. It happens automatically.

  28. The ultimate contrarian answer to this question by hey! · · Score: 4, Insightful
    Is that there is no answer. At least no answer that is ten words or less and covers every possible case.

    People who say that business logic never belongs in the database are people who tend to be application developers. They are committed to a client platform (say j2ee), and database platforms (oracle and postgres and the like) vary from client to client.

    People who own data on the other hand tend to have the database platform constant, but need to get at it and manipulate it from multiple platforms (j2ee, perl, VB, Access etc.) A viable definition of "database" in my book is a collection of data that is organized to be reused across apps.

    A choice algorithm I'd use is this: If it has to do with the logical consistency of the data, it belongs in the database tier. If it is only possible to meet the needs of the project you are doing in one way, choose that way. Otherwise decide what part of your system is least likely to change, try to put as much as you can there.

    The closest I can get to my self imposed ten word limit is this:

    Business logic belongs in the tier you're most committed to.
    --
    Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
    1. Re:The ultimate contrarian answer to this question by hey! · · Score: 2, Interesting

      Well, speaking as a CTO, I'd be slightly offended by your implication that we're a bunch of dunderheaded idiots, except that being CTO means forgetting what the meaning of "shame" is. ;-)

      In any case, there fortunately isn't any reason to use PL/SQL. You can write stored procedures as static java methods in Oracle. Maybe not ideal, but still a lot easier than porting. There's a project for Postgres that allows stored procedure and trigger logic in Java too.

      In some cases web services may be a good for coarse grained kinds of services.

      --
      Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
  29. Rails and legacy databases by matchboy · · Score: 5, Informative

    Quite a few people have dismissed Ruby on Rails because they think that it enforces a set of rules about how to structure your database. I am currently writing, Programming Rails for O'Reilly and have posted numerous articles on my blog on the topic of Rails and Legacy database systems. Rails can be molded to fit your existing infrastructure with very little effort. It's all I have been using for new projects since last spring... and that was when I started learning Ruby as well.

    PostgreSQL + Ruby + Rails = the next (lamp)

    PRR, RPR, RRP... we need a cool acronym

    --

    Robby Russell
    PLANET ARGON
    Robby on Rails
    1. Re:Rails and legacy databases by talonyx · · Score: 3, Interesting

      how about:

      PURR: PostgreSQL, UNIX, Ruby and Rails

      or RAPR: Rails on Apache, PostgreSQL, and Ruby
      (kinda motorola type thing)

    2. Re:Rails and legacy databases by CodeMunch · · Score: 2, Funny

      I'd mod you up for PURR but my mod points just disapeared. I'd mod you down for RAPR but my mod points just disapeared. ;)

  30. Already covered this compared to Java... by bADlOGIN · · Score: 4, Interesting

    Don't let your Java get run out on a Rail just yet
    My opinion hasn't changed much since.

    --
    *** Sigs are a stupid waste of bandwidth.
    1. Re:Already covered this compared to Java... by partenon · · Score: 2, Interesting

      FYI, there's a Rails IDE out there: http://www.radrails.org/ . Its a pretty new IDE (actually, plugins over eclipse) that promisses to kill your first point :-)

      --
      ilex paraguariensis for all
  31. Instant Rails by matchboy · · Score: 5, Informative

    Curt Hibbs (author of that Rails article) has just released Instant Rails.

    Instant Rails is a one-stop Rails runtime solution containing Ruby, Rails, Apache, and MySQL, all preconfigured and ready to run. No installer, you simply drop it into the directory of your choice and run it. It does not modify your system environment.

    http://instantrails.rubyforge.org/

    --

    Robby Russell
    PLANET ARGON
    Robby on Rails
  32. Re:Not so sure about this - I stil "don't get it" by Vacindak · · Score: 2, Interesting

    The truth is the Rails is well designed all the way through.  I've actually written quite a few things that munge around with the inner workings of Rails (Ruby makes this very easy with all of its metaprogramming constructs), and I've seen first-hand how the components were put together.

    The most important thing to realize is that Rails heavily embraces the concept of "domain-specific languages."  Because of the Ruby's blocks and the ability to dynamicly insert new methods and/or respond to method calls on methods that don't technically exist, it's very easy to effectively create new syntax tailored specifically to the task at hand.

    For example, if you want to have a one-to-many relationship between the people table and the emails table (people often have more than one email address), it would be as simple as this:

    class Person < ActiveRecord::Base
      has_many :emails
    end

    class Email < ActiveRecord::Base
      belongs_to :person
    end

    Or let's say you were writing some schema migration code, and you need to create the corresponding database tables for those two model classes:

    create_table :people do |t|
      t.column :first_name, :string
      t.column :last_name, :string
      t.column :date_of_birth, :datetime
      t.column :biography, :text
    end

    create_table :emails do |t|
      t.column :person_id, :integer
      t.column :address, :string
    end

    That code doesn't care whether you're using PostgreSQL, or MySQL, or Sqlite, or whatever.  And if you need to move into some vendor-specific SQL for some reason, it still doesn't get in your way, because you can just execute whatever raw SQL you need to run.

    Incidentally, the point of schema migration code is to allow you to easily switch between database schema versions while maintaining data integrity.  This is ideal for prefabricated software built using Rails like wikis, blog engines, cms's, etc, since they can change the database schema as required, and upgrading to the new version is as simple for the user as running "rake migrate".

    And that stuff is just the data access layer.  Rails has just as much nifty magic going on in the view and controllers.

    For a high level view of how the components fit together, just stop by the RoR website.  The relevant diagram is prominently featured on the front page.

    http://www.rubyonrails.com/

    (Why doesn't slashdot let me use <pre> block directly?  That's really wierd.)

  33. Re:we already know by Senzei · · Score: 5, Funny
    True that. You can't bring up anything related to web apps without some rails drone coming out an spewing how wonderful rails is and that if jesus were a programmer, that's what he'd be using. /yawn

    Which, as we all know, is an outright lie. If jesus were a programmer he would write a lisp routine so advanced that A) only god could actually understand it, and B) he would just have to think about a website for it to be written.

    After all, if I were jesus, that is what I would do.

    --
    Slashdot: Where anecdotes and generalizations can be freely substituted for facts, logic, or intelligence
  34. What is Ruby on Rails? Ask Googlism! by Watts+Martin · · Score: 3, Funny

    Google on "ruby on rails is":

    Ruby on Rails is awesome.
    Ruby on Rails is a relatively new Web application framework built on the Ruby language.
    Ruby on Rails is the first startling example of this trend.
    Ruby on Rails is way over hyped.
    Ruby on Rails is finally a bullet point!
    Ruby on Rails is NOT a new programming language.

    And, definitively, from Joel on Software:

    If you don't know whether or not Ruby on Rails is a good tool, give it a try yourself. Most smart people I know love Rails.

    Don't you want to be a smart person?

    [Disclosure: Yes, I actually do like Ruby on Rails from what I've seen. It's fun to bitch about the hype, but most of the bitching is much less well-informed than the hype being bitched about. "If you can't convince me in five minutes that I need to drop everything and learn this, obviously there's no value to it!" Yeah, uh-huh. Some people compensate with fast sportscars, some with Java frameworks, I guess.]

  35. Re:What I want - client side ruby by RegularFry · · Score: 2, Informative

    Your prayers have (almost) been answered - Google for Mousehole. It's Greasemonkey, but ruby...

    --
    Reality is the ultimate Rorschach.
  36. Trails: RoR for Java by otisg · · Score: 2, Interesting

    For those using Java and wishing for a RoR-like package for Java, look at Trails - https://trails.dev.java.net/

    --
    Simpy
    1. Re:Trails: RoR for Java by irritating+environme · · Score: 3, Insightful

      Trails was a train wreck of immaturity last time I checked, and the dependencies were ridiculous.

      There is also Grails which is Groovy based, that is probably immature as hell.

      Ruby's main problem is its immaturity, so going with a more immature solution doesn't help. Java for the sake of Java isn't going to help things, but I wish the Grails/Trails people great success. The Java API is extremely valuable, and Ruby's main problems with converting people is the host of apps/APIs (web server, database, etc) above and beyond the language that an enterprise developer will need to learn in order to effectively use it.

      --


      Hey, I'm just your average shit and piss factory.
  37. Re:Ruby on Rails only works on MySQL by matchboy · · Score: 2, Informative

    PostgreSQL works with Ruby on Rails!

    If it didn't, I wouldn't be so in love with it :-)

    --

    Robby Russell
    PLANET ARGON
    Robby on Rails
  38. Re:YASLFFFSC by achacha · · Score: 2, Informative

    Ebay is Java...

  39. Re:XML? by handslikesnakes · · Score: 2, Informative

    ruby-xslt is still being developed. New version released just last week.
    And yes, speaking as one of the developers - it could use some polish.

  40. Re:I bet it does it all by convention...NOT! by matchboy · · Score: 2, Informative

    My book will cover some fun legacy stuff.. a whole section is dedicated to this with Ruby on Rails. :-)

    Programming Rails

    --

    Robby Russell
    PLANET ARGON
    Robby on Rails
  41. Re:I bet it does it all by convention...NOT! by Watts+Martin · · Score: 2, Insightful

    ActiveRecord isn't a code generator. The scaffolding scripts are code generators. ActiveRecord is an ORM system. In fact, AR doesn't generate any code at all, which makes it hard to believe you've even given the Active Record Overview a quick glance. The "convention over configuration" magic is one listed feature out of a dozen.

    Yes, ActiveRecord is immature, and yes, it's clearly designed more with the idea of being used from the ground up. But, see, when you start slagging off AR because it's "just" something that it doesn't even do...