Ruby On Rails Goes 1.1 255
MrByte420 writes "The Ruby On Rails team today released version 1.1 of the web framework. From the announcement: 'Rails 1.1 boasts more than 500 fixes, tweaks, and features from more than 100 contributors. Most of the updates just make everyday life a little smoother, a little rounder, and a little more joyful.' New features were examined back in February at Scottraymond.net and include Javascript/AJAX integration, enhancements to active record, and enhanced testing suites. Not to mention upgrading this time promises to be a piece of cake."
Rails is Great (Score:5, Interesting)
Any other former Java programmers relate?
Web an API junkyard (Score:3, Interesting)
This posting only serves to remind me what an API junkyard web programming has become. Let's see, we need server side Ruby to transmit and execute Javascript that manipulates a DOM to emit HTMP, gracefully degrading features for anachronistic browers. Zowie!
Re:I haven't heard much (Score:5, Interesting)
Rails' efficiency won't continue to be that high as I get more into the business logic and smaller details, but for the data layers that I'm doing now Rails blows away anything else. I'll still be at least 50% ahead of where I'd be using Java and PHP when it's finished. The code will be way cleaner because Ruby is a better designed language than either Java or PHP. It'll be a snap to add features later, which is the problem we're currently having with our site and its 20,000+ lines of PHP code.
I've coded and managed Java and PHP sites. PHP is easier to work with than Java for most small to medium sites and Java can be easier on large sites. Neither of them are better than Rails for any size site.
I predict that Ruby on Rails will become the big third competitor in the market for building web apps. Java will still be bigger on the very high end because of EJBs and the need to interface with legacy systems and PHP will still be bigger on the low end because it's easier to learn since you don't need to know OOP to get started. Ruby on Rails will be the language/framework that finally fits into that middle market where most medium to large businesses are. PHP's code is too messy to work there without a lot of coder discipline and either a custom or well-done Open Source framework and Java is just too complicated.
Re:Getting started (Score:5, Interesting)
There's something to be said for making a potentially dry subject interesting, but it seems to go too far with it and actually spread the actual information too thin.
Just my opinion, of course.
Re:I haven't heard much (Score:3, Interesting)
Re:Rails is Great (Score:3, Interesting)
However with Ruby + Rails + Ruby & Rails Eclipse plugins, I almost never need to sit around for more than 2 seconds to see my generated output. I can quickly make a quick modification in model code and immediately see the effect by pressing the reload button on the web browser. I'll also say, the default debugging output of Rails is a lot easier to read than the default debugging output generated by Tomcat & faulty jsps.
After working with Hibernate for a good 3 years, I can say that it is sometimes nice to develop your database schema first rather than develop object mappings that will generate the schema. The whole "automated naming convention" also removes the possibility of a neophyte programmer to come along and create some ugly get/set methods with side effects.
Re:I haven't heard much (Score:4, Interesting)
Second, with ActiveRecord the code feels very close to the data. When working within Rails' naming conventions it's very simple to do stuff like track back and forth in a data record and figure out what belongs to it (foreign keys referring to your data) and what it belongs to (foreign keys in your data referring to other data). Honestly, it seems heavy, but it works so well you forget about that. There have been a few times where I needed some data and found it already in my model object because the database relationship was there. This stuff has been made even better in Rails 1.1 because it stretches the relationship even more (relationships through other tables).
Everything also gets done with a lot less code both because Rails makes things easy and because Ruby is designed really well.
Re:Kudos to RoR... (Score:3, Interesting)
Java is ubiquitous in the corporate market. It is the Jack-of-All-Trades. It's what CTOs look for on a resume because they think Mr. Java can do ANYTHING, and Mr. Ruby might be able to learn Java after a year or so, but would be limited in what he could do until then.
I still can't fathom why people think Ruby lacks transaction, security, and connectivity. My experience with it is that it's highly reliable and connects to almost anything. I've never had security problems w/ it.. but it is still a bit obscure. I have ruby apps on a site drawing 30 million hits a month with no problems. I have it connecting Solaris, Linux, OSX, and Windows. If I want to add full transaction support I could connect it to Postgress, ORACLE, DB2 etc etc. Is that good enough? Where is the feature set not working? It seems to me like you haven't spent much time with Ruby.
Re:Web an API junkyard (Score:4, Interesting)
Yeah, shocker, APIs call other APIs to call other APIs. That's how software works.
All you did was describe the basic model of server code delivering client code. Which is the future.
Re:It may be a little basic... (Score:1, Interesting)
class Color < AR::Base; has_and_belongs_to_many
class Person < AR::Base; has_and_belongs_to_many
from there your model is wired up (using the table 'colors_people' for joins) to support things like:
jimmy = Person.create('name' => 'jimmy')
susan = Person.create('name' => 'susan')
red = Color.create('hex' => 'FF0000')
blue = Color.create('hex' => '0000FF')
jimmy.colors << red
jimmy.colors << blue
susan.colors << red
Want to get that data out?
Person.find_by_name('jimmy').colors.length ----> 2
Person.find_by_name('susan').colors.first.hex ----> 'FF0000'
Color.find_by_hex('FF0000).people.each { |person| puts person.name } ----> "jimmy\nsusan"
The relationships work both ways, and all over the ActiveRecord stuff is in there so it's fairly trivial to build a controller to manage the relationships - you can then bind that to some standard HTML forms, a web service, or some sort of Ajax monster. If that counts as nothing then I'm not really sure what needs to be done to make you happy.
Scaffold
Re:I haven't heard much (Score:1, Interesting)
Re:How about Catalyst? (Score:4, Interesting)
I also just made my first rails website in 10 days, this includes a cms and also an elobarate scheduling app as well as some other stuff like user manager etc. This also includes the time to learn the language and get my head around concepts. The major problem with rails is documentation, there is just to much of it scattered around and should be organised more. But with the rails api website, the ruby docs and some tutorials you will get there.
The last 2 days was just finetuning what the customer wanted. From the tutorial I would say rails is easier to read. I think perl has more power over ruby, just as C has more power over Perl as you can go more low level with it. But ruby/rails is much easier to read and even less to type.
I will still remain to use C and Perl for a lot of stuff. But when it comes to websites / web applications I will stick with rails. I can't see myself turning back. Maintaining and extending code is dead easy also the ajax integration is great.