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
"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
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...
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
Pontification. Ruby is a joy to work with. Get your hands dirty before making worthless posts.
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.
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.
I too have to admit that I just don't get it, but I'm willing to learn. However, I want a true explanation of the concept, not just a testimonial. Telling me, "It's the best thing out there", doesn't cut it.
From the beginning, I've been wanting a simple explanation of the structure of RoR. It is almost as if people are afraid that if you dig deeper into the design, you will discover something that will turn you away before trying it out. People shouldn't be afraid of the truth.
"The unicode stuff in the latest version is working fabulously well. My russian mafia friends are ecstatic."
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?
How are you going to "judge it for yourself" if you don't want to learn it? I haven't done any programming with Rails (or Ruby for that matter) but I did go through some of the tutorials just to check it out. I can see definitely see how someone could really enjoy programming in this framework.
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.
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!
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.
:emails
:person
:people do |t| :first_name, :string :last_name, :string :date_of_birth, :datetime :biography, :text
:emails do |t| :person_id, :integer :address, :string
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
end
class Email < ActiveRecord::Base
belongs_to
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
t.column
t.column
t.column
t.column
end
create_table
t.column
t.column
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.)
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.
Your prayers have (almost) been answered - Google for Mousehole. It's Greasemonkey, but ruby...
Reality is the ultimate Rorschach.
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
No. This is exactly what I mean ... how arrogant. There are a zillion languages out there. I don't want to sepnd all my time learning languages and frameworks, I already know dozens, I wnat to spend my time doing things.
... end
You can "do things" in any language. If you're great at perl, use it. If php is more your style, use that. I've been writing code for a long time now, and have done stuff in lots of scripting languages. Ruby, and Rails, makes it very quick to make certain types of applications.
And, honestly, how long does it take to learn a new language? You learn C, and write a loop: for(i=0;iMAX;++i) {}then you say, I need to use a loop in perl! And then you write, for ($i=0, $i$MAX; $i++) {} And, you know what, you want to write a loop in Ruby, it's different, but... well, it's (one way) for i in 0..(MAX-1)
I wish more companies would realize this.
karma is for the weak >)
It doesn't take long to be able to write a loop in a language, and btw, the Ruby way to write a loop would be something like
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.
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
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.
That's easy.. It's just a matter of Microsoft fix IE, or kill it.
Internet Explorer is the root cause of all webpages compatibility problems.
---- You know how some doctors have the Messiah complex - they need to save the world? You've got the "Rubik's" complex
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?
You wrote: ...wouldn't it just be better just to have the underlying language to be more imperitave and intuitive and standardized to begin with?
.Net (I think, never used it...) that tries to abstract away as much of these problems as possible. These frameworks serve two strict masters: take data from these databases and deal with thier task specific languages and make them usable to any random user's web browser and deal with the idiosycracies there. At the same time, try to make that middle tier easy to understand and make it difficult to allow the users to do the wrong things (e.g. accidentally deleting data that shouldn't be deleted or failing to specifiy all the information they should). In other words, enforce the "business logic".
My answer: Yes!
My long answer: Yes, but...
My really, long answer: Yes, but the existing languages -- HTML, JavaScript, SQL, etc... -- are the languages that either define the data (i.e. SQL) or define the user interface (e.g. HTML and JavaScript). To enforce a better underlying and all-encompasing language you'd need to get all the data stores to start using your language and then get all of the user browsers to start using your language before there could be a critical mass to achieve this simplification.
The next best thing is to use a frameworks such as J2EE, RoR,
I think J2EE does a pretty good job of this, though some people hate it. I'm really looking forward to trying out RoR since I've always been a fan of Ruby as a language.
Waltz, nymph, for quick jigs vex Bud.
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.
This has been fixed now. There are new features in edge rails for passing custom sequence names to your objects. :-)
Robby Russell
PLANET ARGON
Robby on Rails
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
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
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...
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
The nuances of HTTP transactions to drive your app events (incl. dealing with "back", "refresh", etc) are neither intuitive nor simple. There's a lot of detail. If you use something low-level (eg, PHP) this will bite you at some point.
:-)
Similarly if you need to persist a complex object model (which you will unless you stop at writing trivial bloging apps): you're going to have to understand a great deal of detail.
Rails and the ilk offer an abstraction layer on top of this that actually means you get an opportunity to express your application logic in a fashion that is perhaps a little more comprehensible - the idiom is more natural to many programmers, unless they've been perverted by years of dealing with shoddy web frameworks
(Similar tools and frameworks exist for many languages. That's because there is a need for them.)