Restructured Ruby on Rails 3.0 Hits Beta
Curlsman informs us that the first beta of Ruby on Rails 3.0 has been released (release notes here). Rails founder David Heinemeier Hansson blogged that RoR 3.0 "feels lighter, more agile, and easier to understand." This release is the first the Merb team has participated in. Merb is a model-view-controller framework written in Ruby, and they joined the RoR development effort over a year ago. Reader Curlsman asks, "So, is version 3 of RoR going to be a big deal, more of the same (good or bad), or just churning technology?"
...a CEO?
Please pick form the list below
Ruby and/or Rails sucks because:
1. It doesn't scale (Twitter)
2. It's slow
3. I read somewhere that Python was a better language
4. I write PHP, I can do everything Ruby/Rails can do better
5. My obnoxious younger coworker uses it
6. It's not lightweight enough
7. The ruby community is full of over-hyping zelous twits
Ruby and/or Rails is awesome because:
1. It scales within reason (Twitter, Lighthouse, Shopify)
2. It's as fast as Python and PHP
3. I read somewhere it was better than Python
4. I used to write PHP, Ruby's been a godsend
5. There are so many motivated and innovative people in the community
6. It's featureful
7. Pythonistas are over-hyping jealous twits
Photos.
I've never heard that Rails would make "programmers obsolete", in fact it seems to be the opposite; if you look at the official Rails site you'll notice that the biggest tag-line is "optimized for developer happiness".
Rails makes developers happier, not unemployed. What's more, anyone can write bad code in any language, so pointing to Twitter is hardly a conclusive argument. There are lots of big Rails sites out there, including Basecamp, the original Rails application.
For a better (and longer) write up on scaling Rails, I refer you to this article.
I'm glad first responses are so negative; now I don't have to bother trying ROR out.
Over at Ruby Inside we did (and are maintaining) a roundup of ~36 Rails 3.0 beta links/articles (it's up to about 40 now, I think). If you've got Rails 3.0 installed and want to know how to use X or Y or want to learn some of the back story/motivation, the links should come in useful. They're only things that are actually worth reading. Well, mostly.. :-)
I just love the rails development community...they've really shown that they welcome any new ideas, frameworks etc and incorporate the best of everything into a fully fledged release.
Well done and Thank you.
...agile...
That's where I stopped reading. I'm on a no-buzzword diet.
Slightly off-topic, but since a lot of comments are about how Ruby and Rails has nothing other popular dynamic languages and frameworks have to offer, I'd like to say there's one thing which drew me to Rails which I couldn't find in any popular Python or PHP web frameworks.
Testing. Craftmanship. Quality. This is more cutural than technical. While it's technically possible to write tests in PHP and Python, it just seems like people rarely do (especially so with PHP). And even if they do write tests, it's an afterthought. Things may have changed since I've done any serious development in PHP or Python, but I've done a little with Django and the testing that's done in the community didn't come close to Rails at the time. I'd be lucky to find a plugin authour whom had a test suite for their work and there was nothing of the function or quality of RSpec or Cucumber around.
This kind of lax "I tried it in my browser so it works" attitude to web software development in PHP and Python almost made me want to give up on web development and get into some other type of programming with some real professionalism - but thankfully I found Rails and glad that in general Rails programmers take their work seriously.
Having said all of that, I don't want to paint too negative a picture of Python. There are some awesome frameworks and communities in the Python world - Twisted/Divmod, for example, where the community really are bright and dedicated to test driven development. Zope 3/Grok is another. But I couldn't find anything in the mainstream web development world which were. Being mainstream is unfortunately important in getting anyone to support your descision - be they management, or a client.
So, is version 3 of RoR going to be a big deal, more of the same (good or bad), or just churning technology?
How about, we don't care? Back in the day, Ruby on Rails promised that it will "kill developers" and CEO-s will be coding the sites themselves in Rails, the hype was THIS big. "Programmers obsolete??".
Soon after it turned out "real programmers" can't scale a Rails app to save their job (Twitter).
Your moment of marketing glory is over. Have the decency to go in a corner and die.
Just like Google, anybody saying one bad word against the slashbot groupthink that RoR is the second coming gets modded into oblivion. AC was just saying what many of us think, just like PHP RoR is a great language to write not-so-serious apps on. It's praises are sung by the same group that think MySQL is the ultimate enterprise database.
Rails makes developers happier, not unemployed.
When you've had a lousy job, the two aren't mutually exclusive. I want assurances that they don't intend to make me happier BY making me unemployed ;-)
These posts express my own personal views, not those of my employer
It's praises are sung by the same group that think MySQL is the ultimate enterprise database.
Everyone knows the real ultimate enterprise database is Access.
I've used Rails on five projects now. To be honest, I think it has made me more and more miserable with each project.
First, I truly dislike "convention over configuration". The main problem there is that they "convention" they use is far too limited for any sizable application. It may be sufficient for a blog web app, or a bug tracker, or small-scale applications like that. But we now have one web app with over 900 controllers, and "convention" falls apart at this size. Sure, we probably should refactor our app, but we're not in a position to do so at the moment.
The same goes for ActiveRecord. It's great in simple cases, but falls apart rapidly when you're developing larger web apps, especially when you're performing complex data retrieval. It gets even worse if you need to optimize that data retrieval. At this point, ActiveRecord becomes a huge pain in the ass, rather than a useful tool.
And like it or not, the performance of Ruby is quite poor. We actually had to purchase some additional hardware to handle the extra load after converting an old Java-based web app to Ruby on Rails. We tried to optimize it, but were spending far too much time fighting with Ruby on Rails and its abstractions. It was cheaper just to buy more hardware.
It's a double-edged sword.
I've been involved with rails pretty extensively now for a few years, and i've enjoyed the platform for the most part. A few projects we've launched have grown pretty complex, and we too have had some problems with the code management, but discipline seems to help and a steady peer review.
Ive been working with Java pretty much exclusively since the late 90's, with exception of the last few years which have been focused on Rails projects. I've recently been working with Grails (Grails.org) which is a Java based stack taking the great concepts from RoR platform.
As someone who has never worked with Java, I believe that Grails might not be as easy to pickup and learn, but as someone who has an extensive Java background, it's a serious breath of fresh air. For a large scale project, I MUCH prefer grails code management to rails approach. Obviously with my Java background, i'm partial to Grails.
On the note of deployed code, a few of our rails projects have grown to be pretty large. I've had to implement a LOT of hardware to handle the scaling of usage. We've been able to do a lot of improvements to the code, but compared to the speed and efficiency of Java (Yeah, I never thought i'd say that) I'm a little bit 'burnt' on rails.
Comparing something like Passenger on Apache to Glassfish or Tomcat is like getting out of a 2009 BMW 5 series and jumping into a 1991 Kia.
The first time in YEARS i have had run-away processes take down an entire server, I've migrated all of our servers to Xen servers because i got tired of driving to the datacenter 1-2x a week or making a remote hands call to reboot a server because a zealous process took things down. (Did I mention i bought a load balancer to manage the traffic, i'm doing on 10 machines what i used to do on 3 machines w/my java apps)..
I'm sure that there are folks that know Rails better than I do, we're a do-everything group (4 guys managing a LOT of code and servers), not a large IT shop by any stretch, but on one hand we've hit epic levels of productivity. We've gotten projects out fast, and some of them have done well. We've had other projects we assumed would do great, but ended up failing due to marketing miscalculations. The lesson I'd say i've learned with Rails, is it's better to get a 'good enough' product out the door and then figure out how to tighten it down later than not even make it to the race.
I'm hoping that i can bypass that compromise with Grails, but time will tell. :)
Either way , Rails absolutely has it's place in the Open Source server software stack world. In the end it's just a matter of remembering that if you are doing rails programming, you better be doing it with a Test-Driven development style, as large projects can get out of control.
I've not looked at RoR 3.0, but i'm hoping that they have implemented a Service-style implementation for business logic, rather than encouraging to have it thrown into the Models.
Nah, the real ultimate enterprise database is Google Spreadsheets.
I think the parent possibly could have used JRuby for Rails, getting to stay on the JVM platform they were already comfortable with. But perhaps when they considered it JRuby wasn't as mature as they needed it to be.
Even for someone without a lot of Java experience, Grails can be very productive. I prefer the 'domain first' approach Grails allows, rather than the 'database first' which Rails promotes. There's no 'right' answer, but I prefer the Grails way. I've had my fair share of headaches with Grails over the last couple of years, but I'm typically more productive with it than other platforms on many/most types of projects.
I've got some high hopes for Rails 3, from what I've heard from my Ruby-lovin' friends. There's apparently been a lot of refactoring at various levels, so speed and resource handling should be much improved. I'm expecting some backwards compatibility breakage, but I've nothing to base that on other than speculation - major version numbers are the best time to do those sorts of changes, if any are required.
creation science book
Apple makes opinionated hardware. Rails is opinionated software. It's not surprising that the two fan bases act similarly. In fact, I would bet that there is a lot of overlap between the two groups.
Hmm, can you explain why? I haven't worked with Rails much, but in Django, if things are too slow like in a really complex query spanning so many tables that the PostgreSQL optimizer chokes, you can hand optimize it easily by either rewriting how you specify it in python, breaking it up into multiple statements. You can also choose to retrieve the data as plain tuples or map/dicts if you need to fetch thousands of rows (100k+, I've no problem with 20k/query the normal way at all). If all fails, plain sql is just 2 statements away, with an easy way to turn the results back into objects.
A good ORM recognizes that there are situations that falls outside of the common/simple use cases and should assist you in the harder things, not work against you.
First, I truly dislike "convention over configuration". The main problem there is that they "convention" they use is far too limited for any sizable application. It may be sufficient for a blog web app, or a bug tracker, or small-scale applications like that. But we now have one web app with over 900 controllers, and "convention" falls apart at this size.
First, yes,
we probably should refactor our app, but we're not in a position to do so at the moment.
you should, and this would be biting you in the ass just as much with other technologies.
But keep in mind, "convention over configuration" is not "convention instead of configuration". The idea is that if you follow the conventions, things work better. If you need to go beyond them, you can still configure things.
The same goes for ActiveRecord. It's great in simple cases, but falls apart rapidly when you're developing larger web apps, especially when you're performing complex data retrieval.
For what it's worth, I prefer Datamapper. I don't have especially bad memories of ActiveRecord, though -- but I probably wasn't doing especially complex queries.
But note, again, it's about convention over configuration. Nothing's stopping you from hand-coding raw SQL, or even going entirely around ActiveRecord in the few cases where you actually need that. The other lesson is, of course, that if your queries are your bottleneck, there are probably other tricks you could be doing, like memcached.
And like it or not, the performance of Ruby is quite poor. We actually had to purchase some additional hardware to handle the extra load after converting an old Java-based web app to Ruby on Rails.... It was cheaper just to buy more hardware.
That's part of the point of Rails, though. It usually is cheaper to buy more hardware than to optimize, Ruby just forces you to face that up front.
Sure, sometimes you can change your algorithm from O(n^2) to O(logn) and get a massive speedup, and it's worth it when you can do that. But an extra 5-10% likely isn't worth it until you're of sufficient size that 5-10% of your hardware is costing more than hiring an extra person to do those optimizations.
Don't thank God, thank a doctor!
That wouldn't be the only time that Rails has been sloppy in choosing the right HTTP method to use. When they implemented REST, they got PUT and POST backwards. Compare with CouchDB, which gets it right: PUT to create and POST to update a record.
Do you have an original thought of your own?
Take a look at some of the replies. I see two which bash Rails quite a lot, they just actually put some thought into it. They got modded up, and you got modded down.
But hey...
Ruby on Rails promised that it will "kill developers"
I don't think anyone ever claimed that, except you.
Soon after it turned out "real programmers" can't scale a Rails app to save their job (Twitter).
They still have jobs, and Twitter still runs Rails on the web interface.
Your moment of marketing glory is over.
We're programmers. Marketing doesn't quite work if there isn't at least something to back it up -- that's why we're not all using ASP.NET.
AC was just saying what many of us think,
Nice how you post this as an AC, also...
just like PHP RoR is a great language
Nope, PHP is a language, and it's not great. Ruby is a language, but Ruby on Rails is not a language, it's a framework.
I could find dozens of reasons Ruby is better than PHP, but hey, Facebook runs on PHP.
It's praises are sung by the same group that think MySQL is the ultimate enterprise database.
Rails supports Oracle and SQL Server. But hey, MySQL still runs Twitter.
Don't thank God, thank a doctor!
I haven't actually used RoR, but you have to admit that this sounds like you're taking "ruby is really slow" and trying to spin it into an advantage.
"Most people end up having to optimize eventually. But that's hard. Ruby on Rails can't be optimized! You just have to buy more hardware! Isn't it great!"
Breaking Into the Industry - A development log about starting a game studio.
We tried JRuby.
We had various deployment problems, i'm sure that many people have managed to make it work, but we got about 2 days of trying to port in a medium-sized, high concurrent project, and we finally came to the conclusion that it's better to stay closer to the mainline c-based Ruby than diverge our project to JRuby and deal with the dangers of working on the bastard-project (when we talked to some of the guys at sun, back when we made the choice to give JRuby a try, there was only 3-4 paid employees working on it... it just felt too edgy for us, and we were looking to stabalize our project, not go down a lonely road of untested/unknown.... )
As they say, sometimes it's better the demon you know , than the ones you don't.
Disclaimer:
1. We have had a LOT more success with rails, than failure. And we're getting a LOT more done now than before when doing struts/JSP/JDBC style dev.
2. My lead developer wrote a book on Rails development for Oreilly, (rails handbook), he is leading our charge into Grails even having a substantial background in Ruby/Rails.
I'd never say I regret doing our projects in Ruby, nor do I feel like JRuby would of solved my problems. I'm happy with Grails, and it has well complimented our teams capabilities and experience. We write code to solve problems and generate revenue, we don't have the luxory of coding at a well funded public company, we pay our mortgages and car payments from code we write every week. Ruby has met the challenge for us, but it's silly not to explore our options to try and make our new projects even more robust and improve our development, and our current dilemma of ongoing maintenance.
I am a php developer that does a lot of small to medium sized apps using zend framework. I don't plan on doing anything enterprise scale, my niche is what it is. Do you see any advantage to zend framework over ROR?
In my previous post, I'd meant to say "grandparent", rather than parent (your post). Still, given my position, I'm always happy to hear about Grails adoption successes. :)
Rails popularized a lot of ideas that have since been adopted/adapted by many other frameworks, including Grails. I'm not sure many people could argue that "convention over configuration" has overall been a *bad* thing for web development, especially in the Java world.
creation science book
Thus they have made no allowance for dropping back to raw SQL queries.
Ignoring your inaccurate remarks about the core Rails developers, do you care to expand on the above mentioned claim?
count_by_sql: http://api.rubyonrails.org/classes/ActiveRecord/Base.html#M002276
find_by_sql: http://api.rubyonrails.org/classes/ActiveRecord/Base.html#M002267
Not true.
Model.find_by_sql sqlstring
or even more primitively:
ActiveRecord::Base.connection.execute( sqlstring )
Easy. Although you really shouldn't have to use it if you understand relations properly.
Also note that rails 3 is going to have Arel, an Object-Oriented interpretation of the Relational Algebra. It is a mathematical model for representing “queries” on data. It understanding relations this fundamentally means it can optimise easily.
Have a look at:
http://magicscalingsprinkles.wordpress.com/2010/01/28/why-i-wrote-arel/
I am a php developer that does a lot of small to medium sized apps using zend framework. I don't plan on doing anything enterprise scale, my niche is what it is. Do you see any advantage to zend framework over ROR?
I don't know Ruby or Rails well yet. But I do know PHP pretty well. And my answer is: no. Not as a framework.
Zend Framework isn't a web application skeleton / development system. It's an over-objectified library of barely related pieces. Yeah, there's a controller and a recommended directory layout, and you can pull it together with the rest of the library and a project or two elsewhere (say, Doctrine and Smarty), but it's not a thought-out whole. The job of creating an overall architecture for your app and getting the components to work together becomes yours.
Maybe that's what you want, and if so, then Zend Framework or doing things by pieces in Ruby (say, Sinatra + Sequel + HAML/SASS) could be for you. But if you want an actual web application framework, then I'd look at something like Code Igniter or Symfony (for PHP) or Rails or Merb (for Ruby) instead.
Tweet, tweet.
Count me among the people who wish the Rails guys spent more time on documenting, settling the framework and standardizing things... and less on making yet another Rails version that's different than the previous ones.
We're talking about a system where (to many) it is considered "best practice" to freeze your gems, including rails, to a particular version by copying them into your vendor directory, because of the breaking changes that happen from version to version. WTF??? It's like telling a C programmer he ought to copy the standard library headers into his source tree just in case the next version of C changes strcpy().
A case in point: Rails likes to give your database tables plural names...One of the reasons to prefer singular table names is that it improves Rails's interoperability with the applications that either want to supply data to or consume data created by Rails..
Another reason is that it gets you closer to relational thinking. Plural names come about because some think of tables as collections of records and it follows that said collection should get a plural name. So, your "person" record becomes your "people" table.
However, the table isn't really and formally a collection of rows. What you really have is a set of "person" relations; the plural on the end of relations there is where the plural belongs.
And I don't know how big of a performance hit pluralize yields, but it's doing something that doesn't have to be done: the convention could just as well be singular (and arguably would more properly be singular).
Tweet, tweet.
Excellent documentation, good official tutorials:
http://guides.rubyonrails.org/
One of the goals of rails 3 is indeed a solid public api.
In fact because of rails' goal to be more modular / customisable the public api is going to constitute the only communication between rails' components.
Funny, I first read about ROR on Slashdot 3 years ago, back around the 1.0 release. The only negative things anyone said back then were quips about DHH's Danish accent. Now it's matured into the finest open source development web development stack available, powering many successful web apps and all I see here are the people who should be supporting it on principles alone talking smack about it.
you're taking "ruby is really slow" and trying to spin it into an advantage.
Nope, I'm saying Ruby is optimizing something else -- developer time. That isn't to say it will never be fast, and last I checked, the full Merb stack (and Rails 3.0 is also Merb 2.0) was on par with PHP.
It's also not that it's hard, it's that it's expensive, and a needless expense. Let me put it another way: Do you watch YouTube, ever? (Replace YouTube with Vimeo or any other Flash video website.) Do you ever bother to download a video just to watch it? I mean, you do realize that VLC takes a fraction of the CPU cycles that Flash does, for the same video, right?
But no, I bet you're just like 99% of the population -- it may burn more CPU, it may burn more battery, but you're going to just watch it in the Flash player until you have a good reason not to.
If it was really an issue, if your computer was so old and so slow that the Flash wouldn't play properly... Weigh the amount of time you'd spend in a video downloader against the cost of a low-end PC, and it's a no-brainer.
Ruby on Rails can't be optimized!
Nope, it certainly can, it's just hard, and may (in an absolute worst case) involve replacing parts of it with another language, like C extensions -- not an entirely alien idea to any game developer who's replaced bits of C++ with assembly. (No one would sanely claim that the next blockbuster game should be written in assembly for speed -- you optimize the tight loops that way, but the game logic should be higher level.)
And it's just an observation, I'm not sure if it's cultural or if it's the slowness, but it seems like Ruby people, especially Rails people, focus on horizontal scalability and optimizing their algorithms in the broad sense -- again, O(logn) vs O(n^2). Java vs Ruby is the difference between two servers and four, or a request taking 50 ms vs 100 ms. Your application logic is the difference between four servers and twenty (or not being able to scale at all), or between 100 ms and 2000 ms (or two days, or crash the server because you ran out of RAM).
These are good lessons for any system, but Ruby people seem to be especially conscious of it. Still, I think it illustrates something -- the language is going to be the least of your problems when it comes to optimizing any app, until you're at a much larger scale than 2-4 machines -- think hundreds. Eventually, it may be worth rewriting large chunks of your app, or doing a ground-up rewrite, in a more efficient language -- or it may be worth improving the interpreter of the language you've got (as Facebook has).
But you have to get there first. If you're busy doing Java because you want it to be efficient, and I steal all your marketshare because I write one line of Ruby for every five lines of Java, and I get to market while you've got a prototype with 20% of the functionality... I win. Even if I have to rewrite it all in Java later, I have the money to do that, because I've got the traffic.
Don't thank God, thank a doctor!
Just another example of someone putting down Rails for reasons that they only imagine because they have no idea what they are talking about.
.000300020001. The result is "Python".
Hey, I can make stuff up out of the air too!
(1) PHP still has a serious floating-point bug. Try multiplying 3.000001 and any number ending in
(2) Oracle is going to roll back the last 47 bug-fix commits to the Java repository, but only for the OSS version. Then it will sell the up-do-date version commercially.
(3) Microsoft has announced that it is just too much work to make all those separate compilers that turn its Visual Studio languages into intermediate Common Language Runtime code. It will henceforth be marketing C++, C#, J#, F#, and FU With A # Object, all as separate languages with their own compilers and IDEs. It will be selling the rights to its Visual Basic language to Delphi, who say they will turn it into what it was always supposed to be.
Give me a few minutes; I am sure I can imagine some more.
It actually scales better than just "within reason": yellowpages, scribd, hulu, github, odeo, jango.
For a second I read that as "django" and began to weep.
o hai
What is the point of writing something that tries to look sensible and objective and then round it off with the utterly subjective "Python is for masochists, Ruby is cleaner"?
The only explanation: Your subconscious knows the obvious fact that Python is a beautiful language and thus subverted your entire comment.
... except for the Smalltalk people.
how to invest, a novice's guide
Makes me think of that girl Ruby I tied to the train tracks once.
o hai
If most of your 900 controllers are just replicas of the standard restful controller (but... 900 different resources!?) you might be interested in the approach discussed at http://www.ruby-forum.com/topic/202398#881349 Basically you move all the restful code in one "global restful controller" and derive all the restful controllers from it, much like we derive models from ActiveRecord. Most controllers are reduced to a def/end two-liner and the application is much more maintainable because you don't have to create all the index/show/edit/update/new/create methods in every single controller. You add methods or replace the default ones only where you need to implement special logic . The code is at http://gist.github.com/280611
No, Smalltalk was a dynamically TYPED language. That's not the same thing. Ruby is dynamically typed also, but that is not the major issue here. Ruby is a DYNAMIC LANGUAGE, meaning that you can actually change code on the fly. Can't do that with a compiled Smalltalk program.
Everyone knows the real ultimate enterprise database is Access.
If by "ultimate" you mean "last because it killed the enterprise stone dead through sheer crap-ness" then yes, everyone does indeed know that.
"Little does he know, but there is no 'I' in 'Idiot'!"
Access is totally sweet, because its entire purpose is to flip out and kill the enterprise.
i'd hit it so hard, if you pulled me out you'd be the king of britain [bash.org]
the "buy more hardware" meme is a terrible message to be sent to less experienced programmers.
If Jeff Atwoods says so, then it must be true... Damn! I better move to a Microsoft stack right now!
Mod parent tragically informative.
What do you expect? It's an interpreted, dynamic language. Nobody has yet succeeded in making a true compiler for those.
Thus spake Wikipedia:
And everything old is new again.
Dewey, what part of this looks like authorities should be involved?
This isn't the standard usage. You have a set of "person" tuples - one person, one tuple, the set of person tuples forms a relation, singular.
That's interesting. Different from the way I had it explained, but I wouldn't be surprised if I or they had gotten the terminology for tuple and relation confused, and the distinction you've mentioned does sound promising from a formal perspective.
Not sure whether mathematicians would call it a 'people relation' or a 'person relation'
To invoke my earlier statement in the language you've given, I think the question is whether or not the plural belongs on the tuples rather than on the name of the relation. And while I'm not sure what mathematicians would do, I am pretty confident about what logic programmers would do in, say, Prolog, given the choice between a people predicate and a person predicate: they'd choose the former.
Tweet, tweet.
I completely agree. Not only do I find features such as pluralization and singularization annoying and capricious, at worst they are an obnoxious waste of cpu cycles. For almost every Rails project I attempt, I find myself turning my head in disgust - all but simplest projects are up Rails' alley. There are virtually no ways to deal with sophisticated database relationships without resorting to cheap hacks. Not that I find this surprising, seeing as Rails' team's original approach to database development was "don't set up foreign keys/constraints, let the framework handle it" (they have since changed this to "we don't use relationships, but knock yourself out"). "Polymorphic relationships"? Seriously, why not just chuck all the data into a text file and avoid databases altogether? There are a lot of good things in Rails, but the framework is simply too weak for anything with even a slightly sophisticated database backend. This in addition to Ruby, a language that I find exceptionally "pretty", but lamentably slow, will keep me on languages like PHP, and off of constantly-updating-with-no-regard-for-backwards-compatibility behemoths like Rails.
"Convention over configuration" in Rails generally doesn't mean that there aren't elegant methods to do configuration for the cases where convention isn't sufficient, it means for the (very large parts of most apps) parts where sensible defaults are sufficient, you don't need to have boilerplate configuration.
This is true, but there are plenty of open source Ruby ORMs that can be dropped into Rails in place of ActiveRecord that are better in the places AR is weak (Sequel is, I think, the best.)
Although, in many cases where the performance of Ruby on Rails is at issue, the problem is either configuration or Rails issues, not Ruby, this is still a real issue. There are a couple of things to be aware of:
1) With dynamic languages like Ruby vs. static languages like Java, there is usually a trade-off of performance (and thus hardware and hardware support cost) with ease of maintenance and new development (and, thus, development/maintenance staff costs).
2) Still, as Ruby features have mostly stabilized, more and more of the focus of Ruby implementations is on improving performance. That's also true of Rails to an extent (though Rails is less feature-stable, recent version have done a lot of work focussed on performance, and a big part of Rails 3.0 was merging with Merb on of whose main advantages over Rails was performance.)
Access is really not bad for what it is. I think it's actually underrated among tech people. I'd take it over MySQL in many situations.
The only problem with it is that it's slow. It's REALLY slow.
Social scientists are inspired by theories; scientists are humbled by facts.
On a site with over a million subscribed users, and countless millions of lurkers, it does seem unlikely that you're the one and only reader of the post. I think using the third person was just the chap's way of being polite to everyone else.
``(2) It's slow.
Yep. What do you expect? It's an interpreted, dynamic language. Nobody has yet succeeded in making a true compiler for those.''
Common Lisp. There are several compilers for it that actually make it efficient. I've even seen Lisp programs beat C, C++, and Java.
Current Ruby implementations are dog slow even by dynamic language standards, but let's not forget that it's easy to interface to C from Ruby. You can alternate hard and soft layers and get _both_ rapid development and fast software.
``(3) It's not suitable for large projects.''
I tend to agree with that, but I also think most projects aren't large or at least _shouldn't_ be large. You can usually break things up in parts that are a couple hundred lines (in Ruby) at _most_, and then you don't need any "large project features" in your language. But that doesn't necessarily mean Ruby is a good choice for large projects.
Please correct me if I got my facts wrong.
In fact, the Rails team always promoted the fact that you can drop down to pure SQL when necessary as a feature of ActiveRecord. It is like there is some kind of distortion field between Rails developers and the rest of the world.
What was said: We developed this handy framework to make web development more enjoyable for developers. We hope you enjoy it.
What was heard: We developed this handy framework to allow everyone and their brother to build a web application. Fire those expensive programmers! They aren't needed anymore.
What was said: We created a database abstraction library that simplifies common database operations. You can still drop down to the database level for the more complex operations, if necessary.
What was heard: We created a database library that makes accessing a database easy enough that your grandma can do it. If you have to do anything more complex than select a few rows from a table, forget about it. P.S. And don't even think about adding a second web server to the mix as your app grows, it just ain't gonna work.
I have a Smalltalk browser here that seems to disagree with you, depending on your definition of "can't", "compiled", "Smalltalk", and "program".
how to invest, a novice's guide
As with Google, the people posting negative comments about RoR are at least as negative as those posting positive comments, although for some reason its only those posting negative comments that portray the other side as "the Slashbot groupthink" and pretend to be a small oppressed group fighting the Man.
We have had a LOT more success with rails, than failure. And we're getting a LOT more done now than before when doing struts/JSP/JDBC style dev.
I'm curious if you have ever tried Apache Wicket. Wicket is yet another framework for Java, and it requires your team to have a solid level of OO programming knowledge because every web page is a hierarchy of components, and to customize behavior, you need to @Override various methods.
I just finished my first iteration of a decent-sized project using Wicket that used many of wicket's components like repeating list/grid views, a custom session with different user types/roles, and some custom components to deal with "edit vs view" modes.
We integrated this project into an existing Spring MVC + regular servlet/jsp web app. Instead of custom JDBC as we did previously, we used hibernate annotations which means no XML nor direct SQL.
Writing wicket was fun; I've had more fun in 3 months of wicket than 2 years of "regular" java. The learning curve was steep, as I spent days solving what later seemed simple problems, but I learned a lot. Future iterations of this project will be quick. Overall, I say medium to large projects will take much less total time from concept to stable delivery using wicket versus other java web methods.
I've not tried Ruby, ROR, JRuby, nor Grails, so unfortunately I can't compare wicket to any of them. But it sure beats Struts, Spring MVC, and JSTL/JSP. Wicket does not allow any logic in the view -- you use plain xhtml+css (with a wicket DTD while designing for validation), and use java code to do everything else, including ajax. So a web+css+javascript master can bust out a prototype/mock-up, and a few wicket programmers can tie in the back end logic. When maintaining, the web designer can open the plain html+css (in their favorite editor) and modify it as needed, without any code in the way.
Wicket is a neat technology, with great security (url encrypting, server-side validation with ajax) and good performance.
"The only explanation: Your subconscious knows the obvious fact that Python is a beautiful language and thus subverted your entire comment."
"That's the funniest thing I have read all day."
Somebody makes an insulting personal attack, I say that was funny, and *I* am supposed to be the troll? Who is doing the modding, anyway?
"Please stop mixing apples and oranges. Ruby and some other modern languages are true dynamic languages. Smalltalk and Lisp are not."
That was a factual post. I strongly object to the label "troll" just because somebody - who obviously hasn't bothered to look it up - disagrees.
Mixing compiled and interpreted code does not make Lisp a "dynamic" language. Other languages include things such as "eval()" which allows you to do that too... that doesn't mean they are dynamic languages, either. Some are, but the ability to simply evaluate external code is not the determining factor.
Having said that, if you are using an interpreted Lisp, and not compiled code, it could be said to be a dynamic language... but then we are right back to my original statement: nobody has so far managed to make a dynamic language fully compiled.
Here is the issue:
Are you saying that you can create a Smalltalk program, compile it, run it, then change the code dynamically during runtime? Because that is what is necessary for it to be a compiled, dynamic language.
Somebody else here has already tried to claim that Lisp qualified as a compiled dynamic language, but that is not so. Some Lisp variants allow you compile programs, and still add changes at runtime, but the fact is that the code added at runtime is still going through an interpreter... it is not compiled, so it still does not qualify as a program that is compiled and yet dynamic at the same time. (According to Wikipedia, the same source he used.)
So: can you create a compiled Smalltalk program, compile it, then change the code arbitrarily at runtime... without running it through an interpreter? If so, I would be intrigued, and my computer science professors will definitely be surprised to learn about it. I would be sure to tell them.
In case that did not come out as clearly as I intended it: my question is whether you can compile a Smalltalk program, then change its code on the fly without using any kind of Smalltalk interpreter? And without patching the machine code of course because the code has to be code from the same language.
Because using an interpreter that way (the way Lisp does it) is conceptually no different from using the equivalent of "eval()" on the external code. Heck, even some variants of BASIC can do that... and it isn't dynamic either.
From the word go here I have been referring to the existence of a dynamic language that will allow true compilation of programs... but still be dynamic. So far nobody has yet shown me such a beast, and that was my point all along. Nobody I have worked with has ever heard of any, nor had my professors (according to their own statements) when I was in school... but they were familiar with Lisp and Smalltalk. If you truly have something like that I am sure they would be interested in examining it.
I don't understand what you mean by "compiler" and "interpreter", nor why that matters.
Does the Smalltalk JIT count as a compiler? Does Smalltalk count as an interpreter because you can add code to a running image? Does Smalltalk not count as compiled code because of the presence of an image?
If your argument is "You can't really have a compiled program if you have a runtime!" then that's silly. (Does C++ not count as a compiled language if you use RTTI? Does a C shared library compiled with -fPIC not count as compiled because the linker has to do fixups at runtime?)
This assertion (as well as the mention of eval()) is a distraction. Embrace the Von Neumann architecture if you use a programming language on a Von Neumann machine. (Is a JIT compiler not a compiler because it may be written in a different language than the host language or because compilation takes place after you think compilation should take place?)
how to invest, a novice's guide
If you didn't understand my statement, then why did you bother to answer it in the first place??? Now I am puzzled.
What I stated was, in essence: nobody has so far managed to make a dynamic language that can be fully compiled and still remain dynamic at runtime. At the time I made it, I thought it was pretty self-evident, but apparently to many people it is not. Note that I did not say that it could not be done, only that it had not.
As for "compiler" and "interpreter", I am using the commonly-understood definitions: a compiler converts higher-level language to machine code ahead of time, and stores it in the form of an executable file; it is the machine code that executes. An interpreter converts higher-level language to machine code during runtime. There is nothing particularly tricky or unusual about the way I am using them.
My argument was not specifically "You can't really have a compiled program if you have a runtime!", although you bring up a good point, and it is part of my argument now. Again, I haven't been using any weird definitions. Languages like Java when using a runtime module and MS languages that use the CLR for example are not considered truly compiled languages. The "compiler" creates an intermediate code, often called P-code, that is interpreted and converted by the runtime to machine code. Again, that is using commonly understood industry-standard terminology. Those semi-compiled programs are not machine code, so they do not meet the definition of "fully compiled". (Incidentally, that is why Microsoft has seen fit in the past to include an "obfuscator" program with their packages: because the semi-compiled code, not being machine code, is often too easy for humans to read for it to be practically distributable in a commercial product. The obfuscator makes it difficult for humans to read.)
The fact that Smalltalk uses something like image persistence does not necessarily disqualify it as a non-compiled language, but the fact that it uses a virtual machine for runtime does. To quote Wikipedia regarding virtual machines: "Example: A program written in Java receives services from the Java Runtime Environment (JRE) software by issuing commands to, and receiving the expected results from, the Java software. By providing these services to the program, the Java software is acting as a "virtual machine", taking the place of the operating system or hardware for which the program would ordinarily be tailored.
While Wikipedia was using Java as its example, the simple fact is that a Virtual Machine in cases like this is a runtime interpreter, and that seems to disqualify Smalltalk as a fully compiled language. I am not saying that it is not dynamic -- obviously it is -- but can it be compiled AND reflective?
As far as being dynamic is concerned, Wikipedia states that "The ability of many programming languages on some systems to directly modify machine code make the distinction abstract". But I take some exception to this, because Wikipedia does not give any examples, nor has anyone else here. I mean sure, I can use just about any language that allows low-level access to grab a memory address range and change the contents of that range... but that is still not the same as being able to add or change high-level objects or methods or other structures on the fly, without an interpreter. With a dynamic language -- at least the ones I am familiar with -- I can make changes to high-level structures on the fly or even completely rewrite modules, and persist those changes to a file or other form if I wish.
"(Does C++ not count as a compiled language if you use RTTI? Does a C shared library compiled with -fPIC not count as compiled because the linker has to do fixups at runtime?)"
(1) Where does RTTI enter the picture? Are you claiming that doing a dynamic_cast<> operation makes it a dynamic language? I think that's stretching things a bit. Mo