Advanced Rails 170
yukster writes "As Ruby on Rails rocketed into the development community's hearts and minds a few years ago, the number of books on the subject climbed with it. However, a lot of these books were introductory in nature (Agile Web Development with Rails, Beginning Rails, Build Your Own Rails Applications, etc.). What's a budding Rails-head to do once they've gotten the basics down? Books like Advanced Rails, which was released late last year by O'Reilly, aim to fill this void." Keep reading below for the rest of Ben's review.
Author Brad Ediger has been kicking around the Rails scene since the pre-1.0 days. Though not a Rails "luminary" necessarily, he certainly qualifies as an advanced user. He is CTO for a Real Estate tech company called Tasman Labs and runs a web design (and Rails consulting) firm called Madriska Media Group. He seems like a sharp cookie and a decent writer.Advanced Rails | |
author | Brad Ediger |
pages | 357 |
publisher | O'Reilly |
rating | 10 |
reviewer | Ben Munat |
ISBN | 0596510322 |
summary | Extensive reference for advanced topics in Ruby on Rails development |
Advanced Rails covers quite a bit of territory, going for breadth rather than depth most of the time. Each chapter covers a classic, pivotal development concern... well, at least most of them do. The chapters are as follows:
1. Foundational Techniques
2. ActiveSupport and RailTies
3. Rails Plugins
4. Database
5. Security
6. Performance
7. REST, Resources, and Web Services
8. i18n and L10n
9. Incorporating and Extending Rails
10. Large Projects
By "Foundational Techniques", Ediger is referring to Ruby and Rails techniques, principals and patterns like Metaprogramming, Don't Repeat Yourself, and Functional Programming techniques. The chapter also goes into a fair amount detail about the Object/Class/Module relationship. A bunch of this may not be particularly new material for most Rails users who've been at it for at least a few months. However, it's still nice to have all this stuff in one forty page chapter... good to have handy to refer to. Also, there are some nice nuggets in there that could save you some head-scratching. For example, what's the difference between Kernel#lambda and Proc.new? The answer is that, if you *return* a value from the block passed to Proc.new, the calling method is exited as well, abandoning any code that you might have after it.
If the first chapter feels like it's leaning towards a reference work, the second chapter — which digs into all the goodies offered by ActiveSupport and RailTies — pretty much falls over right into reference-land, complete with a method-by-method listing of features added to standard library classes. This may seem even more like just putting api docs available online into print, but Eidger definitely adds a bit more explanation. And, I haven't really seen anyone give a rundown of just what the heck RailTies does. That's the library that provides the glue to pull together the more famous Rails libraries to make it all work together as rails: generators, initializers, etc. There is definitely some interesting and not necessarily readily available information here.
Chapter three covers Rails Plugins, and is quick and painless. It explains the common files and directory structure in a plugin and talks about how Rails loads them. It also talks about using Piston instead of svn:externals to manage plugins and show some example plugins.
The following three chapters cover more of the classic eternal problems faced in running high-traffic sites: databases, security, and performance. These really make the most sense in an "advanced" book; they are the "brass tacks" that everyone must get down too if they go beyond the "toy app" stage. Ediger talks about the strengths and weaknesses of the various popular database systems. He also goes into the benefits of using the filesystem to store data, which is largely because web servers can make use of fast system calls to dump files straight into the TCP socket. He also covers some advanced db features like composite keys, stored procedures and clustering.
The security chapter isn't all that long and a lot of the info it covers can be found in beginner Rails books... SQL injection, cross-site scripting etc. However, the book would be remiss to not include this material and it is presented in a concise and complete manner. This would be good to refer back to now and then to make sure you haven't slipped in your security awareness. Ediger also doesn't hesitate to make specific recommendations, like "whitelist rather than blacklist".
He also jumps right into recommendations while writing about performance optimization in the next chapter: "Algorithmic improvements always beat code tweaks", "As a general rule, maintainability beats performance", "Only optimize what matters", "Measure twice, cut once". He then goes on to cover specific tools and techniques for uncovering your bottlenecks, from a quick explanation of basic statistics to using httpperf, benchmark, and Rails Analyzer Tools, improving database calls (using indexes and "include" on finders), and the various caching solutions. There is plenty of good information in this chapter; also a good bit of reference next time you need to track down a logjam.
Chapter seven covers RESTful Rails, from the very basic theory as outlined by Roy Fielding to exactly how Rails has chosen to use these concepts, and is the longest chapter in the book. The amount of coverage REST gets seems questionable since Rails has been very heavily into the RESTful approach for over a year and embraced the philosophy so thoroughly that it's hard to imagine anyone using Rails today without being exposed to the concepts.
On the other hand, one can still wire up verb-oriented actions in routes.rb and might be able to get away with ignoring all the RESTful goodness. So maybe there are some out there that can benefit from this chapter. Plus, having such thorough, theory-to-practice coverage allows the chapter to stand on its own as a solid reference to the whys and hows of RESTful Rails. It also has one of the better sections on RESTful routing that I have seen (routes being one of the more mysterious and sometimes frustrating pieces of Rails).
Rails has gotten plenty of grief for its lack of official support for Internationalization and Localization, but in Chapter eight, Ediger lays out the options, such as gettext, Gibberish, and Globalize. He is most enthusiastic about this last library and it does appear to be quite powerful, including support for translating strings, translating model fields, localizing numbers and dates, and even recording what needs to be translated by saving them in the database. Creating multi-lingual websites is a hard problem in any web-development framework and most other frameworks have plenty of head start. However, Ruby and Rails certainly isn't without options and it will only get better.
The next to last chapter of Advanced Rails runs through a number of alternatives to the standard components of the Rails framework. On the database end, it covers DataMapper, Ambition, and Og, giving this last one the most attention. For alternatives to ERB templates, Ediger talks about Markaby, Liquid and Haml, all in a very brisk fashion. He also talks about using traditional Rails components — like ActiveRecord and ActionMailer — outside of Rails applications. The chapter closes with a discussion of how to contribute to Rails (hint: submit a patch... don't just bitch!).
The last chapter is called "Large Projects" and covers some useful information about working on a Rails project with a team, beginning with version control (though anyone who is writing code that covers more than a single file and *not* using version control is just plain insane). This starts with a quick overview of Subversion, however this feels like it is really a set up for making a case for "decentralized version control". Ediger does a good job of explaining these concepts, using Mercurial for his examples. This seems a bit unfortunate, since many people on the Rails core team have embraced Git and it is looking like Rails will eventually move its repository to Git. However, Mercurial has a reputation of being more user-friendly, so that may have influenced his decision. And it's useful information regardless.
Chapter ten continues on to discuss avoiding migration numbering collisions, issue tracking, keeping Rails and required gems within a project, web servers, load balancers, production architecture and deployment tools like Capistrano. This is all covered in a fairly quick fashion so don't expect a lot of depth.
That last sentiment came up often while reading this book. It often felt like Ediger was trying to get every possible Rails-related topic into the book that he could, but didn't want to come out with some 1000-page behemoth. Plenty of the topics mentioned don't have much more coverage than you could get with a quick "googling". However, there is something to be said for being exposed to a lot of tools, projects and concepts in one go, even if the exposure is sometimes superficial. I definitely found reading this book worthwhile and will keep it around to refer back to now and then. I don't know if I'd go so far as to label it required reading, but then again books on web frameworks rarely are.
You can purchase Advanced Rails from amazon.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
I'd recommend the Rails Cookbox instead (Score:4, Informative)
Re: (Score:2, Informative)
Good old RubyOnRails (Score:4, Funny)
Re:Good old RubyOnRails (Score:5, Interesting)
Re: (Score:3, Insightful)
Re: (Score:2)
Really boring example of Rails money $100/hr (Score:4, Informative)
Could I have written it in PHP? Sure. Could I have done it as quickly? Probably not. The problem screams Rails Me -- little application, not all that much complexity (probably under 500 LOC outside of the view templates, which are 99% HTML), and its performance requirements are quite modest. (It typically deals with about a thousand visitors a day, although the application could chug through that in about 10 seconds in my tests, with caching turned off.) As for the exhorbitant hardware costs of the system, I was forced to move up from $7 shared hosting to a $20 VPS so that I could continue doing $1,500 in sales every month. Oh noes.
Anyhow, like I said, pretty boring. I anticipate, on the basis of the increase in traffic and trial downloads that I've had since launching, that the rewrite will be worth about $100 in additional profits for every hour I worked within the first two months. I keep adding new little features, too -- spent an hour yesterday adding Javascript graphs on the back end -- and it is some of the easiest web programming I've ever done. (I do Big Freaking Enterprise Apps in Java by day.)
Incidentally, a big "Heck yes" to parent when they said "The real money, however, is in developing your own stuff and then selling it on as a going concern." Why take a fraction of the revenue of your client's website once when you can operate the website yourself and take all of it on an ongoing basis. (And if it gets to be too much work, you hire out the boring stuff to folks who think $10, $50, or $100 an hour is a lot of money.)
Re: (Score:2)
Re: (Score:2)
Working in the "enterprise" sucks. Partially because large corporations are soulless hells, bu
Re: (Score:2)
Re: (Score:3, Interesting)
Also, a friend's company now has more Rails projects coming through the door than Java ones.
Here's a nice post [pivotallabs.com] from a company doing more than just paying the bills.
Re:Good old RubyOnRails (Score:4, Interesting)
Re: (Score:2)
I'm a full-time rails dev, have been for the last 2 years. The interwebs are big, lots of room (and money) to go around, so I'm not sure why people feel the need to bash rails so much. Seems like a wast
Re: (Score:2, Insightful)
So I ask: Why the bashing?
Re:Good old RubyOnRails (Score:5, Interesting)
Re:Good old RubyOnRails (Score:4, Insightful)
There's a simpler reason for bashing Rails: it's a threat. It's just that simple. Any time something comes along that can feasibly put market pressure on existing technologies, there's going to be bashing.
Rails pays my bills. I honestly don't give a damn what anyone else thinks if it's meeting my clients' needs. Simple as that.
Re: (Score:3, Interesting)
This is where Groovy and Grails comes in. I just attended a conference with a bunch of Java developers and the Groovy/Grails sessions were all packed, and they were the talk of the sh
Re: (Score:2)
Um, JRuby on Rails can do that. I've packaged up Rails apps in a war file and deployed it to app servers.
In fact, the IDE I'm using (NetBeans) uses JRuby by default and automatically create
Re: (Score:2)
On a side note - you're using NetBeans?! Everyone I know uses Eclipse and/or IntelliJ.
Re: (Score:3, Insightful)
You honestly think that any app you write is going to be better than its analog built in Rails? That you are a better developer in your chosen language/framework than every other Rails developer on the planet?
And you call Rails guys arrogant?
Re: (Score:2)
I think that just about any application can be better written in PHP than in Rails (and I really dislike PHP, too.) But it probably can't be written faster. As for the coward's skills, I really can't say.
Re:Good old RubyOnRails (Score:5, Insightful)
And upon what do you base this claim? The fact you're directly comparing Rails (a framework) to PHP (a language) is telling. It'd make a lot more sense to say "I think any app written in Rails could be written better in CakePHP" although that claim is obviously rather dubious, as well. To be truly appropriate, you ought to talk Ruby vs PHP. And if you get to that point you're going to have to justify what "better" actually means. What it means to you isn't what it's going to mean to anybody else and vice versa.
In the end, this debate ends up being Mac vs PC vs Linux vs Whatever. Everyone's got their opinions. What works for you is the right solution for you.
Re:Good old RubyOnRails (Score:4, Informative)
Yeah. Those few lines of code that load the actual framework really muddy the waters. The fact that you're talking about "framework specific handlers" as an attempt to criticize a framework is a good indication to me that you've never tried Rails at all and just assume you're right about everything. If you never use any framework in any language, congratulations. On the other hand there are those of us who think a couple hundred K of memory used by persistent processes is worth significantly (by your own admission, perhaps 50%) reduced development time and thus cost.
As far as "indirection" via AR, if you don't want it you're free to not use it. It's one of the truly magnificent things about Rails. On the other hand if there's a particularly cumbersome query you're quite free to write it in raw SQL. There's a performance boost to be had there, yes. To the vast majority of web applications it's negligible, and that means that its benefits again outweigh its drawbacks. Rails isn't the perfect solution for EVERY project, but a handful of exceptions doesn't make it a bad rule.
Yet another irrefutable clue you made up your mind without ever bothering to try anything yourself. Or that you're a pompous ass, either way. Comparisons of scalability are ABSOLUTELY MEANINGLESS if you only provide one of the two items to be compared. Thus your statement is absolutely meaningless. Given the rest of your post, and your previous ones, that seems to be par for the course.
Rails handles scaling well. It probably handles less before it NEEDS to scale in MOST cases, particularly when it is (unfairly) compared to languages rather than other frameworks. If you really are on the border where Rails means you need an extra machine and (say) PHP doesn't, then maybe this is one of those areas where Rails isn't your solution. If you're already into the realm of needing to add hardware to handle load, Rails provides a lot of great solutions for doing that. And once again, it's going to be simple to implement.
I'm not simply talking out of my ass. I've worked on some projects for major clients including ESPN that were done in Rails and are humming along beautifully. Worse yet, some of these projects were extremely time-sensitive, by which I mean that most of the day they do very little work but when the work comes it comes in a huge swarm in a short time window. IE, the worst-case scenario as far as loading servers. It's still working fine, and we got to charge ESPN half as much as we would have for development of a PHP solution. They're already sending us more business, so I guess evil, evil Rails didn't destroy their company too badly. There are obviously many similar stories of huge sites working just fine on Rails, such as yellowpages.com.
To sum it up: Yes, a framework has some additional overhead compared to a simple language such as PHP. An interpreted language won't run as fast as a compiled language like Java or .NET (to bytecode). These are facts. What's in dispute is whether this makes a significant difference, and my experience with popular projects for major clients is that a well-coded Rails solution holds up fine.
You're right that development cost is sunk and electricity (and similar) costs are ongoing, but before that matters you have to be talking about MAJOR projects that are very probably billed minimum in the tens of thousands of dollars range and, realistically, probably over the hundred thousand dollar threshhold. At this point, your 100% more development time is a significant cost that is likely to take many years to balance. Even a $5,000 a year difference in marginal cost if you're talking a $25,000 or $50,000 difference in developemnt cost is
Re: (Score:2)
This is one thing that really impressed me. They made it just as functional for people who aren't publishing/managing their own database schema, as they did for those who are. The UI components are completely decoupled from the from whatever mechanism is used to access a data store, so there's a LOT of flexibility.
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
As a nice little example, consider the following:
A mid-grade colo web server* costs about the same amount of money annualy as an average developer** does in two business days.
*: A dual 3-GHz, 6-8 Gig of RAM, 2x750 GB Hard drive box including a terabyte of traffic. Comes with a clean linux install and full ssh access, software mgmt is left to you. We're talking about commodity hardware and a ~99.5% SLA here, though three to f
Re: (Score:3, Interesting)
You make some good points about Rails's flaws, although I'd argue that many of them are related to ORM in general and have less to do with ActiveRecord's implementation than the concept as a whole. Your mention of "interpreted" gives me pause, as it almost sounds like you're arguing that interpreted languages are inherently flawed. I'm not say that's what you're saying, but I think you can see how that could be, well, interpreted.
Of the things you pointed out, I'll candidly say that Rails deployment is
Re:Good old RubyOnRails (Score:4, Informative)
But just look at a couple [rubyhitsquad.com] examples [robbyonrails.com] of why people run away from the community. (For those who don't know, the second example is DHH, creator of Rails.)
Re: (Score:3, Interesting)
I find this argument amusing every time I hear it. Those in the Rails community are often called arrogant for insisting on things being done "The Rails Way", when it's often your own arrogance that won't allow you to do something any other way. In either case, it's the people you have a problem with. There are far fewer legitimate complaints about the Rails Framework than there are about Rails people. You can dissociate yourself from the people and still have a capable framework.
If you don't want to d
Re: (Score:3, Interesting)
I agree entirely, although occasionally some of the more arrogant things that I don't agree with make it into the Rails Framework.
So far, enough people think like me that it hasn't been a problem -- there's always a plugin or set of scripts somewhere to help me out. A recent example: Schema Validations. While not all validations can be reflected in
Re: (Score:2)
Ultimately, what it boils down to is that Rails is a framework. Frameworks are never as flexible as the languages in which they're written. Because most of the paradigms which Rails was built for are well-understood and already have open-source projects available for them, Rails isn't much use to me (I don't want to write yet another CMS, I want to extend an already-written one.)
Re: (Score:2)
Re: (Score:2)
What alternative would you suggest?
I like to think that the plugins I mention are a good idea regardless. For example, "validates_uniqueness_of" is never going to be thread-safe without taking a pretty
Re: (Score:2)
ThruDB [thrudb.org] seems to be the favourite in the Rails world at the moment. But any high performance hash store will do. There are a lot of very interesting projects happening in this space right now.
As mentioned above, for most web applications you need a database that is built to stores hashes, not structured table data and relationships. ActiveRecord turns SQL into a rudimentary hash database. It's a hack, but it was the best option
Re: (Score:2)
Except the database was built for concurrency, and ActiveRecord wasn't. Example: validates_uniqueness_of is a nice thing to have, but it is NOT a substitute for a unique index in the database.
Putting that kind of information in the database helps, because it means I can be scalable without trying; the database has (mostly) solved the concurr
Re: (Score:2)
Alternative theory: it's a nice framework, but its adherents insist that it's a marvel of engineering the likes of which have never been seen before, nor will ever grace us again, and that it completely obsoletes all other methods of developing web applications. They base this on the fact that you can pick up a Rails book and bang out a trivial application really quickly.
In
Re: (Score:3, Informative)
Rails is *nice*. I like it. I just don't get the obsession with it. And, let's be honest, it's not in widespread use. From a purely *financial* perspective, you're much better of learning the in-and-outs of something like ASP.net or PHP. Or, hell, even Perl. Those are all more widely used, and better supported.
Widespread use != high paying jobs (Score:2)
Re: (Score:2)
Re:Good old RubyOnRails (Score:5, Insightful)
Threads workaround (Score:3, Informative)
Yes, it takes more effort to set up, but that also makes it really easy to scale since the component parts of a Rails deployment (Load Balancer / Web Server / App Server / DB Server) are each very sc
Re: (Score:2)
As for processes vs threads: where did you get the idea that a process is more heavyweight than a thread? Modern Unix oper
Re: (Score:2)
Re: (Score:2)
Rubinius is already copy-on-write friendly. Yukihiro Matsumoto has shown interest in my patch, and I'm currently trying to get it merged back to upstream.
Re: (Score:2)
Not so with the new Rails deployment solution that will soon be released. Tests so far has shown that it reduce memory usage in your Rails apps by 33% on average. It also makes Rails deployment easy as cake - only uploading files is required. No manual port management, no manual cluster management, no manual Rails-specific configuration. Resource usage is automatically adjusted to traffic.
If you're interested, I can provide you with more information.
Re: (Score:2)
Re: (Score:2)
Your claims are similar to that of a lot of other naysayers. There's obviously a lot of misinformat
Re: (Score:2)
Yes I read that. Someone commented that the quote was taken out of context, and that there was some system problem involved.
We can argue about what *really* happened all day long, but let's take a look at the facts: Rubyonrails.org is online. The 37signals website is online. Basecamp is online. All *my* Rails apps are online. None of them are showing symptoms of 400 restarts per day, or even multiple restarts per day. 37signals is still in
Re: (Score:2)
Did you miss my sentence in which I said JRuby has great threading support? You had a legit complaint about threads, and it's been solved in one of the Ruby implementations. What is the problem? You suddenly started calling us "shit" and "stink"?
Re: (Score:2)
As for administration, I know a lot of people like things like Mongrel and the sorts, but I've found that admin'ing busy websites is fairly simple using Apache + mod_fcgid (NOT mod_fastcgi). I think few people are aware of this option, but it works quite well.
As for scalability, most of the issues I've had with scaling were solved by either (a) writing better queries, or (b) d
Re: (Score:2)
Re: (Score:2)
Everyone is always quick to bash RoR but I have honestly never heard a well crafted explanation as to why it's an inferior language / framework. I personally use Java, but that's only because I was raised on it.
So I ask: Why the bashing?
Generally because Rails seems to attract a lot of zealotry, and wild claims of it being the best at everything imaginable and how everything else sucks compared to it.
It's a very nifty framework and it definitely has its place. But it's not the be-all-and-end-all of web development that some people claim it is. I see the bashing as mostly a backlash against the zealots.
Re: (Score:2)
It looks like they bash it because it is a threat to their current state of knowledge, IMHO. When things become too simple, you loose your "guru" status. I've experienced that (at another level) when WYSIWYG web editors such as dreamweave allowed non-technical guy to code a "relatively" clean code . Suddently those folks (i was part of them) lost their HTML king status and they were forced to migrate to a higher level (perl and then java/c# web developer in my case). Sure things ar
Re: (Score:3, Informative)
Rails has paid my bills since 9/2005. And I'm a lot happier than I was coding Java.
It would pay the bills for two other people too, but we can't find anyone to take a full-time job in it. It seems that anyone who knows Rails right now in SF is contracting at $125/hr.
Not to say Rails doesn't have its problems as a technology and a community...
Re: (Score:3, Informative)
Also, I was a full-time rails developer for nine months.
Not So! (Score:2)
I've found that although you probably wouldn't want to make slashdot in Rails, it's very, very handy for blogs, portfolios, resume sites, intranet applications and proof of concept applications.
Re: (Score:2)
Re: (Score:2)
Re: (Score:3, Funny)
Re: (Score:2)
On a more serious note, we outsourced our website to a company that built it on Rails. We were going to host it internally but at the time Rails had a few issues running on a Windows server and we didn't want to invest in the time and money to get a Linux server running in our environment so we let them host it.
Re: (Score:2)
Chapter 10 - Large Projects (Score:4, Insightful)
Perhaps the fellow readers can give some more insight into this?
Re: (Score:1)
yellowpages.com [yellowpages.com] runs on Rails, and that's a large, enterprisey project.
All of 37signals' products are Rails sites, too, and they're handling data for plenty of enterprises.
There are a lot of "horror stories" precisely because they're horror-inducing. No one retells a story about how someone's website got built with the same number of uninteresting issues as usual.
When I was coming up, all I heard was that Perl was read-only, and that anyone with a large Perl codebase was in big trouble as soon as anyone
Re: (Score:1)
Re: (Score:1)
Re: (Score:3, Interesting)
Is there any sort of evidence for this? All I'm hearing is that RoR is having a lot of trouble scaling with complexity.
Which makes sense, since it's designed to make really trivial applications really easy to write - nothing wrong with that, really, it's a useful niche.
Rails and its ilk really emphasize the start-up cost, those first couple of days that are essentially irrelevant in a large project.
Re: (Score:2)
Well, sure, if we are comparing it to PHP. I don't think anyone's ever accused PHP of scaling well with complex projects. Yes, yes, it can be done, but PHP will fight you every step of the way.
Project wise that may be an issue. (Score:2)
Re:Chapter 10 - Large Projects (Score:4, Interesting)
> trying anything close to what I would consider 'large' projects.
I've found that Ruby has a way of making large projects into small ones. Going from 250 KLOC in Java to 10 KLOC in Ruby would not surprise me.
> RoR is not the right tool for many significant sized project, especially in the enterprise environment.
Most enterprise environments are a morass of battling departments, entrenched legacy technologies, and outdated, inefficient processes. While that significant-sized 30 person project is bogged down for two months negotiating more app server licenses, the 3 person Rails team can knock out a fully tested application that does the job.
Re: (Score:2)
I'd imagine "large" is being used here to mean an ability to tolerate enterprise load level. I'd be curious to hear stories about this myself. Our rails application is slower than something coded in PHP, largely (I think) because the framework encourages development without much concern for database speed. Writing your own SQL commands is one solu
Re: (Score:2)
Hm, at least, KLOC is a contributing factor. Maybe cyclomatic complexity would be a better measurement?
> I'd imagine "large" is being used here to mean an
> ability to tolerate enterprise load level.
Yup, but an enterprise load level usually means a server farm with a web/app/db breakdown and some caching servers. At that level, the Ruby interpreter and the framework method calls usually aren't the bottleneck - there's s DB to
Re: (Score:2)
However, it's not serving zillions of requests per second (it's an internal application). Our public-facing Rails apps are much smaller, and don't face huge traffic either. The
Re: (Score:2)
> deployment were all huge pains two years ago.
Yup. Judicious Capistrano + mongrel_cluster + monit usage make a difference these days, but it would still be nice to have fewer moving parts. Maybe Rubinious will get us there.
Incidentally, "cap deploy:check" totally rocks.
Re: (Score:2)
As far as I can tell, the only common theme among them is that they're run by professional software engineers, not kids who read one Rails book. I mean, the fact of the matter is that if you want to run a high quality, large database-backed web application, you need some people who really understand databases, and some
Re: (Score:2)
Heh, nice one.
Re: (Score:2)
Re: (Score:2)
Sure. It's still patently ridiculous to claim that most large projects are written in PHP (even if we are just talking about web projects).
I also happen to think that PHP makes writing "powerful well-designed apps" a bit harder than necessary, but that's just me.
Re: (Score:2)
I think that you'll find this true of most frameworks.
Re: (Score:2)
I don't disagree.
I think that you'll find this true of most frameworks.
Yeah, that's kind of the point of frameworks - you trade flexibility for convenience.
Re:Chapter 10 - Large Projects (Score:4, Funny)
Large scale projects are usually written in Java or
Re: (Score:2)
"Advanced" for RoR is routine for everyone else. (Score:5, Insightful)
The book isn't poorly written, and the information it conveys is useful to some people, I'm sure. But I don't consider the topics it covers to be "advanced" by any means.
Using triggers and rules, for instance, are not really advanced concepts. Nor are plugin-based architectures. REST techniques are pretty basic, as well.
I was hoping for this book to really discuss pushing RoR to the max, allowing us to do what we can't currently do easily with J2EE or
Re: (Score:3, Insightful)
From what I can say, there's still some things that RoR routinely does more easily than J2EE or .NET -- it's just that good ideas tend to propagate, so I suspect it's not as dramatic a difference anymore.
Please O PLEASE stop the Ruby hype (Score:2, Interesting)
Re: (Score:3, Funny)
Re: (Score:2)
Probably.
Re: (Score:3, Insightful)
I'm seeing more Anti-Ruby/Rails FUD here than pro-Ruby/Rails hype.
Would you say the same thing if it was a
Re: (Score:3, Insightful)
What to do? (Score:5, Funny)
Move to Java?
I kid, I kid! Ow, ow, ow!
Re: (Score:3, Funny)
Required reading (Score:3, Interesting)
> as to label it required reading
I've been doing Rails for about two years and still found this book to be very helpful. It should be called "Rails For Real Projects" or something, because he covers stuff you _will_ run into. The nice thing about this book is that he doesn't waste time explaining what 'puts' does and such; he gets right down to business. The section on modifications that Rails makes to the Ruby standard library is worth the price alone.
Referencing? I smell a rat (Score:2)
Its spamming and should be banned from slashdot.
Re: (Score:3, Insightful)
The price is the same for those buying it. I don't see what the problem is.
Can some kind soul explain REST? (Score:3, Interesting)
But what's the excitement all about? I would think that for most site owners, this would be a disaster, not a boon.
It sounds like a graven invitation for others to do stuff with your site
Furthermore, it seems like something that makes trying to break your site much easier since crack efforts can be done using standard methods for which the weaknesses are well known. So some smart guy can find a weakness in the REST code and all of a sudden everyone who's followed the rules can be automatically exploited.
Google encourages you to use their maps, because it builds loyalty to them, and you are probably using their ad network anyway so they don't lose much revenue. But for most sites, mashups are going to virtually eliminate revenue, cost bandwidth and overall make your life miserable. They are the modern equivalent of linking to images on someone else's site
So tell me, what does REST do for me, as a site owner and developer, as opposed to what it does for others, such as people creating mashups and the like?
Are there any ways in which mashups can be made profitable or worth encouraging, for people who don't own their own ad networks?
D
Re: (Score:2)
For example, what does Flickr gain from the availability of the Flickr API?
In other words, I'm not saying "Hey, I'm against Mashups", I'm saying "Look, I don't understand Mashups. They seem downright deadly from a business perspective. Why are people eager to create software that can be involved in mashups when the business case looks like I should run and hide?"
I'd like to
Ruby on Fails (Score:2)
Re: (Score:1, Funny)
Re: (Score:2)
Yes I imagine the pattern goes something like:
Or are you suggesting that reviews should be posted before the book has been released and read?
Re: (Score:2)