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.
Yet Another Scripting Language Framework For Spaghetti code
of course we'll see it continue, even as an avid python user I understand that Ruby on Rails has managed to set forth a bunch of essential memes for scripting language development, ones that many scripting language communities are now trying to emulate.
"Yes." -- some slashdotters
"No." -- other slashdotters
Oh, and your horoscope for today is "Give generously to people you meet online who make you laugh."
When things get complex, multiply by the complex conjugate.
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
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.
I know this. This is that ruby going on the choo-choo train.
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?
TFA seems to be written by a used car salesman. Or maybe those guys on the infomercials late night for different "enhancement" drugs.
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.
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
\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
Could the skin get any thinner around here?
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**.
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.
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
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...
If a Ruby-brower-plug-in can do for the client what Rails did to the server, the web would be a pleasure to work with.
A nice MVC framework written in a language that is really clean and enjoyable to work in. Technically, I don't have a problem with Rails, although there is some "interesting" code in the core libraries. But hey, it's still pre-1.0, and I think the project's goals are sound.
The core team is fairly isolated (they idle in the IRC channel but rarely speak there). Core development discussion occurs largely on locked mailing lists and in non-public IRC channels, so the direction trunk is taking on a day-to-day basis is hard to pin down. There are very few people with commit rights, and those people seem to be extraordinarily busy. Patches either get reviewed and merged really quickly, or sit and rot in the ticket system for weeks. In short, I guess it's a pretty typical open source project trying to make a release, although the lack of transparency (and at times, raw elitism) is unfortunate.
A really poor name for what seems to be a great development environment.
Strange women lying in ponds distributing swords is no basis for a system of government.
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
It's amazing that people are not bashing this already. I was thinking maybe people wouldn't like how you can't be a "l33t haxx0r" and spend an hour writing a simple socket connection, because that's the general impression I get when there are reviews about C# or PHP.
Then again, I guess this is slashdot.
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.
Most developer from time to time enjoy smaller applications, less responsibility testing ground, trying out new stuff and libs, and often you simply have to do it because you have this urge to eat sometimes!
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!
Am I the only person who's not been able to find any XML/XSLT support in RoR? I'd like to simply create a valid XML object that I can manipulate, and transform it to the screen - in a similar way to PHP5's XML/XSL functions. Can I find any? Nope.
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
That and you might actually get a chance to architect it. I maintain a large web app, and hate the fact that I can't go in redesign anything (everything).
There are some people out there who might have been led to believe that the fancy AJAX applications currently being built using Ruby on Rails actually require RoR for that degree of rich functionality. Fortunately, this is not true. The AJAX library is called script.aculo.us and it is available as a standalone JavaScript library.
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 and I'm using it too!
Tired of FB/Google censorship? Visit UNCENSORED!
I've seen this referenced before:
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.
creation science book
Ok, here's my understanding, please correct me (in simple non "high level" language for us pleons) if I am wrong. I'm am still happy to admit that I "don't get it"
My understanding is, you get these underlying languages that are complicated and messy, not intuitive, and have a bunch of unstandardized characteristics (or DOM's), and so much object orientation that the user has no clue as to how to grind down to the details. So to fix that, we add a layer on top of that called "ruby on rails" that hides the mess that you would otherwise be required to deal with. (or am I totally clueless here?)
Well anyhow, if so, wouldn't it just be better just to have the underlying language to be more imperitave and intuitive and standardized to begin with? No matter what kind of app you write, people always eventually half to start understanding the low levels to make things tick. It seems to me that much of the times these "innovations" allow people quickly and cleanly write things that have already been done, but for the real world - utility often requires imperitive and intuitive access to a low level to make new things work. It seems Ruby would just complicate that by adding another layer to go thru.
most organizations right now have the problem of hundreds of small applications made with new stuff and libs (not so new by now). i refuse to work in small-quick webapps since it enforces mantainability/coherence issues.
Marketing at its best.
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.
And just what *do* you deign to work on? Overpriced, byzantine SAP installations?
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
Bruce Perens.
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
Any man who afflicts the human race with ideas must be prepared to see them misunderstood. -- H. L. Mencken
Because every single fucking article I've read about Ruby on Rails is 95% hype and 5% substance. If the Ruby on Rails evangelists can't even be bothered to spend 15 minutes writing a decent article to actually explain what it is and how it works, why the fuck would I go to the trouble of installing Ruby and learning how to use it "On Rails"?
I became a Ruby developer at a financial firm about a month ago. My past expereince had been in PHP for this type of coding - let me say that I am impressed. Not only is it incredibly easy to pick up but you really can create full fledged applications in almost no time. ActiveRecord is what makes it so versitle, and I highly reccomend anyone who hasn't given it a try to actually try it...
If religous zealots don't believe in Evolution, then why are they so worried about bird flu?
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
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:
Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
Time to learn Ruby: 2-4 weeks multiplied by the # of jobs in the (714) MENTIONING Ruby: 10ish (.01) divided by my years as a programmer 8
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.
Often wrong but never in doubt.
I am Jack9.
Everyone knows me.
ROR is the most hyped up thing on the internet. The only thing that compares is AJAX.
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
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.
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
Would using Linux, Apache, MySQL, Evolution, and Ruby make me a LAMER?
ok. what's the best of breed authorization/authentication model for ruby on rails?
MORTAR COMBAT!
Bruce Perens is working on model security for Active Record sponsored by Soucelabs
Ruby on Rails is now a supported platform at ThoughtWorks! (home of Martin Fowler)
Robby Russell
PLANET ARGON
Robby on Rails
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
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.]
We've had some great looking applications setup by our customers using RoR ... we're looking forward to their next version - and continued GEM updates with new apps and trinkets
What is Ruby on Rails?
:)
Sounds like some sort of new sex position.
I checked some of the RoR tutorials out there a while ago, and found nothing that Zope (http://www.zope.org/ wouldn't do for me in the same or even shorter amount of time (old fashioned DTML here, not ZPT, mind you ;) . Zope has a quite a steep learning curve, but from reading the tutorials I would guess the same goes for RoR, and for now, I'll be sticking to Zope.
Cheers,
Uwe
Ever wondered whats wrong with the world? http://www.ishmael.org/
For those using Java and wishing for a RoR-like package for Java, look at Trails - https://trails.dev.java.net/
Simpy
That Rails programmer guy only suggests that Rails developers use MySQL. He seems to hate PostgreSQL, Oracle, and all databases that enforce CONSTRAINTS. How do we know that it works in PostgreSQL (properly) when the lead developer doesn't think you should even waste your time with silly constraints?
Django leaders love PostgreSQL. I want to try Rails but I don't trust MySQL (or fans of it).
Rails was written by a used car salesman too.
I'm using Rails for a project I've been working on for a month. It's better than anything I've used, but I can still see some room for improvement.
I've seen mention of a few alternatives that look quite interesting. In particular, TurboGears and Django for the Python crowd, and Nitro 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 describe.)
I'd prefer to use Python, just on language preference, and a potentially larger selection of libraries to use on the back end. But I'm wondering if Ruby has some features that Python doesn't that allow a lot of the magic to happen behind the scenes without having to add code.
I'm also very interested in anyone's experience with Nitro+Og. Og looks like a lot better ORM framework than ActiveRecord.
I'm tempted to try using TurboGears or Nitro, because they look better from a technical perspective. But Rails has so much momentum that I'm not sure they'd be able to surpass Rails' community support, which is in many ways more important.
Software sucks. Open Source sucks less.
I love Nitro.
"The typical development cycle for testing a change to a web app has steps such as configure, compile, deploy, reset, and test. This is very time consuming. The Rails development environment has none of this. You simply make a change and see it work. Don't make the mistake of dismissing this as a minor point. It's hard to overstate how much this improves productivity and helps you maintain a creative flow without interruption."
So they don't test anything? They just modify production
code directly? Sounds like something only suitable for college
kids and amateurs that leave messes behind for someone else
to clean up.
-- Programming with boost is like building a house with lego. It's a cool but I wouldn't want to live in it
Zope has a quite a steep learning curve,
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 "shallow learning curve".
HTH.
I stole this sig from someone cleverer than me.
Be that as it may some us make a living making small quick web apps. I am a web designer/developer, and most of what I do is for small businesses that need very simple apps for the sites. Real estate companies need to post listing, funeral homes need to post obits, everyone needs a simple cms, etc. I develop in PHP/mysql and a little bit of asp.net. RoR sounds interesting to me, because if I can make it faster I can make more money. I am not writing large enterprise apps. Lord know I wouldn't be able to if I had to...
Sig removed because it was obnoxious
It looks like there are 3 choices for running Rails on Apache2:
mod_fcgi - original fastcgi, been 18+ months since last code change
http://www.fastcgi.com/
mod_fcgid - binary-compatible with fastcgi with improved process management
http://fastcgi.coremail.cn/index.htm
mod_scgi - simpler protocol utilizing Python (not sure of speed vs other two)
http://www.mems-exchange.org/software/scgi/
Which do you use and why? Are there any comparisons that show both speed and memory utilization among these? Did you try one and dump it after finding problems?
Sometime, I called my developing style in Ruby as ARMD developing.
A: Apache,
R: Ruby,
M: ruby Module that is written in C
D: and Database.
I don't care about Linux, FreeBSD, MacOS X, whatever around UNIXes. I wrote C codes of ruby module for bit manupulation with OpenPKSD, another version of OpenPGP public keyserver written in Ruby. My CRC24 caluculation module is 200 times faster than pure Ruby CRC24 calculation.
Hironobu SUZUKI, Japanese Ruby Developer at Ruby Conference 2005 in San Diego
fak3r.com
#! /usr/bin/ruby
require 'net/http'
h = Net::HTTP.new('fak3r.com', 80)
while true
h.get('/index.html', nil)
end
I'm curious why you go from apache to lighthttpd to fcgi to rails? On my home server I have an app that I'm developing that just has apache2 using mod_fcgi going straight to my rails app. I haven't load tested it or anything b/c it is going to be a personal app just for me and my friends but it seems to work fine. I thought about going with mod_ruby but then I read about the ruby interpreter and rails framework in every apache process and decided not to be that cruel to my box.
In Republican America phones tap you.
If you want to try Rails out for yourself on Mac, you could be doing it in less than 5 minutes (assuming you're sitting on a fast connection....)
Cheers,
ryanRails can automatically create a full set of CRUD (Create, Retrieve, Update, and Delete) operations and views on any database table.
Best. Quote. Ever.
-1 Uncomfortable Truth
I've never been a fan of web applications. They almost never provide what they want to be: applications which run on every guessable platform. There's always a small detail which works only with JS or even only with one specific browser so the platform independence is screwed up. (The advantage of easy & immediate deployment is still valid though.)
But let's talk about accessibility. There are some guidelines for designing accessable webpages and there are frameworks for the development of normal desktop applications. How could accessibility issues be handled with/by AJAX? A screenreader has a hard job to do even with webpages today, and I don't think the situation will change with more (inter)active websites.
And anyway, you could be wrong - if the x-axis was time and there was a lot to learn, a steep learning curve would require a lot of effort, which is in the spirit of the saying.
Someday we'll all be negroes
you know, it really depends on which axis has what label. If EFFORT is on the vertical and KNOWLEDGE is on the horizontal, then the saying is absolutely right. And, uh, i've never heard anyone be explicit about the labelling, so i'll have to assume your just a little pernacious.
:)
i mean, the above holds water, yeah? Anyway hello there, fellow nitpicker
j.
That's a good question, basically it's just the way Typo's FreeBSD howto said to do it if you already have an exisiting Apache install. It's silly to run two webservers, however I also did want to try out Lighttpd since I had heard good things. I like it, and if it can do all I need Apache for, I may migrate to it, again, just because and to learn new stuff. On the other hand, would be interesting to learn how to make mod_fcgi do it, so there's another route.
fak3r.com
So to clear up a common misconception: Rails is not at all related to ajax, and it doesn't really help you write ajax-y web applications.
If you haven't posted it yet, would you mind posting your hardware config? I tried to see if you have posted it in one of the threads, but didn't find any.
I've read a couple of articles and tutorials and other things about Ruby on Rails because I tend to think that something that's receiving this much hype must have some backing to it.
Ruby looks like a really interesting language, and I'd like to start using it on a regular basis soon. But for all I've looked so far, it looks like Rails is basically a great tool for rapidly building CRUD interfaces to your database, and it appears to be entirely designed for people who like to define an object for every table in their database, with load/store methods and instance variables corresponding to each column. Is this what all the hubbub is really about? Because it really seems quite underwhelming to me. Like I got all excited about this great new tool that came so highly reccomended, and then I read the tutorials and went "Oh. That's it? Ohhhh - Kaaay..." I mean, sure it looks like you could develop a full CRUD interface in no time flat, but that doesn't really seem very useful to me. And people I know who do make a lot of those kinds of interfaces already have a whole set of tools and scripts that they use that can generate the whole thing even faster than any of the examples I've seen.
So if I don't spend much of my time building CRUD interfaces, and I'm not somebody who likes my objects to be an exact representation of a database row, what does Rails actually offer me? (Especially seeing as I would already have to do extra work because I don't use their database naming conventions.)
If I don't put anything here, will anyone recognize me anymore?
Rails is a very nice framework and I look forward to working with it in the future
as well as with Ruby.
But...
Your mileage may vary if you are trying to work with a legacy db schema that does not
use the naming conventions that Rails uses. I know they can be overidden - but not in
all cases. For example, I wanted to use Rails to build a small app using a legacy Oracle
schema. Each table has a sequence generated primary key (e.g. person_seq => person.personid,
emp_seq => employee.employeeid). I hit a dead end on this one. Rails document said something
to the effect "I couldn't find a way to pass in a sequence name to the Oracle driver".
Bottom line is that this stopped me cold from using Rails on a legacy schema that uses a
primary key/sequence setup that is very common (in the Oracle world at least).
The moral is that you cannot assume that anything will "Just Work" in all cases.
Oh, so if you have a non-vanilla RoR legacy database, it does ORM to accomodate that all via convention not configuration right? Very little effort, right?
No details though in most articles. Just ground-up stuff that looks to be competing with LAMP projects, and the pro-RoR articles all mirror that general attitude, not the least of whom is Curt Hibbs.
Yet all the really grizzled Java guys who have to deal with real-world legacy and enterprise ugliness list off a host of problems that Java has documented, mature projects with, and the RoR people say "Oh, RoR can do that with VERY LITTLE EFFORT...and don't point to anything."
Let's be honest here, the base ActiveRecord is a Wizard/Code Generator. All that zero-config falls apart once you get out of the baby carriage and into real-world stuff. So quit pushing that all over the place.
I won't deny it's promising, but it is immature as hell.
Hey, I'm just your average shit and piss factory.
AJAX+Ruby+Rails+PostGres:
RAPR, PARR, ARPP, PRAR
Get a T in there and you get close to RAPTOR...Have fun guys.
Hey, I'm just your average shit and piss factory.
From scratch, it's only taken me a few afternoons of hacking to produce this:
... it's a used computer book search tool that interfaces with Amazon's Web Services. Pretty straight forward stuff, but handy in it's own way.
... of course, that will change as it matures ... but right now it's just marvelous.
http://www.peatsbooks.com/
What do I like about Rails? It's hard to put a finger on, but it just *feels* good. I'm coming from about ten years of web dev with Perl, Java, and PHP. Rails seems unencumbered by a lot of stodgy crap (both code and culture)
# gem install rails /usr/lib64/site_ruby/1.8/rubygems/custom_require.r b:21:in `require__': no such file to load -- rdoc/rdoc (LoadError) /usr/lib64/site_ruby/1.8/rubygems/custom_require.r b:21:in `require' from /usr/lib64/site_ruby/1.8/rubygems/doc_manager.rb:4 3:in `generate_rdoc' /usr/lib64/site_ruby/1.8/rubygems/gem_commands.rb: 215:in `execute' /usr/lib64/site_ruby/1.8/rubygems/gem_commands.rb: 214:in `execute' /usr/lib64/site_ruby/1.8/rubygems/gem_commands.rb: 153:in `execute' /usr/lib64/site_ruby/1.8/rubygems/command.rb:49:in `invoke' /usr/lib64/site_ruby/1.8/rubygems/cmd_manager.rb:9 4:in `process_args' /usr/lib64/site_ruby/1.8/rubygems/cmd_manager.rb:6 7:in `run' /usr/lib64/site_ruby/1.8/rubygems/gem_runner.rb:13 :in `run' /usr/bin/gem:17
Attempting local installation of 'rails'
Local gem file not found: rails*.gem
Attempting remote installation of 'rails'
Updating Gem source index for: http://gems.rubyforge.org/
Install required dependency rake? [Yn] y
Install required dependency activesupport? [Yn] y
Install required dependency activerecord? [Yn] y
Install required dependency actionpack? [Yn] y
Install required dependency actionmailer? [Yn] y
Install required dependency actionwebservice? [Yn] y
Successfully installed rails-0.13.1
Successfully installed rake-0.6.2
Successfully installed activesupport-1.1.1
Successfully installed activerecord-1.11.1
Successfully installed actionpack-1.9.1
Successfully installed actionmailer-1.0.1
Successfully installed actionwebservice-0.8.1
from
from
from
from
from
from
from
from
from
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
I should probably clarify that "taking matters into your own hands" doesn't mean you have to ditch Rails. You'll just write model classes that don't extend ActiveRecord classes. I've used this approach to handle data that was stored in files rather than an RDBMS.
I've done quite a bit of benchmarking various Perl constructs, to improve performance of my own Perl scripts. (More web stuff, so it's the relevant sort of Perl).
I've been very disappointed with it speed-wise. Approximately 1100 CPU cycles on my 366MHz x86 for a trivial subroutine call; approx. 290 for an integer local ("my") variable assignment (260 for globals). That's hot cache (tiny benchmarking loops). That's slow even for a byte-code interpreter. And strings copy a lot more than necessary, in ways which are difficult to avoid without making code very messy; surprising for a language with a reputation for string handling.
It's great if you want to pattern-match a little bit of text. But even working with text, sometimes you need to split things into token streams and do logical things.
Perl is full of great things. I use it a lot, and write all sorts of fancy code in it. But one thing it isn't, is fast.
-- Jamie
On the first point: note that I said "a bit" arbitrary, and not completely so. There are excellent reasons why we separate the application and the database. Or rather, the applications (a plural that says a lot) and the database. Still, the difference between the database and the application should be considerably more seamless.
On the second point: if you want me to program in PL/SQL, you might as well murder me.
As to where business logic belongs, I think the best answer is that you should only have to write and maintain the business logic in one place and form. If that didn't sound like an answer to the question, well, that's because the question poses a false dichotomy. Whether the business logic resided on the application or in the database server is an implementation detail that the language used for implementing said logic should abstract away. You should just be able to write down the logic once, and the same set of rules should be able to run on either side. Or even better: on both at once. (Why? Because they serve different functions: the database might the rules to protect data integrity, while the application is in a better position to interpret violations and deal with them smartly.)
A real-life system I've seen implemented that's kind of similar to the idea: a little domain-specific language for web form validation, that does double duty: it's used on the web server to validate form submissions, but at the same time, it gets compiled to Javascript that gets embedded on the web page and detects invalid submissions at the client side. Again, the same business rules, but they transparently work in more than one implementation. (And there's no reason why in principle the same rules couldn't be translated into database constraints; but doing it in practice might be hell. As I too often say: it's a sad world where the best database is Oracle...)
Are you adequate?
I and many other hates Perl, while I recognize Perl's power, its syntax is so awful that it makes maintenance a pain whether it is written initially by a beginner (who doesn't use 'use strict' or 'use warning') or by an expert (who finds TMTOWTDI fun, he wrote two lines that took me 1/2h and one book to understand and then 30s to replace by also two lines that a beginner in Perl could understand).
Perl6's syntax doesn't look any better to me.
The only thing I miss in Ruby's language compared to Perl is the possibility to declare variable (a use strict equivalent).
1.2G Athlon
512M PC133 RAM
20Gig IBM
80Gig Western Digital
NIC some 10/100 3com
FreeBSD 6.0 (RELENG_6)
Speakeasy 1.5/384 ADSL
As pointed out by others, the bottleneck was def the DSL - but the server was working pretty hard. I'll post some more detailed stats, but suffice to say, over 95,000 hits for 10/15 was a new rekerd for my home server.
fak3r.com
In any situation, you take a bunch of tools and primitives and make an application.
I18N == Intergalacticization