Ruby On Rails 1.2 Released 97
Scooter[AMMO] writes "David Heinemeier Hansson sent a post to the Rails 1.2. This new version adds a slew of buff and polish to the rest of the system, as well several new features like RESTful interfaces, response formats, improved multi-byte support, and more. If you haven't checked out the web application framework that aims to renew joy within its users, give it a look. You may be amazed at how easy it makes things without sacrificing power or functionality."
Re:Improved multi-byte support? (Score:5, Informative)
If you'd RTFA instead of rushing to get first post, you would have seen this:
Re: (Score:2, Insightful)
This alone is a bad engineering practice, but there's also the possibility that the two multibyte systems are incompatible. What if one uses UTF-8 and the other UCS-2? Or UTF-32? All of those are multi-byte. All of them are Unicode. None of them use the same encoding.
Since Rails is commonly used with a database backend, any incompatibilies will cause major upgrade hea
Re:Improved multi-byte support? (Score:5, Informative)
AR:Multibyte is currently mostly used internally in Rails to make methods multibyte safe. It will be really easy to phase it out when internal support arrives.
Ruby is getting more multibyte support 'in a year', which means that it's at least going to take a few years for everyone to actually get the new version in their OS.
Re: (Score:2)
Re: (Score:3, Insightful)
Let me guess - you're one of those that would have waited for jet powered air travel to be invented instead of taking the luxurious ocean liner?
Developers need to choose the tools they feel will best help them get the job done in the time allotted and in their estimation will also allow them an upgrade path at an acceptable level of pain as things (inevitably) change.
Re: (Score:2)
That analogy falls flat on its face, because:
1. Ocean liner travel and jet travel came out over a century apart. I'll be dead in a century, but probably not in a year.
2. Jets are considerably faster than ocean liners, taking hours instead of days. As far as we know, Ruby's multi-byte support will be faster than ActiveSupport::Multibyte, but we have no idea on the
Re: (Score:2)
Using UCS-2 would be a bug, since it can't encode all Unicode characters, and UTF-32 (more properly, UCS-4) would probably be unnecessarily wasteful. Furthermore, any code that supports Unicode is going to have to support UTF-8 at some point, not least because UTF-8 has become the way of encoding Unicode on Unix, as well as on the Internet.
Re: (Score:1)
Re: (Score:2)
Ruby (the language) doesn't support Unicode yet.
Rails needs it. So they write a module to support Unicode. Yes, in a year, that module will be obsolete. But then, presumably, the module will then become a pass-through to the native Ruby support.
No code will need to be changed.
That's encapsulation. That's Good Engineering[tm].
Or I could be confused and totally missing the point
Re: (Score:2)
Encapsulation is good, yes. However, all classes should be encapsulated, so that when their internals change, their external interfaces do not.
OK, the problem presented here is what happens with ActiveSupport::Multibyte when Ruby 2.0 comes out. Since you can't forc
Re: (Score:3, Insightful)
What if one uses UTF-8 and the other UCS-2? Or UTF-32? All of those are multi-byte.
No, they're not. UCS-2 and UTF-32 are fixed width encodings, not multi-byte. And if UTF-8 is not eventually supported natively by Ruby, then the Rails implementation will still be needed. The rest of the internet is not going to drop UTF-8 just because Ruby does not support it.
Re: (Score:2)
UCS-2 was a bad example, as it has been phased out in favor of UTF-16 [unicode.org].
The technical introduction [unicode.org] to Unicode states "The Unicode Standard defines three encoding forms that allow the same data to be transmitted in a byte, word or double word oriented format (i.e. in 8, 16 or 32-bits per code unit)."
You'll notice that only the first is listed as byte? That's because a word as they have defined it is two bytes long. Two bytes is, of c
Re: (Score:3)
I'm especially surprised because the creator is Japanese [ruby-lang.org] and Ruby apparently has a big following there [ruby-doc.org].
I would have thought that multi-byte languages would have been a big deal from the start.
Re: (Score:3, Informative)
> would have been a big deal from the start.
Yup, they are. Ruby supports UTF-8, JIS, and various other multi-byte encodings. It just doesn't have support for all the Unicode encodings.
Keep in mind that other languages have to change as Unicode changes as well. For example, Java's char primitive is 16 bits, which for a while was enough to store all the Unicode characters. But with Unicode 3.1, supplementary characters can be 21 bits. That's why Java
Re: (Score:2)
Yeah, and what about UTF16LE? C'mon!!
Re:Improved multi-byte support? (Score:5, Informative)
Re: (Score:3)
Re:Improved multi-byte support? (Score:4, Informative)
There was a good AC post about it in the "Ruby as a Lisp" posting a few days ago:
It basically has to do with the fact that Unicode uses Han Unification to cause Chinese and Japanese ideograms to share codepoints, and Japanese aren't down with that, so they use Shift-JIS. Check the postings that reply to it for a big digression on the issue ;)
Re: (Score:2)
Damn autolinky didn't work!
Renew joy? (Score:4, Interesting)
Re: (Score:1)
In all honesty, what framework you use doesn't matter. YouTube was developed in python, facebook in php,
I, personally, will be lined up in the
Re: (Score:2)
Re: (Score:1)
According to the article, it started in Perl, then to ColdFusion and now it's using the
Re: (Score:2)
Re: (Score:2)
Both. Imagine a Venn diagram of (Joyful for Hackers ( ) Smart for Business). Python and Django (IMO) both hit that sweet spot, the rare, tiny sliver where both circles intersect.
If it were just Python by itself, then I'd be using either TG or pylons, but both of those are attempting to be rails (in pylons' case, rails on steroids), which, after becoming much too familiar with rails, is not what I want.
A lot of the things we've been doing in r
No Mongrel (Score:4, Insightful)
Until we get a quick and easy way of deploying Rails apps -- especially at the shared hosting level for ISPs (along the lines of PHP hosting, which is now standard), Rails will continue to have a difficult time finding a niche. The only place where Rails really belongs right now, and the only place where I'm using it (and loving it) is the corporate intranet, where putting up dedicated mongrel servers for internal web-based apps is not an issue.
Re: (Score:3, Informative)
They aim for 100% Rails compatibility (I think they are nearly there) and there are developments to allow deployment of your rails application using Java's war web archive system to a Java application server.
Re: (Score:2)
Re: (Score:1)
Capistrano is a great project to make deployment easy.
Re: (Score:3, Informative)
Well... maybe. I agree, Mongrel rocks, we use it for indi [getindi.com] and it's quite solid.
But does Rails really need to depend on it? I think the current solution - using Webrick for development and then deploying to a full-up Apache+mod_proxy_balancer_Mongrel - works pretty well.
Re: (Score:3, Interesting)
OT: I've been looking forward to 1.2 for a while now. I'm glad they got it out the door. Rails and Ruby really do make a lot of tasks much more enjoyable.
Re: (Score:2)
Re:No Mongrel but Litespeed (Score:1)
Rails 1.2 & Engines (Score:2, Informative)
http://rails-engines.org/news/2007/01/03/engines-
I never quite understood the benefit of Rails (Score:1, Interesting)
All it seems to do is offer a way to do very similar and simplistic web apps without any real-world functionality. I also wonder about the performance and memory profile; seems that the way it handles databases is exactly what DBA's hate to see. Sure, I understand Rails offers you the ability to create websites at high speed, but none of the websites it can create is worthwhile.
Re: (Score:3, Informative)
> and simplistic web apps without any real-world functionality.
You may want to look closer; it offers ways to do very complex web apps with lots of real-world functionality.
> I also wonder about the performance and memory profile; seems
> that the way it handles databases is exactly what DBA's hate to see.
In practice, ActiveRecord works out very well.
> none of the websites it can create is worthwhile.
To the contrary, the websites a programm
Re: (Score:2)
> can create with Rails are very worthwhile.
I should add - it's working very well for us (getindi [getindi.com]!), and there's a lot more to our site than the glittery front end.
Re: (Score:1)
Re: (Score:2)
Glittery front ends suck.
Re: (Score:3, Interesting)
It's already been 15 years I've been programming (Logo
So please, try it at least 2 hours, and you'll be amazed by how fun, efficient and beautiful it is.
Everytime I heard someone talking about REST, migrations, rake, capistrano, scaffolding, ActiveRecord, AJAX, routes
Re:I never quite understood the benefit of Rails (Score:5, Interesting)
While it is very simple to build applications via scaffold (automatic screens base on database schema), it is only *one* feature in Rails. Try it for a week. *Then* you'll see the real power of Rails. Sustainable development speed*, a very nice language (Ruby), nice documentation (it could be better, but it is ok) and so on.
So, instead of seeing the presentations, try to put your hands on it w/ rose-colored glasses** . If you don't like it, at least you'll learn new way to do things, which can help you in your next project
* try to keep a sustainable development speed w/ one of the standards in the market: struts/spring + hibernate. It is almost impossible to achieve.
** sorry, I'm not a native english speaker... I hope it was used in the right context
Re: (Score:3, Interesting)
Re: (Score:3, Insightful)
That's an ActiveRecord thing.. use a different ORM (Og looks quite nice), or no ORM; convention isn't a gun to your head, and it's not really a lot of effort to keep most of the benefits without actually using AR (my last Rails app used descript.ion files, heh). It's also not been true for a long, long time; each
Re: (Score:2)
You've already been replied to, but don't forget that Rails "find by sql" lets you query the db using plain ol' database dependent (but optimized) and have the selected fields retur
Re: (Score:3, Insightful)
Please cite some examples. A lot of Rails' technical sacrifices are in the name of speed of development and maintainable code. Obviously I haven't used all web frameworks, so I don't know. Maybe you're right. But I'm suspicious you're just pulling that out of your ass.
Yes, Ruby is slow, has fewer libraries, and no unicode support. However these issues don
Re: (Score:2)
Like Perl? I have yet to get a Ruby guy to answer me why Rails shouldn't be ported to a faster, more standard and more prolific language like Perl. From everything I have seen the languages both have the exact same capabilities. Class-DBI instead of AR, etc. Rails seems to have a purpose, but Ruby just seems to be the product of some devs ego and hatred of '->' instead of '.'.
Re: (Score:2)
That's such a cowardly way out. No suprise you are posting AC. You made the claims, you back them up. Say what framework you think is better so it can be fairly compared to Rails.
I can play your stupid game too. I know what framework you're thinking of, and the one I'm thinking of is twice as good as that one. Do your
Re: (Score:1)
You have a great command of the language, but since you offered that caveat, I thought I'd try to clarify this metaphor for you.
The phrase "looking through rose-colored glasses" is usually used perjoratively, a
Re: (Score:2)
You have a great command of the language, but since you offered that caveat, I thought I'd try to clarify this metaphor for you.
The phrase "looking through rose-colored glasses" is usually used perjoratively, and directed at an optimist by a realist.
I suspect that the majority of native English speakers wouldn't know what the word "perjoratively" means, and since you have an extra "r" in there, looking up a definition for the word might be difficult (the correct spelling is "pejoratively").
Re: (Score:1)
Perhaps, but I expect more from slashdot readers.
Thanks, I stand corrected.
Re:I never quite understood the benefit of Rails (Score:4, Insightful)
This is true, but it's understandable also. Rails uses databases as persistent object storage, and nothing more.
The benefits of relational databases are that they can enforce constraints with simple declarations, and abstract the logical from the physical storage. You can try to do some basic checking before you put something into a database, but it's very hard to do constraints on the application side.
I understand why developers at smaller companies don't like using relational databases as relational databases. For a long time relational databases weren't really meeting the needs of smaller shops, and they have their own learning curve. But now with good databases like PostgreSQL that have proper constraints and can do powerful relational manipulations, it's a great time to get involved in relational databases. I encourage you to try them out, they can be a godsend when it comes to application development speed.
It's a wonderful thing when you get an error from your database, and you know exactly which part of the application tried to do something wrong. The alternative is waiting until the bad data gets in, and finding out a week later when you try to do a report (try to find the bug now that you have no idea how the data got that way).
Re: (Score:1)
# Foreign key referencing Target
execute SQL
ALTER TABLE exclude_sets_targets
ADD FOREIGN KEY (target_id)
REFERENCES targets(id)
ON DELETE CASCADE;
SQL
# Foreign key referencing ExcludeSet
Re: (Score:2)
try to put your hands on it w/ rose-colored glasses**
** sorry, I'm not a native english speaker... I hope it was used in the right context :-)
Nope. You butchered it, but in an oddly pleasant-sounding way. I give you points for (unintentional) creativity.
Re: (Score:2)
Bob
Re: (Score:2)
Well penny-arcade.com and alistapart.com both run on Rails. Those are two sites I deem worthwhile. Then wtf do I know.
Re: (Score:2)
Re: (Score:2)
Re: (Score:1)
Nice apps there. Written in one day.
Comparision between Rails and Django (Score:5, Informative)
Whew (Score:4, Informative)
Heaven help! (Score:2, Interesting)
Here's a list of very good/better alternatives:
Zope - What Rails want's to be when it grows up. Ancient but still ahead of anything else with classic persistance. (www.zope.org)
django - Drinking buddies of the rails people. And they have unicode support. (www.djangoproject.com)
cakephp - YaWebframework. In PHP. Largest community out there. Impressive piece of code (www.cakeph
Re: (Score:2, Flamebait)
Django? anything that uses SQLObject is doomed to failure on anything but the most basic of projects. It's about 100 times slower than active record.
Cake php? You have to write php to use it. Game over.
Re: (Score:2)
Re: (Score:1)
I used to do a lot of work with Catalyst. I still haven't seen anything as flexible and easy to use. Rails is nice, but it's a bit too "write and drool"[1] for my taste. Oddly enough, it isn't as straight forward as it could be, either.
I highly recommend anyone interested in The Intro. [cpan.org] The The Tutorial [cpan.org] goes into a lot more depth.
[1] I don't mean to be pretentious. Ruby is a fantastic language for creating domain specific languages, as Rails shows. But Rails' greatest strength is also a m
Django does't use SQLObject (Score:2, Informative)
Django doesn't use SQLObject. You can, as a programmer, use it of course, since everything in Django is nicely decoupled, but Django uses it's [djangoproject.com] own ORM [djangoproject.com]. The main advantage of using this ORM is of course the production ready administration interface that you get for free, but if you don't need that, there is nothing stoping you from using SQLObject or even better, SQLAlchemy [sqlalchemy.org]. In fact, there is even a branch [djangoproject.com] in Django to have SQLAlchemy support in the framework.
Using a different ORM, template engine, etc in
Re: (Score:2)
I program in python day in and day out. That said, Python can be a miserable choice for a large-scale framework. Why? It has a Global Interpreter Lock, meaning the interpreter can run on at most one processor at a time.
So, the nice new multiprocessor server you bought will have similar performance to the one-processor serve
Re: (Score:2)
YARV has pthreads support, but they seem to be targeting a Big Giant Lock style design to avoid breaking lots of extensions, which is similar to what you get with PHP; the interpreter's thread safe, but use more than the most basic extensions and it all comes tumbling down.
It's not such a big deal for many deployment
Re: (Score:2)
Here's a list of very good/better alternatives
I'd hesitate to imply that PHP frameworks like CakePHP are better than Ruby on Rails. PHP's syntax is extremely limited compared to Ruby's, and these limitations are visible in any PHP web framework.
Compared to Django, Rails has more functionality directed toward maintaining AJAX sites (such as RJS templates). Ruby also has a few advantages over Python in terms of the flexibility of the language. On the other hand, Ruby lacks Unicode support and is significantly slower than Python.
I haven't really playe
Re: (Score:3, Insightful)
'€2.99'.first # => '€'
truncate('2.99', 2) # => '€2'
Even tho this isn't totally like Java's i18n support, it's getting there..
As for Ajax support, yah, it's a first class citizen in Rails. While a lot of people are sick of the term, I think it's for real and here to stay. It is the next step in web appli
Re: (Score:3, Insightful)
I agree with you in general that AJAX is only going to become more common, and done right, AJAX has many benefits. However, stop saying things like this:
Because it's akin to suggesting that we replace the engine of a car with a GPS receiver or an iPod.
Unicode (Score:2)
Allow me to be the first to say... (Score:2, Funny)
Frameworks are for sissies... (Score:1)
Re: (Score:3, Insightful)
On the purpose of a framework. (Score:3, Informative)
I've worked on several different webapps, from small and personal to large and corporate, using several different frameworks (J2EE, Django [djangoproject.com], Rails) as well as just straight PHP/ASP/static HTML. Frameworks don't really force anyone to stay in-bounds.
All of frameworks I've used allow you to drop down to straight SQL for database work, ignore their models and templating (or substitute others), and completely mess up the MVC pattern, if you want. Django goes the
How to update Rails (Score:2, Funny)
Re: (Score:2)
Ruby Rails goodness (Score:4, Funny)
Ruby on Rails is certainly a giant step forward in increasing programmer productivity. The new REST support is great, but I must say that the web based SOAP debugging interface made using SOAP with Rails painless.
A little off topic, but for my customer I integrate Rails with back end Common Lisp code - so far just using home grown REST support at both ends. Eventually, I would like to get the time to generate compiled Lisp libraries directly linked to Ruby when everything is runnng on a single server.
BTW, I created a simply Ruby and Ruby Rails news clipping web site, mostly for my own use, but it might be useful for you: http://rubyplanet.net/ [rubyplanet.net]
Re: (Score:1, Redundant)
PHP Rails (Score:1)