Agile Web Development with Ruby on Rails 222
Agile Web Development with Ruby on Rails | |
author | Dave Thomas and David Heinemeier Hansson |
pages | 506 |
publisher | The Pragmatic Programmers, LLC |
rating | Excellent |
reviewer | Miles K. Forrest |
ISBN | (Book still in beta) |
summary | A complete primer to developing web applications with Ruby on Rails |
At just over 500 pages, Dave Thomas' new book manages to cover a lot of ground in a concise, readable manner. One problem at the outset -- the book is not finished. Knowing that the Ruby on Rails community has been chomping at the bit for morsels of information, Dave and David (DHH) have answered the call by releasing the forthcoming book early. "The book has not had a full technical edit, so it will contain errors. It has not been copy edited, so it will be full of typos. And there's been no effort spent doing layout, so you'll find bad page breaks, over-long lines, incorrect hyphenations, and all the other ugly things that you wouldn't expect to see in a finished book. We can't be held liable if you follow our instructions, expecting to create a Rails application, and you end up with a strange shaped farm implement instead. Despite all this, we think you'll enjoy it!"
And enjoy it I did. The "Getting Started" section of AWDRoR provides a whirlwind overview of the Ruby on Rails' architecture. I found Rails to be very intimidating at first. You can't just cut-and-paste a couple lines of code like you can in PHP. Rails generates all kinds of directories and files, making it feel like your first trip to Disneyland -- you know there's fun to be had, but it's a big place and you don't know your way around. The reason for all this is because, in programming, short simple scripts are easy and simple, full blown Web applications are not. Many LAMP projects developing in perl/Python/PHP and any number of templating engines have started simple, but grown into unruly messes that are difficult to maintain. While trying to grok Ruby on Rails, topics like Model-View-Control and Object-Relational Mapping really don't stick at first. Add to the confusion that many of us are also struggling to learn Ruby and a RDBMS (such as MySQL; Rails works with others databases as well). The overview of Rails is necessary, but I found it to be a lot more helpful rereading it after completing the tutorial section. So if you read through this first section and feel lost like I was, just know that the material will become familiar to you and press on, because it gets a whole lot easier from here on in.
I really enjoyed the Tutorial section, a narrative designing a shopping cart application for a customer. Dave says it best: "Does the world need another shopping cart application? Nope, but that hasn't stopped hundreds of developers from writing one. Why should we be different? More seriously, it turns out that our shopping cart will illustrate many of the features of Rails development. We'll see how to create simple maintenance pages, link database tables, handle sessions, and create forms. Over the next seven chapters, we'll also touch on peripheral topics such as unit testing, security, and making our pages look nice."
Dave begins not with lofty design plans, but with a tool most real programmers use: napkin drawings. Many of us sit down over coffee with a customer and talk about what they need, sketching out ideas with paper and pencil, not some complex software planning tool. Each chapter in the tutorial section allows a story to unfold, where the customer works alongside the developer. Real life situations like changing direction or refactoring code are covered as each programming session is done. You really see why Rails is becoming so popular. It wasn't written by a team of programmers trying to hammer out an arbitrary list of features, but rather Rails was built around a real application (Basecamp). Pragmatic considerations such as developer time, feature creep, and maintenance issues have all been skillfully addressed in Rails. The tutorial reflects this, and at the same time it also gently, almost unknowingly, teaches principles as outlined in the agile manifesto. Some of the goals include:
- Individuals and interactions over processes and tools
- Working software over comprehensive documentation
- Customer collaboration over contract negotiation
- Responding to change over following a plan
The third section, "Rails in Depth," dives into the inner workings of Rails. Components such as ActiveRecord, ActionController, ActiveView, and Web Services (Ajax) are all covered well. There are even chapters on securing and deploying your applications properly. These chapters, in conjunction with the API docs found on www.rubyonrails.org, give a full overview of Rails. Most helpful in this section are the notes and diagrams which help pull everything together. The appendices that cap off the book also provide the full tutorial source code, as well as a brief introduction to Ruby, the language that makes all the magic happen.
In short, Rails is a brilliant architecture, and Agile Web Development with Ruby on Rails is a great book. I'm reluctant to point out its shortcomings as it's still in beta, but it's really hard for me to find much to complain about. It took me some time for the light to come on with Rails, but once it does, you see that Rails could not exist without Ruby, the language it's inextricably woven into. As Dave Thomas is quoted on www.rubyonrails.com, Rails is probably "the framework to break Ruby into the mainstream." Whether you believe the hype or not of "super productivity," "Ten times faster development," and "Better than anything else," Ruby on Rails is a great tool to add to your belt. In fact, I find myself using it exclusively for Web apps, and I catch myself using python and PHP less and less and Ruby more and more for my day to day programs.
If you want to learn Ruby on Rails, Agile Web Development with Ruby on Rails is a great choice, and will probably be the definitive book on the subject.
Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
Ruby is quite cromulent. (Score:4, Funny)
Re:Ruby is quite cromulent. (Score:2)
Although, I know for a fact Mr. Buzzwords doesn't like salt, so you could be right.
(Disclaimer: Yes, I know what 'salt' really is...)
Suggestions (Score:3)
Re:Suggestions (Score:2)
http://weblog.rubyonrails.com/archives/2005/06/16/ javalobby-founder-ruby-on-rails-is-a-powerhouse/ [rubyonrails.com]
Re:Suggestions (Score:3, Informative)
Re:Suggestions (Score:2)
Re:Suggestions (Score:3)
You can use all the MoveableType posting tools to maintain content - or use the builtin Active Record, HTML based Admin Tool.
It's pretty young, and has a few bugs in the XML-RPC interface. But, it was easy to customize and fix the XML-RPC bug.
If you promise to be nice to my home DSL line: The Fermata [bardes.org]
what is it going to do (Score:2)
Not looking for flames, but explaining why you are writing a new app., noting what you are trying to do that current ones don't do, might be a good place to start in getting advice.
Re:Suggestions (Score:2)
Yet another CMS project? (Score:2)
Sure why not, there are probably more linux distros than linux users; so why not more CMS projects than those who use them?
I like the idea behind F/OSS. But sometimes it seems like, instead of using common code to work together on a project, F/OSS developers prefer to go in a thousand different directions all working on their own projects.
Re:Suggestions (Score:2)
Re:Suggestions (Score:2)
Re:Suggestions (Score:2)
Can you enlighten us as to why you are now a detractor? I like Plone and I wonder what would turn you off to it.
Re:Suggestions (Score:2)
$22.50 for the Beta .pdf, $43.75 for the real book (Score:3, Insightful)
Your math sucks. (Score:3, Informative)
In other words, the printed book is $21.25 if you take out the cost of the PDF.
I purchased the combo the day after it was released and must say it's more than worth the price.
Hard to believe (Score:2)
Re:Hard to believe (Score:3, Insightful)
Re:Hard to believe (Score:2)
Um, isn't Ruby TMTOWTDI? Granted people gravitate towards certain idiomatic ways of doing common things, but there is certianly more than one one, etc.
Books and tutorials are necessary to beat this into the heads of incoming developers.
Hey, great sales pitch. "Buy this book so we can beat some sense into your ignorant newbie head!"
Serioulsy, an issue with Rails is that it is a DSL on top of Ruby; knowing Ruby i
Re:Hard to believe (Score:2)
Can you name an environment where that isn't true? Python, you also have to learn Zope. Java, you learn Hibernate (or whatever). Of course you could just learn PHP & code everything from scratch. Then you wouldn't need to learn anything else. Of course, you get orders of magnitude l
Re:Hard to believe (Score:2)
Or, get this wacky idea: Just learn Ruby and code everything from scratch. Then you wouldn't need to learn anything else. And still get extra productivity.
There are indeed many good things in Rails, things that work best by offering a handy sublayer for common tasks without occluding the essential Rubyness of the code. But there
Re:Hard to believe (Score:3, Interesting)
hmmm (Score:5, Interesting)
I believe that not grokking MVC detracts from the value of your review, particularly with respect to your opinion of the architecture of Rails. Without understanding MVC, you can have no understanding of the design decisions they made, and as such, no qualified understanding of the architecture itself.
This was my only concern. Thanks for the review!
Re:hmmm (Score:3, Interesting)
Yep, I admit fully I'm probably not qualified as others to review the book. But I can only give my opinion, and for a newbie who's played with other architectures and run into a big pile of messy code after
Re:hmmm (Score:3)
I hate to be cynical, but O'Reilly are planning their own Rails books this summer. Not that they would hype something they didn't believe in ...
Re:hmmm (Score:2)
I'm not putting you down for writing it - and I think it would be a useful thing to read on a blog, or besides other reviews on a site like Amazon - but that this will be the only review of the book on Slashdot makes it a very bad decision to list it, in my opinion.
Re:hmmm (Score:2)
In this case, it's good to know that I can probably pick up this book, and without knowing much about either Ruby or the MVC design pattern, implement a clean web application that will be maintainable and extensible.
I can get expert reviews elsewhere. I wouldn't think of consulting Slashdot for them anyway.
Wow (Score:5, Insightful)
The appendices that cap off the book also provide the full tutorial source code, as well as a brief introduction to Ruby, the language that makes all the magic happen.
In short, Rails is a brilliant architecture
Agile Web Development with Ruby on Rails is a great choice, and will probably be the definitive book on the subject. The tutorial is probably the best I've ever read.
God. That last one sounds like Napoleon Dynamite.
A "beta" book, in PDF form, with typographical and technical errors, will probably be the "definitive book" about a brand-new framework? What a statement...
Don't get me wrong - I haven't had much time to play with Rails, and as a web developer, I probably should, in order to keep my skills fresh. I may even like it. But this fervent, sycophantic praise - spurred on by the blogerati (flamesuit enabled) - seems premature, especially when there are many capable web application frameworks out there. In the future, it might even seem silly. After all, anyone want to admit to owning a copy of Oreilly's book about Slash?
Re:Wow (Score:3, Informative)
Many
This book is written primarily by Dave Thomas who wrote pretty much the definitive book on Ruby and who was kind en
Re:Wow (Score:2)
It's been written by Dave Thomas who pretty much helped bring Ruby from Japan into the rest of the English speaking world, and DHH the guy who wrote Rails. It really doesn't matter if it is the best book in the future or not, only time will tell. Having said that, I'll stick by my statement.
Re:Wow (Score:2)
As for Rails itself, there's a resaon why so many smart people are fawning all over it. I STRONGLY recommend you try out Rails before you criticize. At least watch one of the demo videos on the homepage. Until you see it in action, you really can't really fathom how powerful it is. You
Better than Java, or just easier? (Score:2, Interesting)
So, my question
Re:Better than Java, or just easier? (Score:3, Informative)
The coding analysis: Ruby has a lot of semantic advantages over Java. It's easier to read, has less syntactic salt, and encourages t
Re:Better than Java, or just easier? (Score:2)
With Rub
Re:Better than Java, or just easier? (Score:2)
If you use Struts, Spring, etc., you configure every action in mulitple XML files. You map everything around so that the application knows what to do. This means you must define knowledge about your application's architecture in multiple places. It will be in code and in several config files. This gets complicated fast.
With ROR, the application code is in a folder called "app
Re:Better than Java, or just easier? (Score:2)
A week ago I've agree with you btw. :)
Re:Better than Java, or just easier? (Score:2)
Well, I realize that the main focus of CS degrees these days is either Java or C#, so perhaps you haven't heard of languages like Smalltalk or Lisp.
Yes, I tend to agree with what you're saying about PHP, but the same doesn't apply to Ruby. Ruby is a language that CS grads can love, it's fully OO like Smalltalk and has:
* mixins
* closures
* anonymous code blocks (which makes it very easy to define your own domain specific languag
Re:Better than Java, or just easier? (Score:2)
Ruby is often described as being strongly dynamically typed or perhaps dynamically strongly typed (depending on your emphasis). Contrast with C which is statically weakly typed. What that means practically is that if you try to send a method to an object that doesn't respond to that method you're going to get a runtime error. Sure, you probably won't catch this at compile
Dave Thomas is writing from the grave?!?! (Score:3, Funny)
Talk about an active guy! He helps Colonel Sanders start a chicken business, then founds his own restaurant chain, then dies, THEN writes a book about Ruby on Rails?
I'm clearly not doing enough with my life...
Well, _that_ is blatantly obvious (Score:2)
I am a Java developer, but... (Score:2)
I have been using it for a few months, and although ActiveRecord is lacks a little of the flexibility of Hibernate, it is good enough for lots of database backed web applications. I like how easy it is to replace automatically generated scaffolding code with your own code, but the scaffolding code gets you started quickly.
Also, Ruby is a fine programming language - it has just about totally replaced Python as my scripting language of choice. Using Ruby has also cut way
And for the Perl folks out there... (Score:3, Interesting)
Catalyst can be found at catalyst.perl.org [perl.org] or on CPAN [cpan.org].
Re:And for the Perl folks out there... (Score:2)
Who wouldn't want to learn Ruby?
Re:And for the Perl folks out there... (Score:2)
Whereas Ruby doesn't yet... (Score:2)
Rails posts prediction ... (Score:5, Insightful)
Either, one, that Rails is so amazing that after you use it sex seems laughably trivial by comparison, even and especially you count the production value -- one can, after all, only have one child (on average) using sex, but with Rails, dude, I HAD TEN.
Or, two, that Rails is no big deal, it's just another MVC re-think, heck I rolled one of those myself one afternoon a coupla years back, yeah it ruled but, you know, I'm really into that Java thing now. Besides, Rails is no good for BIG projects, for that you need Hibernate and a crane.
So I'll post one for the middle-of-the-road. Rails rules. I love it. I've reimplemented, in a week-and-a-half, a fairly large application that took me two months to do with Python. It's not a fair comparison because with Python I used Webware but did everything, like user management and logging, with no starting point, and also the first time around I wasn't as familiar with the problem domain.
With Rails I used the Salted Hash Login Generator [rubyonrails.com] which got the basics of my user login and management done in one fell swoop, an hour or two of work. I also re-used the view code from the Python app.
But the rest of it was fun. I enjoyed it. Things were done quickly and the API is awesome. ActiveRecord is not Hibernate -- yes, Javapeople, we know, we know -- but it's good. It's really good and super easy. And while there's some magic going on behind the scenes with Rails, it's not hard to understand at all.
That said, yes, if you're an online payroll system for IBM, Rails won't cut it. There are flaws, but for day-to-day stuff, not too many. It's updated very frequently, too.
My only complaint is the ubermensch of Rails, Dave Heinemeier, who, while smart, is also all too aware of it, and frequently shoots his blog [loudthinking.com] off about topics which go beyond Web frameworks and into areas of either glib tech-prejudice or, at times, more subtle see-how-smart-I-am dorkposts -- the most insufferable species of Geek.
Otherwise, I strongly encourage anyone to check Rails out. It's great and a *lot* of other frameworks in other languages could stand to pay attention to the innovations in Rails. These innovations aren't so much technical epiphanies, as they are the meeting of many good ideas in one place, along with enthusiastic support and a lot of glue. Ruby's fun, too.
Check out, also, the frameworks from other languages which are shamelessly stealing from Rails:
Subway [python-hosting.com] (Python)
Catalyst [perl.org] (Perl)
Re:Rails posts prediction ... (Score:2)
Castle Project [castleproject.org] works on
Cake [sputnik.pl] is a Rails-like framework for PHP, and Biscuit [ripcord.co.nz] is another.
Lest the Java folks feel left out, there's also Trails [java.net].
Re:Rails posts prediction ... (Score:2)
Slightly flawed in that it uses a constant salt, meaning once a set of rainbow tables have been generated all your passwords are easily compromised.
I had a patch to it that supported non-salted, statically-salted and dynamically salted passwords (upgrading on auth) without changing table schemas beyond the default 38 bytes. I don't have it to hand unfortunately, but it's not hard to do; just use pack() to b64 the hash, put in some random bytes next to it seperated from the ha
Re:Rails posts prediction ... (Score:2)
Um, if sex is complex for you, I think you're doing something wrong.
The basics are very simple... (Score:2)
Perhaps it would have been more accurate (if clumsier) to say that the context surrounding sex can be complicated.
Slashdot these days: (Score:4, Funny)
R!
O!
R!
ROOOOOAAAAR!
RUBY ON RAILS! So fucking awsome I gotta,
I've got it! Yeah! I've got a vision, people, a vision!
We're gonna have Ajax and we're gonna put it on Rails and it's all gonna be like Lucy in the Sky with Rubys.
Oh my gosh am I seeing some shit....
This is so awesome...
(And now for the real thing watch this post being modded +10 Insightfull)
Re:Slashdot these days: (Score:3, Insightful)
Re:Slashdot these days: (Score:3, Funny)
Re:Slashdot these days: (Score:2)
RoR already does Ajax. There's a nice JavaScript library called Prototype that's integrated with RoR out of the box.
I remember this level of hype surrounding many other things in the last 15 years; Linux, Apache, MySQL, Perl, PHP, Python, Java, JBoss, etc. The thing is most of them have lived up to the hype to some degree and now they're taken for granted.
RoR is worthy of the hype. It eliminates bullshit in the web app stack. That means you, th
Comment removed (Score:4, Funny)
Ruby vs Java (Score:4, Insightful)
I use Java (and parts of J2EE).
Its too bad there's no truly free/open source runtime yet, but I'm sure that day will come soon.
Another problem with Java is really too much choice. Sun's higher level solutions tend to be over engineered, so everyone and their uncle have designed their own complex framework for object persistance and session management, along with the mixed bag of JSRs. Thus you have Java advocates like Javalobby saying Ruby on Rails is a great framework, and all the best free CMSs are PHP.
I am sure that Ruby on Rails makes it quick to put up a web site that supports database CRUD operations, but just like using Visual Basic to create forms, what do you have after that part is done?
The reason I like Java is its maturity and community, as well as the rigidity of the language.
Because of its multi vendor and open software support, you can find an open source or at worst free-as-in-beer library to do just about anything, and there's plenty of discussion about using all the components that exist.
If you don't like Java's rigidity and verbosity, there are some nice improvements in JDK 1.5.
From pre-1.5:
void cancelAll(Collection c) {
for (Iterator i = c.iterator(); i.hasNext(); ) {
TimerTask tt = (TimerTask) i.next();
tt.cancel();
}
}
in 1.5:
void cancelAll(Collection c) {
for (TimerTask task : c)
task.cancel();
}
Or you can execute Groovy, Jython, JRuby, etc in a JVM, or alongside PHP with JSR 223.
I don't think execution speed arguments against Java are accurate any more, especially when comparing it to languages such as Ruby, Python and PHP, and I find the memory requirements to be easily manageable in typical situations (Firefox, alas, takes much more memory on my workstation).
Creating a working application in any environment is fairly easy for anyone with sufficient training and experience, but unless you're a rare master, once you are at that plateau of a working app and you need to change it, the maturity and popularity of your environment become very important for support.
I think hands down Java is the winner here with great tools like Eclipse, with great refactoring support and where you know even in large projects what is broken as you're working on code, as well as the large community for support.
The portability of Java is also very good, you can become very OS agnostic (unless you need to get into a few aspects such as multimedia).
Anyway, sorry to wax on, and I'm always trying to find out what other environments offer, but I don't think Java is given enough credit.
Re:Ruby vs Java (Score:2)
def cancelAll
TimerCollection.find(:id => params[:id]).tasks.each { |t| t.cancel }
end
Find a timercollection with a certain idea, then iterate through each of its tasks and cancel them. Ruby is more wordy than Java 1.5, but this aids readability.
I don't think Java is given enough credit.
You are probably right there.
Re:Ruby vs Java (Score:2)
def cancelAll(c)
c.each { |t| t.cancel }
end
Re:Ruby vs Java (Score:2)
Well, not exactly. Ruby is Rails. Most frameworks require a language, a templating engine and other plumbing to make it all work. Ruby on Rails is all Ruby. Even the templating are Ruby tags using ERb. You don't need to learn a "simple" templating language (which confuse web designers most of the time). There's no need to cheat by stuffing code in places where it shouldn't be (aka seperating the HTML fro
Re:Ruby vs Java (Score:2)
Re:Ruby vs Java (Score:2)
If you're referring to EJBs, you don't have to use them, and most people don't. "J2EE" to many people does mean EJBs, but you can use JSP and JDBC for the equivilent of the PHP world, or Java classes and some kind of lightweight (Spring) to heavy (EJB) kit depending on what you need to do.
So you're left with a language with lots of history and support, which isn't a bad thing. You may have more code, but I'd be quite surprised if that doesn't have some advantages as well as you need to make finger grained
What (Score:2, Interesting)
explain for the newcomer (Score:2)
Zope (Score:3, Insightful)
Re:Zope (Score:2)
That's why they tend to stumble on the shoelaces rather often.
"I want effects, and I want them fast. So what if it breaks in 1 out of 20 cases, it's good enough for me".
A review of a beta book about an alpha framework. (Score:2)
Don't let your Java get run out on a Rail just yet (Score:4, Insightful)
1.) Give up a decent IDE. The development tools are crap. Good luck trying to fire up a Ruby IDE, and set a breakpoint in WEBrick or Apache mod_ruby. You can't. Even if you hack around with the breakpoint command and include the debugger in the code you want to debug, the debugger is buggy and makes old skool commandline tools look sharp.
2.) Bet the farm that RoR only deals with you 80% problem, and your requirements won't break how it needs the ActiveRecord pattern. ActiveRecord looses it's luster once things get complex (see http://www.theserverside.com/articles/article.tss
3.) How do you like your OO style? If it's from the Jacobson camp, you're in for a treat! Objects are just dumb repeats of database tables 1st and foremost. Oh sure, you can add methods to do that OO thing if you must, but that's not the true essance. If you believe true object nature comes from behavior and not data, (ala Yordon & Coad) you won't be comfortable here.
4.) You're agile? You "get" test driven development? Give it up. RoR says you use a script. This hurts even more if you take issue with number 3 above. RoR rewards you for being database driven. Just define your scheme and all of your objects and a few controllers will get generated for you along with stub unit tests that pass by default. Just accept the required two line *Helper classes as well(yeah. TDD would have pushed me to create those).
5.) More on testing: hope you like having to rely on populating test data into your database. We kept hearing you can mock your persistance, but even some of the experts we talked to couldn't show us how (folks who are paid to work on a RoR product). Sure, folks said dependancy injection via Needle, but we couldn't find jack out about it.
6.)Speaking of database driven, that is a greenfield project you have with no legacy concerns and absolutely no complex O/R mapping requirements, you're starting RoR on right? No?!?! That's ok. just shoehorn RoR with updateable views or change your schema so that ID's are done the way ActiveRecords likes. That's no problem for your existing aps, is it?
7.)That had better be an OpenSource database you're using. It's not unheard of to "enjoy" a broken release for packages like ActiveRecord when the developers don't have access to Oracle or SQL Server. This happened to us and RoR was broken for about a week between releases in the 0.9 to 0.10 range. Yeah. That was a "release". Not CVS, not alpha or beta. Release. On the upside, we did patch ourselves, so "go OpenSource".
If the Rails fanboys want to mod me down, have at it. I stand by my overall opinion. Keep in mind, I have no issue with Ruby itself. In fact, it stands to give Java a real run for it's money. RoR on the other hand, is immature and over-hyped at best, and a rat's nest of garbage at worst.
Re:Don't let your Java get run out on a Rail just (Score:2)
For IDE choices I personally use Eclipse with the Ruby plug-in now, although I have used FreeRIDE in the past and some other alternatives (like WideStudio, which is an IDE that is distribut
WebObjects Developer Enjoying RoR (Score:2)
I'm a WebObjects developer that is always looking for something new and RoR so far seems great.
While there are clearly still some things that could be improved (especially in the ActiveRecord ORM), for being less than a year old this thing is VERY far along.
The opposite of something like Struts, you can feel that RoR came from a real application instead of design-by-committe.
Meh. (Score:2)
Show me a big app that uses it? (Score:2)
Re:Show me a big app that uses it? (Score:2)
As for Ruby offering you nothing that you can't do with Python I would argue that you can do things simpler, more concise, and more logically in Ruby. The code is cleaner so if you are picking up the code for something you developed six months ago things should fall into place easier.
IMHO Ruby == Prettier and more OO than Perl and Ruby == More powerful than
Re:wasn't this just on here? (Score:2, Funny)
Re:It's Hawt (Score:2)
No, not really. Many authors have made prerelease versions of their books available. The main difference here is that people are required to commit $$ to the final product before it is actually ready.
This is damn good marketing. Late in releasing your product? Fearful a competitor will get to market before you and steal your thunder (and revenue)? Sell a product that isn't finished, claim this is so
Re:It's Hawt (Score:2)
Defending Python (Score:2)
Ruby doesn't really bring any significant advantages over python. Neither does Ruby-on-rails. It's just the new-kid-on-the-block enthusiasm that Ruby is enjoying ATM.
Really, look at the current situation: Python hasn't replaced Perl as the most popular scripting language yet, except perhaps in the open source community. Even if Python and Ruby both stand at the "400% better than perl" point. What chance do you think Ruby, which is 5%
Re:Defending Python (Score:3, Insightful)
> advantages over python. Neither does
> Ruby-on-rails. It's just the new-kid-on-the-block
> enthusiasm that Ruby is enjoying ATM.
As someone who coded in Ruby, Perl and Python today(!), I'm inclined to agree to some extent.
Where both Ruby and Python are failing to replace Perl is with something comparable to CPAN.
For example, this morning I was trying to parse a bunch of data out of HTML tables in Ruby, and tearing my hair out with frustration; I switc
Re:Charge for Beta PDF and booK? (Score:3, Informative)
Considering the normal cost of technical books, I think it's a sweet deal. These are not small books.
Re:Charge for Beta PDF and booK? (Score:5, Informative)
J/K (Score:2)
Re:Charge for Beta PDF and booK? (Score:2)
In all cases, you get the beta version PDF now, intermediate PDF releases, and the final PDF version.
If you buy the book too, you get the book when published.
Re:Since when does "huge" apply to Ruby? (Score:4, Informative)
Re:Yeah, Sure... (Score:2)
I purchased the beta-book half a week ago and I'm very impressed and pleased with the quality, let alone the mindset behind the decision to make it available early.
Re:Since when does "huge" apply to Ruby? (Score:2)
Apparently there were a few people who bought the book the first week-end...
http://blogs.pragprog.com/cgi-bin/pragdave.cgi/Ran dom/RailsBeta2.rdoc [pragprog.com]
Re:why is slashdot obsessed with RoR? (Score:4, Insightful)
Rails is a flexible framework that allows you to keep your house in order when coding Web applications and which encourages test driven development. Ruby, as a language, makes this all very easy as almost everything in Ruby is an object, so the syntax becomes intuitive. Some people tried to replicate RoR with PHP, and the syntax was vile and full of syntactic salt.
Using Rails to develop Web apps, as opposed to, say, PHP, is like using a language that has garbage collection over one that does not. It removes another level of complexity and lets you focus on the important stuff.
Meh. (Score:2)
It is neat and all; I like the structure, and it looks fine for form-per-table sorts of toy apps, but I really don't see the advantage for anything more complicated.
Re:Meh. (Score:2)
If you have to ask, you don't need to know. I'd talk about predicates and lazy evaluation, but I think you're more concerned with your e-penis than the question at, um, hand.
Everything about what you've written says "clueless small business developing little piles of shit."
Great. So why are you wasting time with me when you could be writing Enterprise Software(tm) for the big boys? Run along, little man. I'm sure there's a marketing
Syntax preferences are not facts. (Score:2)
Re:why is slashdot obsessed with RoR? (Score:2)
I had a look at Ruby on Rails, and what entices me most is the fact that for every part you need, you can use the same language.
I did an application in Zope last year, and I really had to jump through hoops. It is not possible to apply consistency in syntax across all levels, and you must study Python, Zope Page Templates and DTML.
Ruby on Rails does not seem to have this problem.
Re:Thats fairly meaningless... (Score:2)
You have clearly never used Rails. Testing is very specifically implemented in Rails, it's actually part of the "way" of doing things.
I understand that RoR is a mature programming language in that it offers layers of abstraction. Get in line behind half a dozen other solutions.
Re:still sound and fury, and a touch a flame to bo (Score:2)
"it's a framework around Ruby."
Which. Means. What. ?
If you don't know what "framework" means in relating to coding, this is not the article, book, or topic for you.
Right tool, for the right job, for the right (development) price.
We can agree on that. This is why I use other languages in ancillary systems around some of my Rails ap
Re:What exactly is "on rails"? Someone help me out (Score:2)
More seriously... Rails [rubyonrails.org] is a rapid web application development framework. It's written in the Ruby language, hence the "Ruby on Rails." It abstracts things quite well, leaving you to worry about actually implementing the program logic (and site design) rather than managing database connections, writing getter and setter methods, sanitizing user input, and all that oh-so-fun stuff.
If you've got QuickTime, the "Show, Do [nextangle.com]
Re:What exactly is "on rails"? Someone help me out (Score:2)
Re:does RR have .... (Score:2)
Yes, you can store objects in a session context. Sample and gotchas here [rubyonrails.com] at the RoR wiki.
Also is there something that sync's sessions from one server to another to support load balanced environments?
More than something, there are numerous ways to support this. You can store you session data in temporary files on the server (the default), share it using Distributed Ruby, store it to the database for retrieval... So y
Re:I Didn't Know What Ruby Was, But I Found Rails (Score:2)
Re:I Didn't Know What Ruby Was, But I Found Rails (Score:2)
The efficiency part I can understand, but having to declare self as first argument for every class method, for example, is far from elegant IMHO.
Re:I Didn't Know What Ruby Was, But I Found Rails (Score:2)
Re:I Didn't Know What Ruby Was, But I Found Rails (Score:2)
See, now, I was just thinking the same about languages that care how much whitespace is at the start of a line.
Re:Ruby on Rails?? Looks like ASP to me. (Score:2)
Yes. Rails does a huge amount of stuff for you that you would have to do on your own with ASP or PHP. You can do a hell of a lot of stuff without ever, ever writing the equivalent of rs.MoveNext().
Re:Ruby on Rails?? Looks like ASP to me. (Score:2)