Ruby on Rails for DB2 Developers 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.'"
Ruby on rails? (Score:3, Funny)
Re:Ruby on rails? (Score:1)
Ruby could be packaged better (Score:5, Insightful)
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 (Score:2)
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 (Score:1)
Re:Ruby could be packaged better (Score:1)
Re:Ruby could be packaged better (Score:3, Informative)
Re:Ruby could be packaged better (Score:1)
Re:Ruby could be packaged better (Score:3, Informative)
Uh? I find pretty much the opposite statement on the front page of the FeedTools project:
Works like a charm too:
Re:Ruby could be packaged better (Score:1)
but no luck so far...I'll go
Re:Ruby could be packaged better (Score:2)
Re:Ruby could be packaged better (Score:5, Informative)
Re:Ruby could be packaged better (Score:5, Informative)
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 (Score:3, Insightful)
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 o
Re:Ruby could be packaged better (Score:3, Insightful)
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 (Score:1)
Just a short anecdote from my college days. I took a grad-level course in object oriented programming languages that covered both C++ and Smalltalk where all of the machine projects included a GUI and were implemented in b
Re:Ruby could be packaged better (Score:2)
I think there is nothing to compare with the experience of being able to dynamically debug and inspect a running OOP
Re:Ruby could be packaged better (Score:3, Informative)
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
Re:Ruby could be packaged better (Score:5, Informative)
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 (Score:2)
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 (Score:2, Interesting)
Re:Ruby could be packaged better (Score:1)
Re:Ruby could be packaged better (Score:1)
Re:Ruby could be packaged better (Score:2)
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 tr
Re:Ruby could be packaged better (Score:2)
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 (Score:2)
More like the "Quit your whining and start coding if you are really that interested in it" crowd. He's complaining about not having a "single installer." And he goes on to wish Ruby was more like MS Access, of all things. MS Access!? What kind of point of comparison is that?
-matthew
Re:Ruby could be packaged better (Score:1)
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 (Score:2)
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 (Score:2)
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
Re:Ruby could be packaged better (Score:2)
If you have even a small amount of experience, it's faster than using a mouse. Sit an experienced vim / emacs hacker next to someone using Visual Studio, Code Warrior, Smalltalk whatever, Ecclipse, etc. and I'll give you ten to one odds I can predict who is going to be working more efficiently and spending lest time copying pasting and navingating four tier deep menus.
Re:Ruby could be packaged better (Score:2)
Yeah, the guy with the Vi plugin for Eclipse or VS;) But seriously, if you're using Vim or Emacs for a language like Java then, no, you're n
There is a package already (Score:1)
DB2... The only change? (Score:5, Insightful)
-yawn-
Re:DB2... The only change? (Score:5, Insightful)
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? (Score:2)
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? (Score:1)
Re:DB2... The only change? (Score:2)
I just wish more companies would follow there lead and provide something of value.
Re:DB2... The only change? (Score:1)
Re:DB2... The only change? (Score:1)
Why in the world is this moderated as trolling? Taking the parent post's advice, here's a bit more [oreillynet.com] on the author.
Re:DB2... The only change? (Score:2)
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 (Score:1)
Re:DB2... The only change? (Score:2)
> 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? (Score:5, Insightful)
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? (Score:3, Interesting)
> 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
-
Re:DB2... The only change? (Score:2)
- 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 irrelevan
Re:DB2... The only change? (Score:1)
> 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 pe
Re:DB2... The only change? (Score:2)
No, it is misleading to generalise. You have something that supports hundreds of users and runs complex queries. S
Really good news. (Score:5, Interesting)
Now such claims will sound less credible so more dubious people might give it a try.
Re:Really good news. (Score:5, Insightful)
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. (Score:2)
Re:Really good news. (Score:2)
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. (Score:2)
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. (Score:3, Informative)
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. (Score:1)
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. (Score:2)
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. (Score:2)
Re:Really good news. (Score:2)
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 langua
Re:Really good news. (Score:2)
Can you point to a good site explaining how to setup en_US.UTF-8? Preferably for FreeBSD if possible. I have a lot of music folders and files that are named "????" now!!!
Re:Really good news. (Score:2)
Re:Really good news. (Score:1)
> 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, da
Ruby on Rails for DB2 Developers (Score:1)
Re: Ruby on Rails for DB2 Developers (Score:1)
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? (Score:2)
Re:RoR vs Django? (Score:1)
Re:RoR vs Django? (Score:2)
Re:RoR vs Django? (Score:2, Informative)
Re:RoR vs Django? (Score:3, Interesting)
Re:RoR vs Django? (Score:3, Interesting)
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 doc
Re:RoR vs Django? (Score:3, Interesting)
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.
Re:RoR vs Django? (Score:1)
Rails was open-sourced first, but Django has been in existence and working well longer.
Re:RoR vs Django? (Score:5, Informative)
I've tried a bit of both, and from what I've seen:
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? (Score:2)
And I agree, the admin interface is a lifesaver
Re:RoR vs Django? (Score:2)
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? (Score:2)
Re: (Score:1)
Re:RoR vs Django? (Score:1)
Re:RoR vs Django? (Score:2, Insightful)
migrations (Score:1, Redundant)
RoR programmer ? What are your websites.. (Score:1)
Re:RoR programmer ? What are your websites.. (Score:1, Informative)
- 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-co
Re:RoR programmer ? What are your websites.. (Score:2)
How do you prove this?
I find it hard to believe that (Score:3, Insightful)
RoR Question from JAVA newbie... (Score:2)
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... (Score:3, Interesting)
Unicode? (Score:3, Interesting)
Re:Unicode? (Score:2, Interesting)
By the way, one of the sticking points about the Unico
Re:Unicode? (Score:3, Interesting)
In the meantime I did some research myself and found the sobering fact that Ruby/Rails essentially does NOT support Unicode in any usable way.
A string of Unicode characters is NOT just a bunch of bytes: take the simple operation of finding the length of a word or reversing it: both string functions return nonsense in Ruby, if there is any character encoded in more than one byte in the string.
That Ruby doe
Re:Unicode? (Score:1)
That depends on what you mean by 'usable'...
A string of Unicode characters is NOT just a bunch of bytes: take the simple operation of finding the length of a word or reversing it: both string functions return nonsense in Ruby, if there is any character encoded in more than one byte in the string.
My point was that for the vast majority of cases, you don't need to care
Re:Unicode? (Score:2)
Or, to put it another way, no, it still doesn't.
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.
Indeed. For example, I prefer UTF-16 for most purposes, and I see that the MS and Java worlds agree with me; UTF-8 is primarily for Ugly Old Unix compatibility.
Unfortunately, Ruby's issue is not so much wi
Re:Unicode? (Score:1)
To a certain extent, I'm sure that's true. However, there's also the opinion I've heard voiced that restricting Ruby's String class to a single representation internally completely ignores the fact that there are other encodings out there. Java is *not* thought to have got string encoding right by several Ruyists, but I don't know how much of that impression
Why Ruby? Why Rails? (Score:3, Insightful)
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? (Score:1)
2) There are two separate issues here. Character set conversion is happily handled by the Iconv library, which is part of Ruby's stdlib. Without being intimately familiar with eGroupWare, I'm not entirely sure what functionality it provides. On the other hand, I can s
Re:Not as hot (Score:2, Insightful)
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 (Score:2)
Re:Not as hot (Score:2, Interesting)
Re:Not as hot (Score:2, Interesting)
Re:Not as hot (Score:2, Interesting)
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.
Re:I imagine... (Score:4, Informative)
> 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... (Score:1, Informative)
Re:I imagine... (Score:1)
Not the core database. Like anything else, the fringe functionality that fewer people use or that is newer has tends to have more problems. Stuff like table inheritance, xml, replication, cube views, etc, client tools, etc. But the engine works very well. That ultimately is what I focus 99% of my time on.
And back to how it was clunky a few years ago: anyone on the 7.* versions really needs to upgrade. v8 is a very good product, and now v9 is