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.
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.
;) be sure to try out that 'live search' (try 'bsd') for a taste of RoR/AJAX fun!
Speaking of, why don't you check out my Ruby on Rails/Typo based blog, fak3r.com
fak3r.com
\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 :-)
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
Another VERY good framework that allows for rapid web development is Seaside ( http://seaside.st/ ). It's a framework for smalltalk, which is similar in some ways to Ruby. It's well worth checking out, once you get over the initial curve it's fantastic. Personally the ability to edit live code in your web-app while its running is wonderful and the "halos" feature just kicks a**.
Uh, doesn't business logic belong in the database where the datagnomes live?
If you're using RoR, your code we'll be generated with a Controller, a Model and a View. Business rules code belongs to the Controller.
Google for MVC, you seem to miss the point completly (or was it a joke?).
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.
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
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.
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
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
I've found this guide very useful for Rails on FC4: http://digitalmediaminute.com/howto/fc4rails/. Very thorough.
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.
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!
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
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.
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.
Bruce Perens.
Sane legacy schemas (usually) only require a little more work. If your column naming doesnt follow the conventions, then you can just override the convention in the model definition. I had a problem before with the Oracle driver because you couldn't specify the primary key sequence name on a per-table level, but this was fixed recently.
You're talking in generalities about complicated things you're not familiar with - it's not very productive.
2 _with_sound.mov
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_take
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.
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
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
Your prayers have (almost) been answered - Google for Mousehole. It's Greasemonkey, but ruby...
Reality is the ultimate Rorschach.
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
37signals is not just a user of RoR.
37signals made RoR.
chown -R us ~you/base
Ebay is Java...
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.
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
Hey guys.
I see talks about login generator and other way to handle users. Just to let you know there is an authentification generator I released few days ago at http://penso.info/rails/auth_generator/
It offers a nice interface to handle users, you can edit/remove/add users, put them into groups and allow specific pages only to specific groups (like ADMIN group, etc). All the usual pages like forgot password/resend the confirmation/change password, etc, that you want your users to have are available out of the box.
There is a quick video also that takes you from nothing to a website handling articles, with user authentification in mind.
http://blog.penso.info