Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Ruby on Rails for DB2 Developers

ScuttleMonkey posted more than 8 years ago | from the building-bridges dept.

128

An anonymous reader writes "Ruby on Rails seems to be the new hotness in the world of web development, right up there with Ajax. IBM DeveloperWorks has a helpful howto on how to bring the worlds of Ruby on Rails and your DB2 framework together. From the article: 'Because Rails emerged from the open source world, until recently you had to use MySQL or PostgreSQL to work with it. Now that IBM has released a DB2 adapter for Rails, it's possible to write efficient Web applications on top of your existing DB2 database investment.'"

cancel ×

128 comments

Sorry! There are no comments related to the filter you selected.

Ruby on rails? (4, Funny)

StaticFish (839708) | more than 8 years ago | (#15600045)

In the UK we've only just got trains to go on rails.

Re:Ruby on rails? (0)

Anonymous Coward | more than 8 years ago | (#15600738)

In the UK we've only just got trains to go on rails.

Har! Out here in the U.S. Wild West I almost fell off my pony laughing at that one.
Out here we ride varments out of town on rails.

Re:Ruby on rails? (1)

rjmars97 (946970) | more than 8 years ago | (#15600784)

I must be thinking of the wrong Ruby [maxitrak.co.uk] .

Ruby could be packaged better (4, Insightful)

bogaboga (793279) | more than 8 years ago | (#15600073)

I have read about the beauty of Ruby and how it's better than Python or Perl. I'd not like to start flames but I wonder why Ruby does not have an IDE like that of SmallTalk. Yes, SmallTalk is old time stuff, but this absence does not help Ruby's popularity.

Many times, I have tried learning it on my own and have been frustrated by missing or conflicting versions of components. I'm waiting for some folks to develop a one install package that will take care of all packages needed to develop serious apps on Ruby. An IDE like Access on the JET database engine would be very welcome.

There is some effort to this end. These folks http://www.railslivecd.org/ [railslivecd.org] have started some work in this direction.

Re:Ruby could be packaged better (1)

Aladrin (926209) | more than 8 years ago | (#15600078)

It's simple. It hasn't been out as long.

There ARE Ruby IDEs out there, btw, you just have to search a lot harder to find them and they aren't nearly as complete as what you are used to, because of their young age.

Re:Ruby could be packaged better (0)

Anonymous Coward | more than 8 years ago | (#15600309)

What a useless reply. Why don't you name some of them?

Re:Ruby could be packaged better (0)

Anonymous Coward | more than 8 years ago | (#15601606)

Don't give fish, learn how to fish. Not that I'm approving that kind of an answer but still...

Re:Ruby could be packaged better (1)

mini me (132455) | more than 8 years ago | (#15600660)

Ruby has been around for a long time. It was released over ten years ago.

Re:Ruby could be packaged better (1)

mbadolato (105588) | more than 8 years ago | (#15601576)

Activestate's Komodo supports Ruby, and it's a pretty mature product. While I haven't used it for Ruby development (only Perl), I would imagine it is just as robust. Granted it isn't on the scale of a Visual Studio, but it does the job.

Re:Ruby could be packaged better (3, Informative)

ricardo_nz (917753) | more than 8 years ago | (#15600146)

You should try Ruby Gems [rubygems.org] to solve your packaging woes. As for an IDE, there are plenty available: http://freeride.rubyforge.org/wiki/wiki.pl [rubyforge.org] and http://www.mondrian-ide.com/ [mondrian-ide.com] though I can't say much about them...

Re:Ruby could be packaged better (1)

daybyter (684997) | more than 8 years ago | (#15600274)

But I wonder about the quality of this packaging. As an example: I'm trying to get FeedTools going for a week now. There's a gem installation available, but it seems even the developers don't trust it and recommend a manual installation. It seems there are several installation methods available (like copying the source files to your vendor directory), but so far no luck for me...'Feed constant not initialized' is my best result so far... :-(

Re:Ruby could be packaged better (2, Informative)

masklinn (823351) | more than 8 years ago | (#15600355)

As an example: I'm trying to get FeedTools going for a week now. There's a gem installation available, but it seems even the developers don't trust it and recommend a manual installation.

Uh? I find pretty much the opposite statement on the front page of the FeedTools project:

However, the preferred method of obtaining FeedTools is with RubyGems because of FeedTools' dependancies on other gems.

Works like a charm too:

$> gem install FeedTools -d -y
Attempting local installation of 'FeedTools'
Local gem file not found: FeedTools*.gem
Attempting remote installation of 'FeedTools'
Successfully installed feedtools-0.2.24
Successfully installed uuidtools-1.0.0
Installing RDoc documentation for feedtools-0.2.24...
Installing RDoc documentation for uuidtools-1.0.0...
$> irb --simple-prompt
>> require 'feed_tools'
=> false
>> slashdot_feed = FeedTools::Feed.open('http://www.slashdot.org/inde x.rss')
=> #
>> slashdot_feed.title
=> "Slashdot"
>> slashdot_feed.description
=> "News for nerds, stuff that matters"
>> slashdot_feed.link
=> "http://slashdot.org/"
>> slashdot_feed.items.length
=> 10

Re:Ruby could be packaged better (1)

daybyter (684997) | more than 8 years ago | (#15600494)

I followed the tutorial links to the textdrive forum, where nrbrookes recommended this strategy:
This is what I did to get feed tools working...

a) unpacked feedtools and the uuid gems
b) edited the feed_tools.rb changing require_gem( 'uuidtools' ) to plain ol' require( 'uuidtools')
c) copied the feed_tools.rb, feed_tools folder and uuidtools.rb into my vendor directory (don't put the whole of the unpacked gem, the stuff you are interested in is in lib)

and then it works.
but no luck so far...I'll go on trying...

Re:Ruby could be packaged better (1)

aCapitalist (552761) | more than 8 years ago | (#15604214)

He's talking about a Smalltalk-like development environment. Freeride and Mondrian don't even come close. Of course that begs the question of whether it would have been a good idea to have Ruby be image-based. Smalltalk is defined by its powerful development environments and it certainly wouldn't hurt Ruby to have one too.

Re:Ruby could be packaged better (4, Informative)

flipper65 (794710) | more than 8 years ago | (#15600156)

Actually, if you are looking for a rails IDE I strongly suggest that you check out http://radrails.org/ [radrails.org] available both as stand alone and as an eclipse plugin.

Re:Ruby could be packaged better (5, Informative)

12ahead (586157) | more than 8 years ago | (#15600168)

Not sure what system you are on, but for osx there is Locomotive [raaum.org] . You will get a magnitude of libraries (I guess the DB2 stuff won't be in there just yet) plus a nice gui to start/stop webservers for your Rails projects. Not sure if you were after Rails or plain Ruby, but anyway.

On the IDE front you could check out RadRails [radrails.org] . Again, this focuses on Rails instead of "just" Ruby.
 
However, I do believe that Ruby is one of those languages that you can learn by just using it from command line. You do not need an IDE or huge framework to do fun stuff. You can at least get a feel for how Ruby does stuff to put you off it or to keep investigating.

Re:Ruby could be packaged better (2, Insightful)

Decaff (42676) | more than 8 years ago | (#15601996)

However, I do believe that Ruby is one of those languages that you can learn by just using it from command line. You do not need an IDE or huge framework to do fun stuff. You can at least get a feel for how Ruby does stuff to put you off it or to keep investigating.

There is very strong evidence based on decades of research (such as with Smalltalk in the 70s) that says that the best way to learn and use OOP languages is with a good GUI. There is nothing to match browsing classes and dynamically inspecting objects during the execution of a program.

I am very skeptical whenever I hear 'you don't need a GUI'. This seems to me to be an argument along the lines of 'if we don't implement it, you don't need it'.

Re:Ruby could be packaged better (2, Insightful)

aCapitalist (552761) | more than 8 years ago | (#15604235)

I am very skeptical whenever I hear 'you don't need a GUI'. This seems to me to be an argument along the lines of 'if we don't implement it, you don't need it'.

Actually, it's "You don't need it until we actually implement it". That's pretty typical of the linux-type crowd though that have always screamed that Vi and Emacs are the epitomy of advanced development environments.

Re:Ruby could be packaged better (2, Informative)

masklinn (823351) | more than 8 years ago | (#15600330)

Mostly because Smalltalk came from PARC and was built to work in an environment (BTW there is no Smalltalk "IDE", they're environment and you work in an image within the environment, it's a much more impressive concept than the simple concept of IDE which is merely a beefed up text editor)

Ruby was built as a programming language and as a language only, it wasn't built with the idea of environments in mind and the editors/ides therefore have to be bolted on. Plus Ruby only recently started to get widespread adoption in occident (and fyi Python doesn't have many good IDEs and it's been popular for a much longer time in occident than Ruby).

About the packages issue, I can't help but tell you to learn how gems work, as it automagically handles dependencies and package versioning...

Re:Ruby could be packaged better (4, Informative)

MarkWatson (189759) | more than 8 years ago | (#15600443)

Actually, I find the Eclipse RDT and RadRails plugins to be very good (I work in this environment 8 to 15 hours a week).

I had another more radical thought yesterday: just for fun, I installed the latest stable build of Squeak Smalltalk - years ago, I had done some natural language processing work with Squeak and I wanted to look at a newer version. Any, the idea: Smalltalk and Ruby are similar enough, that for non-GUI applications it would not be so hard to write a translater from Smalltalk to Ruby for deploying small utility applications.

The performance of Ruby is not so great (I just had to switch part of my current project from Ruby to Common Lisp for performance), but it would be neat to be able to use a Smalltalk enviroment, and "compile to Ruby". Anyway, this is an idea that probably lacks merrit because professional versions of Smalltalk like VisualWorks have very good deployment tools (small size, low memory requirements) and even with the free Squeak system, with some effort you can build smaller "headless" applications.

Back to Ruby: I find Ruby installation to be easy, and the rubygems system is great. The Ruby community is friendly and helpfull.

Re:Ruby could be packaged better (1)

MarkWatson (189759) | more than 8 years ago | (#15600454)

BTW, I set up a Ruby news scraper for my own use, but then made it public:

http://rubyplanet.net/ [rubyplanet.net]

This site was a one night hack, including getting a domain name and deployment, but it does let me see what is happening in the Ruby community.

Re:Ruby could be packaged better (1)

jsnipy (913480) | more than 8 years ago | (#15600666)

Try using eclipse with the plugin ... http://sourceforge.net/projects/rubyeclipse [sourceforge.net] @least eclispe does more than thing rather than dozen crappy ides someone has cobbled together

Re:Ruby could be packaged better (1)

Guy De Bideux (984924) | more than 8 years ago | (#15601569)

You should take a look at Starter Toolkit for DB2 on Rails [ibm.com] . It is a complete package of everything that you will need including a copy of DB2 Express - C that is absolutely free to distribute as part of your finished application and it does not limit the size of your data like the other database servers do. It is a complete one-click installer for everything. The integrated installer is for Windows at this point but the one for Linux is in the works. Bookmark http://db2onrails.com/ [db2onrails.com] if you are interested in watching this very fast evolving space. As for the IDEs, there are quite a few really good ones out there RadRails [radrails.org] that just got an award as the best Open Source Eclipse-based Tool. Matt Kent, Marc Baumbach, and Kyle Shank have done an amazing job on the tool and a nice presentation at the RailsConf 2006 in Chicago. There is also RDT [sourceforge.net] . There is even a set of add-ins called Saphhire in Steel [sapphiresteel.com] for Microsoft Visual Studio 2005. I can just see all the sladhdotters rushing to get this one :-) and flame to death in the process.

Re:Ruby could be packaged better (1)

misleb (129952) | more than 8 years ago | (#15601594)

Many times, I have tried learning it on my own and have been frustrated by missing or conflicting versions of components. I'm waiting for some folks to develop a one install package that will take care of all packages needed to develop serious apps on Ruby. An IDE like Access on the JET database engine would be very welcome.


Oh come on. Settting up a Rails environment isn't that hard. And that is all you need to start developing "serious" (web) apps in Ruby. Get a Mac and run Textmate and you are set. I tried RADRails for an IDE and found it to be slow (Java GUIs suck ass) and didn't offer much over Textmate.app + Terminal.app.

-matthew

Re:Ruby could be packaged better (1)

aCapitalist (552761) | more than 8 years ago | (#15604241)

Oh come on. Settting up a Rails environment isn't that hard. And that is all you need to start developing "serious" (web) apps in Ruby. Get a Mac and run Textmate and you are set.

Oh come on, Edlin is all you need to start developing serious web apps in Ruby. Get a DOS machine and you are set. For the sarcasm-impaired the parent is typical of the "We haven't implemented it, so you don't need it" crowd.

Re:Ruby could be packaged better (0)

Anonymous Coward | more than 8 years ago | (#15602396)

I'm just now leaving the Rails conference in Chicago. I have a fresh insight on your question.
the people who are out there using Rails, are not seeing the *need* for an IDE. They pretty much all use Textmate. And, yes, Rails developers almost universally are Macbook users. This does not appear to be a coincidence. (I saw more Macbooks at the Rails Conference than I've seen anywhere except for Apple events. No lie.)

There are some tooling initiatives going on, and RadRails is coming along quite nicely.
But the fact is, many programmers, MANY of whom are "recovering" Java programmers, are reporting less of a *need* for an IDE. Part of this is because the application domain of Rails is tailored in a highly opinionated frame -- to do anything besides database-backed web apps is going to hurt -- and this is part of Rails design philosophy and the developers will not compromise that or apologize for that. There's a strong community consensus to say "no". Understanding this is fundamental to understanding where Rails lives in the general, err, um, scheme of things.

So every Rails project has the same structure, they all have the framework for testing built into the project in a way that is idiomatic to the language, and, pretty much every one of the thousand or so really serious Rails developers is happily, *blissfully* using Textmate on a Mac to do it, and for big deployments they are using tools like Capistrano and Mongrel. There's perhaps a case to be made for more "I", I suppose, but the Rails developers are not generally finding a need.

I'm not going to try to claim that Rails is *really* different from the dozen or so disruptive technologies that were supposed to be revolutionary, in the last few years, but I must report that, for the first time since the '90s, I'm seeing people with ideas for genuinely *different* things to do on the web, able to put those ideas into action (to a revenue stream) without much effort. The stuff works really well for what it's designed for.

I'm now putting Rails in the category of glue languages, but in the sense that, Rails is to web apps what perl is to unix file and process administration. It doesn't really bring anything new to the table, but it certainly is a strong enabler. I suspect Rails will gain some importance for the simple reason that it encourages people to *do* stuff, and it does not bog them down in the hell that we have in certain frameworks we've been using.

One other point. There's not really enough *to* Rails to make a huge deal about it. If you brought me a Java programmer who couldn't get up to speed on Rails in the space of 4 hours with a book or tutorial, I would laugh. It's ridiculously easy to learn enough rails to put together the typical form-based webapp that does CRUD transactions for your data. And your app, from the start, encourages a test-driven approach (VERY strongly rooted in the culture), and, love it or hate it, the layout of your project will be understandable from the beginning to any other Rails programmer.

On the *other* hand, Rails is Rails, it is a DSL built out of Ruby, which is a language that is well-suited to DSLs. You program Rails in Ruby, and to program Rails you do need to know enough Ruby to be dangerous, but you must *must* think of Rails as a separate context from Ruby. The designers of Rails are well aware that it will be hard to deal with some situations, DHH puts it like, "insanity *SHOULD* be painful*. You can of course do *anything* in the language, but it's going to be highly opinionated. And the community has already shown a commitment to reject the criticism which comes with assertions that it should be extended to serve as a more general purpose language, or that it should be made to enable things like composite primary keys in legacy databases. It's not going to do that sort of thing, not even going down that road at all. Vehemently. This is an important to be aware of. Rails might become pretty compelling as an enterprise technology, but what's different with *this* particular revolutionary idea is that it expects the *enterprise* to adapt to the best practices of the 21st century, and it is NOT going to adapt to legacy technology, particularly, clumsy DB schemas and legacy http browsers.

This attitude has helped Rails remain on-point and does not appeared to have slowed its adoption.

We will see. The first Rails conference sold out the Chicago Wyndham within a few hours. Next year, we expect to fill up the Portland convention center. I also expect people to still be voicing their criticism of the "opinionated" design of rails. I *also* expect som eof those *same* people to still be working on long project cycles where Rails developers are running rings around them.

Thank you for letting me share my opinions on Rails Conference. O'Hare airport WiFi is pretty good, food court spacious, plenty of electrical outlets. Peace!

Re:Ruby could be packaged better (1)

Sovok (784411) | more than 8 years ago | (#15602551)

If you have Mac OS, you should try TextMate (http://macromates.com/ [macromates.com] ).

Ruby is preinstalled with Mac OS, you write your script in TextMate, press Apple+R and the results pop up in a seperate window. Very nice and fast.
There are also 'Bundles' for Ruby and Rails, which let you develope stuff very quickly. Code completion, easy switching between model, controller and template etc.

Re:Ruby could be packaged better (1)

colmore (56499) | more than 8 years ago | (#15602901)

IDE? You mean like vim and an xterm?

Honestly, I've never liked IDEs, or any tool so specific to a given language / environment, that the experience won't generalize to my next project. I'd rather climb a steeper learning curve and learn a piece of software that I can be reasonably sure I will still be using for whatever language and system I'm working in in 2030.

Re:Ruby could be packaged better (1)

aCapitalist (552761) | more than 8 years ago | (#15604250)

IDE? You mean like vim and an xterm?

Honestly, I've never liked IDEs, or any tool so specific to a given language / environment, that the experience won't generalize to my next project. I'd rather climb a steeper learning curve and learn a piece of software that I can be reasonably sure I will still be using for whatever language and system I'm working in in 2030.


No, we mean modern development environments that aren't stuck in some 1980s barley-above-console world. And "honestly", your personal preferences are irrelevant to other people's development tools preferences. Nobody is going to take away your precious vim if a kick-ass Smalltalk-like environment was developed for Ruby.

There is a package already (1)

pedrotuga (966625) | more than 8 years ago | (#15603155)

At least one. It's recomended for begginers on RoR's website. It comes out of the box... just unzip it and there you go.

DB2... The only change? (4, Insightful)

Aladrin (926209) | more than 8 years ago | (#15600075)

I can understand wanting to get news of the DB2 adapter out to the public... But to attach a tutorial to it that is basically just another RoR tutorial seems pointless. The only differences in this article from every other RoR article were in the paragraph that describes how to install the DB2 adapter for RoR.

-yawn-

Re:DB2... The only change? (5, Insightful)

Anonymous Coward | more than 8 years ago | (#15600112)

But to attach a tutorial to it that is basically just another RoR tutorial seems pointless.

It's called "jumping onto the bandwagon"; you may have heard of it. It's what all of IBM's "cutting-edge" developerworks-articles (written by some sophomore pimply FOSS-monkey intern) are about.

Re:DB2... The only change? (1)

masklinn (823351) | more than 8 years ago | (#15600361)

IBM has been jumping on multiple bandwagons for a while now, I think I've already seen at least a pair of Rails tutorials and at least one or two Django tutorials on DeveloperWorks.

They're usually fairly bad too..

Re:DB2... The only change? (0, Troll)

Anonymous Coward | more than 8 years ago | (#15600885)

You are wrong. Edd Dumbill is everything but a sophomore pimply FOSS-monkey intern. Search him on google.

Re:DB2... The only change? (1)

jcnnghm (538570) | more than 8 years ago | (#15601106)

Personally, I think IBM should be commended. Their developerworks articles are usually of good quality, easy to find, well thought out, timely, and free. When I'm searching for some tech topic (specifically implementation instructions/tutorials) with Google if anything from IBM shows up, that's the first place I'll go. Just the other day I used their ssh keychain piece [ibm.com] when I was working on setting that up.

I just wish more companies would follow there lead and provide something of value.

Re:DB2... The only change? (0)

Anonymous Coward | more than 8 years ago | (#15600440)

Your sarcasm isn't too far from the mark: IBM is a tad too slow to respond on this one.

I am also suprised by their attention. I work in banking and my experience has seen DB2 used to support very heavy applications (e.g. internet banking with 1+ million customers). Is rails being used in enterprise for heavy web apps (not my field)?

Re:DB2... The only change? (1)

kpharmer (452893) | more than 8 years ago | (#15600624)

> I work in banking and my experience has seen DB2 used to support very heavy applications (e.g. internet banking with 1+ million customers).
> Is rails being used in enterprise for heavy web apps (not my field)?

Massive databases often support multiple presentation layers - ecommerce, internal administration, parter access, internal reporting, etc, etc. Even if you're doing one in Java/websphere there's no reason another couldn't be in RoR.

Re:DB2... The only change? (4, Insightful)

Decaff (42676) | more than 8 years ago | (#15600671)

Massive databases often support multiple presentation layers - ecommerce, internal administration, parter access, internal reporting, etc, etc. Even if you're doing one in Java/websphere there's no reason another couldn't be in RoR.

There is good reason why you may not want it to be. The Java/J2EE/Websphere approach often uses clustering and cacheing to give high performance and scalability. You would not want to let a small RoR application (or any other type of application) loose on such such a system.

Re:DB2... The only change? (2, Interesting)

kpharmer (452893) | more than 8 years ago | (#15600969)

> There is good reason why you may not want it to be. The Java/J2EE/Websphere approach often uses clustering and cacheing to give
> high performance and scalability. You would not want to let a small RoR application (or any other type of application) loose on such such a system.

It depends:
  - I'd bet that 9 out of 10 websphere/weblogic implementations don't use clustering
  - many massive databases have relatively modest websites, ie the heavy-lifting is all backend not presentation
  - many massive databases have small related "helper" applications that also need presentation layers
  - even clustering & caching applications should be able to handle changes to reference data through simple cache-refresh methods.

Fortunately for me, most of my massive databases get php front-ends these days. And hopefully RoR soon.

Re:DB2... The only change? (1)

Decaff (42676) | more than 8 years ago | (#15601087)

It depends:
    - I'd bet that 9 out of 10 websphere/weblogic implementations don't use clustering
    - many massive databases have relatively modest websites, ie the heavy-lifting is all backend not presentation
    - many massive databases have small related "helper" applications that also need presentation layers
    - even clustering & caching applications should be able to handle changes to reference data through simple cache-refresh methods


This is irrelevant. Of course the heavy lifting is backend - but that is where websphere/weblogic/j2ee come in - they are systems designed for this kind of heavy lifting. Where such high-performance and cacheing goes on (and this may not be simple), you can't just attempt to connect a PHP or RoR application to the same tables and expect everything to work right.

Fortunately for me, most of my massive databases get php front-ends these days. And hopefully RoR soon.

Then they probably aren't the kind of substantial applications being discussed. Large high-transaction-rate systems tend to use considerable amounts of in-memory storage and avoid falling through to the database where possible, as the database can be the slowest part of the system. The 'let the database store everything' approach of PHP and RoR doesn't scale to the highest levels of performance.

Re:DB2... The only change? (1)

kpharmer (452893) | more than 8 years ago | (#15602537)

>>Fortunately for me, most of my massive databases get php front-ends these days. And hopefully RoR soon.

> Then they probably aren't the kind of substantial applications being discussed. Large high-transaction-rate systems
> tend to use considerable amounts of in-memory storage and avoid falling through to the database where possible, as the database
> can be the slowest part of the system. The 'let the database store everything' approach of PHP and RoR doesn't scale to the highest levels of performance.

Keep in mind that "substantial applications" take a variety of forms. Some have high transaction rates with relatively simple queries and many concurrent users. Perhaps J2EE is well-suited here, though I suspect that the complexity it incurs isn't worth the benefit, and there are a variety of ways to cache database data, including within the database of course. And of course, most people don't need "the highest theoretical levels of performance" - they need reasonable performance.

Other substantial applications have low to no transaction rates with extremely complex queries and fewer users. In this latter situation j2ee is no better suited than RoR, actually worse in a variety of ways such as complexity & cost. Enterprise reporting and information dashboards & consoles are perfect examples in which applications may have just a few hundred simultaneous users running thousands of extremely complex queries.

Back to RoR & DB2 - i'm currently working on a multi-terabyte DB2 database application that supports hundreds of large customers running extremely complex queries around the clock. It worked fine in php, there's no reason to believe that it won't work even better in RoR. Saying that this isn't an enterprise app, isn't a substantial app, or doesn't apply to anyone else is highly misleading.

Re:DB2... The only change? (1)

osgeek (239988) | more than 8 years ago | (#15600480)

IBM doesn't want to point their customers and potential customers to web sites that describe how to use MySQL, then have to tack on a "... and then here's how you can use OUR product with it."

They want to keep the user firmly in their court for the entire exercise, so this approach makes sense from their perspective.

Plus, it's easier to follow one tutorial than to have to skip around multiple ones.

But otherwise its not interesting (1)

ndg123 (801212) | more than 8 years ago | (#15603936)

The readers of the article are likely to be developers in DB2 shops who haven't touched RoR yet. They may not have bothered downloading the software stack, installing and configuring when they saw 'MySQL', but now there is DB2 support, they would likely appreciate the complete getting started guide. Besides, they'd rather have the version written by someone who works for one of their major suppliers rather than a pimply sophomore in his blog (to borrow a phrase from a sibling poster).

Really good news. (5, Interesting)

marcello_dl (667940) | more than 8 years ago | (#15600115)

Getting the likes of IBM to recognize the usefulness of the Rails framework is a little more than just another DBMS supported: rails used to be bashed, especially by java people, for not being "enterprise ready". They criticised the limitations of the active record ORM (but it's open source, you can either extend it or make your custom sql calls), or the relative immaturity of ruby and libraries.

Now such claims will sound less credible so more dubious people might give it a try.

Re:Really good news. (4, Insightful)

Decaff (42676) | more than 8 years ago | (#15600407)

Getting the likes of IBM to recognize the usefulness of the Rails framework is a little more than just another DBMS supported: rails used to be bashed, especially by java people, for not being "enterprise ready". They criticised the limitations of the active record ORM (but it's open source, you can either extend it or make your custom sql calls), or the relative immaturity of ruby and libraries.

Now such claims will sound less credible so more dubious people might give it a try.


IBM has been hosting articles about RoR for some time - this is not a major change in attitude - it is indeed simply getting just annother DBMS supported. Rails is bashed for not being enterprise ready for more than just the range of databases supported. This additional support does nothing to change the limitations of the Active Record approach (and the ability to extend the system does not make it enterprise ready).

There are many aspects of Ruby and Rails that remain a significant barrier to much enterprise use - performance, for one thing (Ruby VMs that might address this problem seem stuck in permanent beta), the ability to handle international characters is another.

To assume that these issues are somehow fixed simply because IBM has provided DB2 support is nothing more than wishful thinking.

Re:Really good news. (1)

marcello_dl (667940) | more than 8 years ago | (#15600834)

I should have been more explicit. You made some points about ruby that can be crucial indeed. But those emerge after you tried the technology and see it unfit for your needs. Many other people just swallow up the opinion by java lovers (trolls?) that I was referring to and don't bother to give it a try. You probably meant enterprise ready as "advanced feature-rich", I meant "useful in business". I also never implied that limitations of rails would go away on their own, ideally a frameworks limitation should be apparent as early as possible to avoid people making wrong choices. But this is a completely different problem. Anyway I didn't notice that IBM was already interested in rails, so my comment is indeed exaggerated.

Re:Really good news. (1)

Decaff (42676) | more than 8 years ago | (#15600871)

You probably meant enterprise ready as "advanced feature-rich", I meant "useful in business".

Not really - for me, features like support for internationalisation are not just useful, but crucial for any large-scale (enterprise) applications. This is, of course, different from smaller-scale applications, for which RoR may well be suitable.

Re:Really good news. (1)

FooAtWFU (699187) | more than 8 years ago | (#15601128)

the ability to handle international characters is another.

Wait. I don't develop Ruby. But you're not honestly telling me that it doesn't at least have support for UTF-8, are you? I would have thought that UTF-8, at least, would have been a given for such a project. Is the support only partial, or is it limited, or... something?

Re:Really good news. (2, Informative)

jizmonkey (594430) | more than 8 years ago | (#15601222)

Wait. I don't develop Ruby. But you're not honestly telling me that it doesn't at least have support for UTF-8, are you? I would have thought that UTF-8, at least, would have been a given for such a project. Is the support only partial, or is it limited, or... something?

The (Japanese) creator of Ruby thinks that Unicode sucks, and therefore Ruby has only half-baked support for Unicode. There are patches to make Rails work with Unicode but they're a little flaky.

Re:Really good news. (0)

Decaff (42676) | more than 8 years ago | (#15601284)

Wait. I don't develop Ruby. But you're not honestly telling me that it doesn't at least have support for UTF-8, are you?

Yes, I am.

I would have thought that UTF-8, at least, would have been a given for such a project.

Indeed.

Is the support only partial, or is it limited, or... something?

No, it is absent. There is work going on to help fix this.

Re:Really good news. (1)

MrWa (144753) | more than 8 years ago | (#15601656)

the ability to handle international characters is another.

I do not know the full extent of internation character lack of support, but that seems quite ironic since Ruby is from Japan

Re:Really good news. (1)

Decaff (42676) | more than 8 years ago | (#15601905)

yes, it is!

Re:Really good news. (1)

jrockway (229604) | more than 8 years ago | (#15603386)

> that seems quite ironic since Ruby is from Japan

The story goes that the Japanese were upset about the whole Unicode thing. They had their own charsets that had all the Japanese characters necessary... so why bother with all these other languages?

There was also the "Han Unification" (as part of the Unicode "transition") where all CJK characters that were the same were mapped to the same code points. Again, this upset the Japanese for some reason; I'm not sure about the details. Apparently some language experts disagree about which characters are and aren't the same; dictionaries have lost details over the years and it's hard to say what's right and what's wrong.

OTOH, I learned most of this in the context of Ruby, so maybe it's just the Ruby guy that's upset about all of this. I read debian-users-jp, and there are certainly a lot of questions about setting up a proper UTF-8 environment. So maybe one loud person, that speaks English, is not fairly representing the entire country, while everyone else is happy to embrace UTF-8. (Even I use en_US.UTF-8 exclusively, and it makes for a nice computing experience; or at least a music library that's multi-lingual :)

Re:Really good news. (1)

fishbowl (7759) | more than 8 years ago | (#15602471)

>Getting the likes of IBM to recognize the usefulness of the Rails framework is a little more than
> just another DBMS supported: rails used to be bashed, especially by java people, for not being
>"enterprise ready".

Others of those Java people gave Rails a try, and quite a few of them have just showed off their successes in Chicago.

For all the talk, pro or con, there's the pesky matter of *results*.

Too many applications are built using very cumbersome frameworks, especially web presentation stuff, database binding, and scaling up to production levels, and of course some of these applications probably justify such architectures, but many can be developed, quite competently and successfully, using Rails. The people who are doing it, aren't really doing advocacy... they are just happily using it to go from idea to revenue stream, way faster and more consistently than they ever did with Java.

There's not really an excuse not to add Rails to your toolbox and personal knowledge base. Any competent Java programmer who has ever touched a webapp, should be able to go from tabula rasa to deployed application inside of 4 hours. It leaves a lot of time (and money!) available for *design*, which is (and should be) the expensive part that takes work...

Ruby on Rails for DB2 Developers (1)

stud9920 (236753) | more than 8 years ago | (#15600119)

Ruby on Rails for DB2 Developers
Does that mean Ruby is derailed for Oracle, mysql and postgres developers ?

Re: Ruby on Rails for DB2 Developers (1)

MoeDrippins (769977) | more than 8 years ago | (#15601488)

> Does that mean Ruby is derailed for Oracle, mysql and postgres developers ?

What would give you that idea? The DB2 adapter is part of Rails, and can be used outside the web-stack if you like. Your question is akin to asking if Java using Oracle is no longer relevant since someone has come out with a type 4 JDBC driver for Sybase.

If you were trying to be funny here, then I apologize for not getting it.

RoR vs Django? (1)

Poromenos1 (830658) | more than 8 years ago | (#15600159)

I was wondering if anyone has used both RoR and Django. Having only used the latter myself, I am a bit curious on how they compare. Can anyone fill me in on that?

Re:RoR vs Django? (1)

necaris (941652) | more than 8 years ago | (#15600197)

AFAIK it's not just Django, there's stuff like TurboGears out there as well that does the same sort of thing. I believe Django was developed for a publishing environment and still has newspaper-y assumptions built in, whereas Rails was designed to be more general-purpose, but I haven't encountered Django recently so this could all be old news...

Re:RoR vs Django? (1)

Poromenos1 (830658) | more than 8 years ago | (#15600238)

I know there are more, but Django's what I'm familiar with :). I don't know about the assumptions, I haven't noticed any, but then again, I have nothing to compare it to...

Re:RoR vs Django? (2, Informative)

jcroft (23893) | more than 8 years ago | (#15600964)

Django did start out in publishing (I should know, I'm the senior designer for the publishing company that created it). But, since then, it's been developed greatly to work well in other application-type environments. While Django still excels at content-heavy sites, and you can see the roots are in publishing, I would contend it's every bit as capable for more transaction-based web apps as Rails is.

Re:RoR vs Django? (0)

Anonymous Coward | more than 8 years ago | (#15600210)

Django looks nice but, from reading their light tutorial, there's at least a big difference: you have to describe your models in the code. RoR reads all it can from the database, so you just need to add a "foo" column to your table and voila, you get a "foo" attribute of the correct type, that can be used even without restarting anything.

Re:RoR vs Django? (1)

nstlgc (945418) | more than 8 years ago | (#15600233)

I still don't understand why people consider this a good thing...

Re:RoR vs Django? (0)

Anonymous Coward | more than 8 years ago | (#15600344)

It's not good, it's RAD.

Re:RoR vs Django? (2, Insightful)

jcroft (23893) | more than 8 years ago | (#15600974)

I would say this is a bit of the Python philosophy showing up in Django: Explicit is always better than implicit. Obviously Rails doesn't share this philosophy, and that's fine. But Django definitely intends to be very Pythonic, and model definitions are no exception.

Re:RoR vs Django? (3, Interesting)

amaupin (721551) | more than 8 years ago | (#15600251)

Haven't tried Django, but while Ruby on Rails is making progress, it's still no match for the power and flexibility of Zope.

Re:RoR vs Django? (2, Interesting)

teg (97890) | more than 8 years ago | (#15600389)

Haven't tried Django, but while Ruby on Rails is making progress, it's still no match for the power and flexibility of Zope.

I've been programming python for many years now - I've not used Django, but after reading the docs etc. it looks like yet another "Ruby on rails is popular, let's make something!" which is nowhere near finished. One nice thing about Ruby on Rails is focus - the entire ruby community seems to be on the bandwagon, driving it forward and integrating nicely with it. This means that docs, libraries etc are there for you.

Zope is way too complex... when you know easily how to get most of what you want to do in python scripts from straight database tables, you'll hit your head against the wall for ages converting this from python code to Zope and its evil ZoDB[1]

[1] The one good reason for using ZopeDB is that Python's database libraries need a large overhaul. Consistency is badly needed (making things like quoting etc. driver dependent... which sick mind thought that was a good idea?), and why are there so many drivers? There shouldn't be a need for much more than one for each database - and e.g. in the case of PostgreSQL, that should be the bundled one. pyPgSQL, PyGreSQL, Psycopg, PoPy, Proboscis.... and I'm sure I forgot some. The perl DBI interface was more pleasant to use almost 10 years ago than the python DB interface is today. JDBC also got it right. A de-facto standard python ORM would be nice too.

Re:RoR vs Django? (2, Interesting)

masklinn (823351) | more than 8 years ago | (#15600428)

after reading the docs etc. it looks like yet another "Ruby on rails is popular, let's make something!" which is nowhere near finished

It's not, both are extremely different from one another (and even more since the Django guys went the magic_removal route). And while Django is not finished (nor is rails) it's very much production ready.

why are there so many drivers? There shouldn't be a need for much more than one for each database - and e.g. in the case of PostgreSQL, that should be the bundled one. pyPgSQL, PyGreSQL, Psycopg, PoPy, Proboscis.... and I'm sure I forgot some. The perl DBI interface was more pleasant to use almost 10 years ago than the python DB interface is today. JDBC also got it right. A de-facto standard python ORM would be nice too.

I hear you, that's probably the biggest issue with the Python community, this "No tool does exactly what I want, so I'll just build a new one, no point in extending an existing one" attitude.

Brings some interresting stuff to the table though (have you tried SQL Alchemy [sqlalchemy.org] in your Quest For An ORM?)

Another Python issue is that the community can hardly bring itself to standardize things, and even then people usually try to build even more tools (sometimes better though, see py.test versus STL's unittest, or effbot's ElementTree which will finally be part of the STL with Python 2.5 versus the whole xml package crapfest)

Re:RoR vs Django? (1)

jcroft (23893) | more than 8 years ago | (#15600804)

Nevermind the fact that there have been production sites built on Django FAR longer than there have been production sites built on Rails, I guess. *rolls eyes*

Rails was open-sourced first, but Django has been in existence and working well longer.

Re:RoR vs Django? (5, Informative)

masklinn (823351) | more than 8 years ago | (#15600411)

I've tried a bit of both, and from what I've seen:

  • Rails does more user-related stuff automagically, but doesn't build your administrative interfaces (you have to do that yourself). Django's admin interfaces are dead-easy to build and gorgeous to boot (as far as admin interfaces can be I mean).
  • Rails does a lot of things by itself, but you have to follow the Rails Path/Rails Way/whatever. It's name means it all, if you veer too far from how DHH intended Rails to work it breaks (in the sense of "it makes your life a living hell), while Django is much more flexible. If you don't like the way Rails work you're screwed while with Django you can recover. The plus side is that Rails does a lot of things for you if you follow The Rails Way.
  • I quite like the ActiveRecord ORM pattern. On the other hand i'll repeat the last point: if you want to switch to another ORM pattern or ORM period, you're going to have a hard time. Django makes it much easier to switch to a non-default ORM engine (the impressive SQL Alchemy for example)
  • Rails' quite static (directories) structure make it... well.. structured. You don't want to bend the directory structure too much (see point 2), but it's usually well thought of and gives a very clean feeling. Django "feels" much less structured out of the box.
  • Testing is strongly emphasized in Rails, and it goes a long way towards helping you write as many Unit (for models) and Functional (for controllers) tests as you can write. And every time you generate models or controllers Rails will create test stubs that you just have to fill.
  • ERb. Basically, you write your templates (views) in Ruby. This means that Ruby's templates are much more powerful than Django's (out of the box) templates, and you don't have to learn another language and switch between Ruby and your-template-language. On the other hand, Django's templating language makes it much simpler to use by designers (ERb is much more fit to coders, and the Django team considered that coders didn't know jack about web pages and weren't supposed to go near the stuff). The downside of ERb is -- of course -- that since it's much more powerful (you have the full power or Ruby available) you can turn your templates into a PHP-like crapfest with whole bunches of application/model logic in them.

I haven't build any big application with either yet, I don't have any real preference yet (I know more about Rails than Django though), but how I see it ATM is that way: if I need an extremely extensive admin interface, I'll just go with Django, the admin scaffolds just save too much time. If I don't need that extensive admin interfaces I'll go for the most well-known language in the team (if I have Pythonistas I'll pick Django, if I have rubyists I'll go with RoR).

Re:RoR vs Django? (1)

Poromenos1 (830658) | more than 8 years ago | (#15600430)

Ah, that was very informative. Based on what you said, there's not THAT much more that RoR does that one has to learn a new language + framework to use over Django.

And I agree, the admin interface is a lifesaver :)

Re:RoR vs Django? (1)

masklinn (823351) | more than 8 years ago | (#15600468)

Based on what you said, there's not THAT much more that RoR does that one has to learn a new language + framework to use over Django.

While it's true, I consider that broadening your horizons and knowing more if only for the sake of widening your field of vision is always a good thing.

Plus neither are Rails nor Django static, they're both under heavy development (likewise for Turbogears, but I don't know that one at all).

Re:RoR vs Django? (1)

Poromenos1 (830658) | more than 8 years ago | (#15601305)

Ah, I would much like to learn Ruby. If only I could find a tutorial that is not a zillion pages long :(

Re:RoR vs Django? (1)

potHead42 (188922) | more than 8 years ago | (#15601671)

In case you haven't seen it yet, check this [poignantguide.net] out. It's also rather long, but so hilarious you'll not want to stop reading.

migrations (0, Redundant)

Zugot (17501) | more than 8 years ago | (#15600394)

too bad it doesn't support migrations. better luck next time ibm.

Re:migrations (0)

Anonymous Coward | more than 8 years ago | (#15600787)

The IBM DB2 adapter does support migrations. There are little things that are not implemented yet, but you can still use migrations.

Not as hot (0, Flamebait)

nostriluu (138310) | more than 8 years ago | (#15600570)

Sorry, RoR is not nearly as "hot" as Ajax. RoR people may think it is, but Ajax applies equally to all different technologies and RoR's adoption, aside from a few notables, and many small projects and hobbyist tinkering, is very low. Some RoR led concepts have made it into other languages, but it's still by far a minority player in a vast field, and very likely to succumb to a variety of factors - not being possible to be "all that" and people getting turned off, an existing or new solution comes out that's even better, and so on.

I heard one speaker saying RoR invented MVC (when it at least originated with Smalltalk way back when), so you know there's a certain amount of hype at work here.

Re:Not as hot (1, Insightful)

masklinn (823351) | more than 8 years ago | (#15600608)

The big difference is that Rails is an actual tool, with a of buzz around it, while AJAX is wankery for marketroïds and is only buzz.

Re:Not as hot (1)

nostriluu (138310) | more than 8 years ago | (#15600682)

Nah, AJAX is a general description of the technique of using "asynchronous javascript and xml" (although it may be synchronous, doesn't have to use javascript, which should properly be called ecmascript, you shouldn't capitalize the 'a' in an acronym, and xml is optional as well, so maybe "discreet content updating" would be a better term but isn't very catchy) and is being widely used so it is in fact an identifible thing and by the amount of attention/adoption "hot."

Re:Not as hot (0)

Anonymous Coward | more than 8 years ago | (#15602313)

what are you talking about
GMail
Google Calendar
and now Picasa Web Albums

They don't use AJAX simply for marketing, they use AJAX to make the web apps responsive enough to finally rival and surpass their corresponding desktop apps.
Oh yeah they don't use RoR at all.

Re:Not as hot (2, Interesting)

SilentBob0727 (974090) | more than 8 years ago | (#15600846)

As an example of the hype machine in action, I recently interviewed for a web developer position. When the subject of my AJAX experience came up, I said that I had extensive experience. He then asked about my Ruby experience, which I said was limited. He then laughed -- LAUGHED -- and said "What are you talking about? AJAX is a *part* of Ruby!" Clearly I had no experience in either technology and was lying "because otherwise I would know this", and the interview went downhill from there.

Re:Not as hot (2, Interesting)

I Like Pudding (323363) | more than 8 years ago | (#15603808)

I would actually consider this a good thing. This guy let on that he didn't know what the hell he was talking about right up front at the interview, on top of demonstrating a lack of professionalism - a great time to walk, assuming you weren't hurting for the money. I wish every company were so forthcoming about their flaws.

Re:Not as hot (2, Interesting)

domukun367 (681095) | more than 8 years ago | (#15603855)

It sounds like you were saved from having to work with morons there SilentBob.

I view a job interview as a chance not just for them to find out about me, but a chance to find out whether they are a group of people worth working for.

RoR programmer ? What are your websites.. (1)

J4nus_slashdotter (953890) | more than 8 years ago | (#15600584)

Ror programmers, could you step out your websites ? What are the main advantages and disadvantages of Ror ? Thank you

Re:RoR programmer ? What are your websites.. (1, Informative)

Anonymous Coward | more than 8 years ago | (#15600696)

Advantages:

- Ruby
- Speed / Efficiency (about 1:3 - 1:5 ratio over other environs)
- Routing (Pretty URLs)
- Test-Driven Development

Disadvantages:

- Internationalization
- Integration with Compound Primary Keys (legacy databases)

RoR is best used as a front-end for a new (or significantly refactored) application. The approach of "convention over configuration" that RoR uses is magnificent, but if your existing application you want to port doesn't do things the "RoR way" (example, ActiveRecord expects a single-column integer primary key 'id'), then it's more difficult to port. (A counter-argument could be stated that multi-column or intelligent keys have no place in a DB -- my stance.)

If you can, for the most part, follow the RoR conventions in your application the speed of development is consideribly faster. Performance is pretty good when you understand how it works (there are separate environments -- development vs production) which significantly effect performance. It supports sophisticated caching as well.

Finally, the things I listed in the disadvantages column are partially-solved by "plugins" which are easily downloadable and available to any app that needs it. The community is very active and new OSS plugins / generators are making their way onto the scene every day.

Re:RoR programmer ? What are your websites.. (1)

jbplou (732414) | more than 8 years ago | (#15603306)

about 1:3 - 1:5 ratio over other environs

How do you prove this?

Re:RoR programmer ? What are your websites.. (0)

Anonymous Coward | more than 8 years ago | (#15603784)

check the screencasts at rubyonrails.org

I find it hard to believe that (3, Insightful)

Mofaluna (949237) | more than 8 years ago | (#15600796)

Now that IBM has released a DB2 adapter for Rails, it's possible to write efficient Web applications on top of your existing DB2 database investment.
While much can be said in favor of RoR, especially the fact that the approach is the best thing since sliced bread for a certain 'niche' market, non-enterprise applications, the above quote is wrong. There is a huge difference between efficiently writing web applications, that which Ror is good at, and writing efficient web applications, that which RoR traded of in favor of efficiently writing web applications.

I imagine... (-1, Flamebait)

Anonymous Coward | more than 8 years ago | (#15600995)


(when all is said and done, you'd probably have to call this a troll. An uneducated one at that...)

I imagine that all three people who use DB2 are quite pleased with this development :)

Seriously, I haven't seen any person or development shop in my area using DB2. I've never heard of it being used at all. What kind of market share does it have?

Uneducated in Ohio

Re:I imagine... (3, Informative)

kpharmer (452893) | more than 8 years ago | (#15601110)

> I imagine that all three people who use DB2 are quite pleased with this development :)
> What kind of market share does it have?

Depends on how you count it. I think by revenue IBM databases account for about 1/3 of the market. This primarily consists of db2 but also includes numbers from informix and ims.

> Seriously, I haven't seen any person or development shop in my area using DB2. I've never heard of it being used at all.

It's used heaviest on the mainframes, but also works very well on windows & unix/linux. After having spent decades developing databases using db2, oracle, informix, sybase, sql server, postgresql, mysql, access, clipper, ims-db, vsam, etc - I've grown to like db2 quite a bit (and Informix the most). DB2 is far faster than mysql or postgresql, and about 1/2 the cost of oracle.

The primary reason it doesn't have a larger marketshare is that IBM isn't very good at marketing, and until about four years ago its unix/windows version was a little clunky.

DB2 works fine for small projects where it is very cost effective, but you typically see it the most on very large projects. It especially shines when your data volumes keep growing - then it gives a ton of different scalability options - all the way up to very robust beowulf-like clustering capabilities in which you can spread your database across hundreds of separate servers. For large projects like this its only real competition is Informix or Teradata.

Re:I imagine... (1, Informative)

Anonymous Coward | more than 8 years ago | (#15603751)

Unfortanly many parts of DB2 is buggy, slow and bloated. That means that you need several years of DB2 experience to work around all the issues. Our national bank had tons of issues with DB2 crashing under load (Websphere AS too), which could only be resolved by using JBoss and Oracle instead. I'm not fond of either Oracle or DB2, so I couldn't really care which they use. Horrible when even the experts IBM send in to assist can't fix the issue and claim it's an OS issue, even when the same problem arise on both Linux and Windows.

Re:I imagine... (0)

Anonymous Coward | more than 8 years ago | (#15604006)

Rails has had Oracle support for quite a while - I was using it commercially last September, and it's gotten quite a bit better since (e.g. there's now support for oracle migrations). Much more interesting to most everyone than DB2...if only ActiveRecord would support bind variables.

RoR Question from JAVA newbie... (1)

Zaphod2016 (971897) | more than 8 years ago | (#15601392)

I need to code a simple app to interface with a forex trading system. Their API has been designed for JAVA/.NET and I am unfamiliar with both. I figure this would be a good excuse to learn RoR, but I am not sure how flexibile it is.

As far as function goes, this is all math based. No fancy-pants GUI elements required.

Am I better off designing a full-fledged JAVA app, or can RoR do this sort of thing and save me time?

Re:RoR Question from JAVA newbie... (3, Interesting)

mr_rattles (303158) | more than 8 years ago | (#15601513)

The API is designed for Java/.Net and you think it's a good excuse to learn Ruby? Wouldn't it be a better excuse to learn Java or .Net? Also, you said it yourself that it's a simple app so I don't think you need to bend over backwards "designing" a "full-fledged" Java app either. Just write the simple app using whichever API makes most sense for whatever you're interfacing with. On one side you say you have a Java/.Net API but what do you need to interface that with, another Java/.Net app? If that's the case your decision should be obvious.

Unicode? (2, Interesting)

jopet (538074) | more than 8 years ago | (#15601530)

Does it already properly support Unicode? Not everyone uses just English texts and the best and most common way to use characters of other languages is UTF-8.

Re:Unicode? (2, Interesting)

RegularFry (137639) | more than 8 years ago | (#15604268)

Which? DB2 or Rails? I'm assuming that DB2's got multilingual wrapped up pretty well. As far as Rails goes, there are a couple of handshakes to perform (set headers, set $KCODE, prod the DB in the right way if necessary), but once they're done, everything's just a bunch of bytes. Ruby's Unicode support isn't great (there's an active discussion about the best way to fix it up on ruby-lang right now), but 95 times out of 100 it doesn't cause a problem.

By the way, one of the sticking points about the Unicode issue with Ruby is that the opinion that "the best and most common way to use characters of other languages is UTF-8" is not universally held. It might be the most common, but many learned and respected individuals think it's not the best.

Why Ruby? Why Rails? (2, Insightful)

mangu (126918) | more than 8 years ago | (#15602289)

In all these articles about Ruby and RoR people always mention how great Ruby is and how great RoR is. After trying both, I must assume that I must be pretty stupid, because I fail to notice all that greatness. Let's see some case studies:


1) I work for an aerospace company, and I recently needed some way to get NORAD TLEs [norad.mil] from Celestrak [celestrak.com] . Never mind what TLEs are, I went to CPAN [slashdot.org] and found what I needed in a few minutes. How does Ruby compare to Perl in available libraries and utilities? If I have to get the TLE specifications [celestrak.com] and code my own functions in Ruby, sorry, but I'd rather cope with Perl's shortcomings.


2) Occasionally I have to do some web applications to access corporate databases in Oracle, Ingres, and Postgres. The data contains international characters, which may be in UTF or ISO-8859, I need support for both and an easy way to shift between them, often in the same application. For this kind of work I use PHP together with the eGroupWare [egroupware.org] suite. I have no need for very complicated code here, these are mostly simple web forms and tables, which PHP+eGroupWare handle quite well. Using the built-in etemplates utility I can code applications very quickly.


3) For really complex work I use C, or C++ with Qt if there is need for a GUI. I often create prototypes for my C code, using either Perl, Python, or Matlab to develop some of the algorithms. After I have the algorithm, I reimplement it in C using the many libraries available, such as GSL, Lapack, or FFTW, for instance.


With all that, I have yet to find a reasonable niche where Ruby would fit, with or without Rails. I can see how someone who wants to learn only one language would think Ruby is the best, but I cannot imagine being more productive in Ruby than in the languages I use for each of the jobs I described.


And the attitude one finds in Slashdot "hey stupid, Ruby is 'teh' language, you must be a troll" doesn't help either. For any other language I can find websites that give detailed descriptions of its good and bad points, but I have seen very little on comparing Ruby with other languages. From the little I have seen, it gives the impression of being somewhat remotely related to Lisp, like Python. How about creating a site that shows some examples comparing code written in Ruby with the same program in Python, Perl, C, PHP, Java, etc?

Re:Why Ruby? Why Rails? (0)

Anonymous Coward | more than 8 years ago | (#15604120)

yes you do seem like a stupid person, and working for an aerospace company doesnt make you smart.
1. why would you rather deal with perl's shortcomings rather than quickly code it in ruby? seems like you just dont want to spend tiem in learning ruby. hence you are not qualified to complain about ruby.
2. again, yes i am sure PHP+eGroupware can do he job, and so can 100s of other tool combos. but i dont see why thats a reason not ot use ruby?
3. again i dont see your point. ruby is not designed to run cpu intensive jobs. its designed for developers to do development intensive jobs.

i like to see ruby as macos of languages. its beautiful and elegantly designed. if you look at individual components, then yes macos is no different form windows. but its how all these components talk to each other.
code written in ruby is easy to read, its fun to play with. this is after years of tinkering with so many other languages.
its the perfect balance between lisp, smalltalk and perl

Ruby is not THE language. its THE language, when the goal is to make somethin quickly, not when the goal is to makesomething which RUNS quickly.

DB2 Disappointing (0)

Anonymous Coward | more than 8 years ago | (#15603106)

Searching for a better database engine, I tried DB2 Personal Edition. Bletch. It's big and fat, but worst of all it's got a very badly designed user interface. Twenty odd gidgets. Which one do you run to create a table? I did eventually create a table, but it took ages and heaven help me if I can remember how I did it. Plus, it had many background processes doing I have no idea what, and the GUI was slow as hell (Java) - Write once, run nowhere :-). The DB2 ppl seem to have a crap understanding of writing Windoze apps too, because it threw away all my customizations (keys, menus) in Visual Studio when they "integrated it." Yeah - this is a problem with VS - but by convention an installing app asking you whether or not you want to install it in VS too (and thus kill your customizations). DB2 sat on my PC for ages before I eventually deleted it. A pain because you need the original install disk, and when it runs it takes forever. Despite IBM's name, DB2 is a dog.

It is a bummer. Where do you turn? MySQL - popular but buggy. Firefox - less buggy but not so popular. Oracle - an extremely popular dinosaur that doesn't even bundle a GUI.

Wherever you turn, I found DB2 a real letdown. Someone make the IBM ppl read joelonsoftware.com. He knows far more than that soon-to-be-extinct organization ever will.

Wow! (-1, Troll)

Anonymous Coward | more than 8 years ago | (#15604106)

Wow! Ruby on Crap.
Load More Comments
Slashdot Login

Need an Account?

Forgot your password?