What is Ruby on Rails? 296
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.
Summary of thread (Score:5, Funny)
"Yes." -- some slashdotters
"No." -- other slashdotters
Oh, and your horoscope for today is "Give generously to people you meet online who make you laugh."
Watch the demo... (Score:5, Informative)
Speaking of, why don't you check out my Ruby on Rails/Typo based blog, fak3r.com [fak3r.com]
Re:Watch the demo... (Score:5, Funny)
For those late to the party, that's fak3r.com [fak3r.com]! (just try and bring it down hehe...)
Re:Watch the demo... (Score:2)
heh heh... you had to ask, didn't you? :)
Re:Watch the demo... (Score:2)
Do not try the L337 sk1llz of Slashdotters, for they are unsubtle and quick to code a DoS script!
Re:Watch the demo... (Score:2)
I guess you've just discovered that it doesn't take much CPU to render 500 responses.
Re:Watch the demo... (Score:2)
The response that I saw from the suggested query was quite snappy. I didn't know you were doing this off an ADSL link.
I almost wish I'd brushed up on my Ruby coding skills and did our online store that I'm currently working on in RoR, but we chose JSP/Java Servlet stuff because of concerns of access to developers and scaling. I'm sure you're not going to tump that one over and all you're going to see is your pipe choked full- DoS by Slashdot, done to oneself. Brave soul.
Re:Watch the demo... (Score:2)
Because the pages are cached as normal HTML pages, Ruby/Rails is not started up for those pages and thus can be served up extremely fast.
Re:Watch the demo... (Score:4, Interesting)
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.
Re:Watch the demo... (Score:3, Informative)
Re:Watch the demo... (Score:2)
Re:Watch the demo... (Score:2)
I look at it the other way - because 90+% of all languages and especially extensions like RonR *are* fads, I'm looking for reasons to believe that it isn't. Unfortunately, the actual quality of said product is nearly irrelevant. The better question is who's adopting it, and for RonR, I'm not seeing any heavywei
Heavyweights taking on Rails (Score:4, Interesting)
There are some interesting sites. Note Epson Developers [epsondevelopers.com]. You might find this note [gmane.org] about a large medical application interesting. I also noted a Rails project being developed in a department of the New York City government.
Bruce
New Security Framework for Ruby on Rails (Score:5, 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.
Re:New Security Framework for Ruby on Rails (Score:2)
Re:Watch the demo... (Score:2)
Oh, and yeah, the site that demos the Ruby On Rails framework with Typo is fak3r.com [fak3r.com] - thanks for helpi
What is Ruby on Rails?. (Score:3, Funny)
Is Rails useful to aggregate web services? (Score:3, Insightful)
Re:Is Rails useful to aggregate web services? (Score:2, Insightful)
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 t
Re:Is Rails useful to aggregate web services? (Score:2, Informative)
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 th
Strange Vibe from the Article (Score:4, Interesting)
Re:Strange Vibe from the Article (Score:2)
That's ok. (Score:2)
Re:Strange Vibe from the Article (Score:3, Interesting)
Finally, a breath of fresh air (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.
Re:Finally, a breath of fresh air (Score:4, Insightful)
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?
Re:Finally, a breath of fresh air (Score:3, Interesting)
Question about RoR (Score:3, Funny)
Uh, doesn't business logic belong in the database where the datagnomes live?
Re:Question about RoR (Score:2, Informative)
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?).
Re:Question about RoR (Score:2)
Re:Question about RoR (Score:2)
Re:Question about RoR (Score:4, Funny)
The ultimate contrarian answer to this question (Score:5, Insightful)
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:
Re:The ultimate contrarian answer to this question (Score:3, Interesting)
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 coars
Seaside ? (Score:3, Informative)
\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 [squeak.org].
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 [seaside.st]).
Frankly, it's really a joy to develop with Seaside, and you should have a look :-)
Re:Seaside ? (Score:3, Interesting)
Re:Seaside ? (Score:2)
Re:Seaside ? (Score:2)
I tried to evaluate seaside recently but was blown away by what resembled a car accident involving heaps of exploding clowns. It was like umbrellas and floppy boots everywhere.
Which is all good and fine for multimedia, but it doesnt engender confidence with a web app.
forget Rails (Score:3, Informative)
Re:forget Rails (Score:2)
When I read the word rubynista the first thought that came to mind was "I can totally picture someone saying that on a show like Queer Eye for the Straight Guy". I'm not sure that was the intended reaction.
Forget TurboGears (Score:2)
WebServices not new to Rails (Score:2, Informative)
I've been using it... (Score:5, Interesting)
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.
Re:I've been using it... (Score:5, Interesting)
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.
Re:I've been using it... (Score:2, Informative)
Re:I've been using it... (Score:2)
I did find the sibling post, regarding Rails' catching, interesting. J
Re:I've been using it... (Score:2)
Are you complaining about the amount of meta-data packed into something like struts, or just the fact that it uses XML?
XML is perfect for this sort of thing IMHO.
It does bother me that some frameworks put too much of the application into meta-data and less into code.
Re:I've been using it... (Score:2)
However, I'll be the first to admit that I'm not into the theoretical aspects of programming languages. I mostly just like to get programs written in as little time as pos
Don't knock it before you try it... (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 [wikipedia.org], 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 [37signals.com] 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...
Re:Don't knock it before you try it... (Score:2, Informative)
37signals made RoR.
What it is... (Score:2, Troll)
Learn Ruby Book (Score:5, Informative)
Big Nerd Ranch has Ruby on Rails Bootcamp (Score:4, Informative)
Ruby on Rails on Fedora Core 4 (Score:2, Informative)
More than just Scaffold (Score:3, Informative)
After the first few tutorials I read my impression was almost "that's it?" There demo/article Four Days With Rails [homelinux.org] gives a better view of going beyond the scaffolding, as does the Pragmatic Programmers' rails book.
Re:More than just Scaffold (Score:3, Interesting)
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
Re:More than just Scaffold (Score:5, Informative)
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:
http://wiki.rubyonrails.com/rails/pages/LoginGene
2) Bruce Perens has just released ModelSecurity:
http://perens.com/FreeSoftware/ModelSecurity/ [perens.com]
3) ActiveRBAC
https://rbaconrails.turingstudio.com/trac/wiki [turingstudio.com]
There has also been considerable work done on a component model that will make these even easier to use and extend.
Re:More than just Scaffold (Score:2)
I might just get dragged off of Zope - I didn't fancy having to write tons of security/user-authentication stuff.
Model Security is nearly here (Score:2)
Bruce Perens is working on model security [perens.com] for Active Record sponsored by Soucelabs [sourcelabs.com]
Re:More than just Scaffold (Score:2)
As others have pointed out, Bruce Perens is working on a module to add security at the model level. The standard method is to apply security at the controller level, but applying it lower in the stack helps prevent mistakes from letting data leak out. I'm not sure if it will completely bubble-up to the controller layer though, or if
My experience (Score:5, Informative)
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!
Re:My experience (Score:2)
Dear Slashdot (Score:4, Insightful)
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.
RoR's AJAX abilities without RoR itself (Score:2)
It can be used in any language, or even from static web pages. Heck, I practice the unorthodox style of developing web apps in C [citadel.org] and I'm using it too!
How does it deal with changes? (Score:2)
script/generate scaffold TableName
and RoR will generate CRUD stuff for TableName. What happens when the structure of "TableName" changes? Does RoR handle regenerating without overwriting what you've customized?
BTW, I'm not into RoR, but was planning on doing an interview with someone on RoR for my podcast. The initial interviewee is AWOL, so if any RoR enthusiasts want to talk about this in more detail on a podcast, let me know.
Re:How does it deal with changes? (Score:3, Informative)
Re:How does it deal with changes? (Score:2)
My Experience (Score:2)
Ruby in the Job Market (Score:2)
Carefactor elevated to 0.016 - get it up to 2 before I learn it on the weekends.
This is satire, but succinctly explains what I consider, before learning about a new technology.
Rails and legacy databases (Score:5, Informative)
PostgreSQL + Ruby + Rails = the next (lamp)
PRR, RPR, RRP... we need a cool acronym
Re:Rails and legacy databases (Score:4, Interesting)
PURR: PostgreSQL, UNIX, Ruby and Rails
or RAPR: Rails on Apache, PostgreSQL, and Ruby
(kinda motorola type thing)
Re:Rails and legacy databases (Score:3, Funny)
Re:I bet it does it all by convention...NOT! (Score:3, Insightful)
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" someth
Already covered this compared to Java... (Score:5, Interesting)
My opinion hasn't changed much since.
Re:Already covered this compared to Java... (Score:2, Interesting)
Instant Rails (Score:5, Informative)
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/ [rubyforge.org]
standard authorization model (Score:2)
What is Ruby on Rails? Ask Googlism! (Score:4, Funny)
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.]
Trails: RoR for Java (Score:3, Interesting)
Re:Trails: RoR for Java (Score:4, Insightful)
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.
Rails alternatives (Nitro, TurboGears...) (Score:2)
I've seen mention of a few alternatives that look quite interesting. In particular, TurboGears [turbogears.org] and Django [djangoproject.com] for the Python crowd, and Nitro [rubyforge.org] as another Ruby platform. Others exist for other languages. (I don't know if anyone has exactly defined what makes a system Rails-like; it seems to be one of those things that you can identify without being able to easily descr
Re:YASLFFFSC (Score:5, Insightful)
Re:YASLFFFSC (Score:3, Insightful)
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.
Re:YASLFFFSC (Score:2)
Re:YASLFFFSC (Score:2, Informative)
Re:YASLFFFSC (Score:3, Informative)
Re:we already know (Score:5, Insightful)
Re:we already know (Score:2)
Re:we already know (Score:2)
Re:we already know (Score:5, Funny)
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.
Re:XML? (Score:3, Informative)
Re:XML? (Score:2)
Presently I'm tending towards Open Laszlo [openlaszlo.org], but it's flash based which I'm not a fan of. However, if it hides cross-browser issues, then it's a huge plus for me. Laszlo all
You cannot intuit your way to understanding (Score:4, Informative)
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
Re:Not so sure about this - I stil "don't get it" (Score:2, Interesting)
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
Re:Not so sure about this - I stil "don't get it" (Score:2)
container.each { |element| # something }
or
10.times { |i| puts i }
But it does take a while to learn how to use all the assorted libraries and frameworks that a new language gives you.
Re:Where is all the bashing? (Score:2)
Then again, I guess this is slashdot.
A post surprised about the lack of bashing when bashing was expected and finally concluding with bashing the news site. That's gold!
Re:What I want - client side ruby (Score:2, Informative)
Re:Ruby on Rails only works on MySQL (Score:2, Informative)
If it didn't, I wouldn't be so in love with it
Re:Zero turnaround time (Score:2)
What the hell?
Rails has three modes:
Honestly, that was a really misinformed and inflamatory comment.
Learning curves, dammit! (Score:2)
So Zope is easy to learn, huh? And I'd been holding off because people had told me it's fairly difficult to learn.
Repeat after me, everyone: a learning curve is a graph of Knowledge or Skill (independent/vertical axis) vs. Time or Effort (horizontal, dependant access). A "steep" learning curve means you gain knowledge quickly given little effort. A "steep learning curve" is a good thing.
If you mean it takes forever to learn the damn thing, the term you want is