Ruby as a Database Development language?

I have a question that requires a bit of background that I hope some
of you can help me with (your opinions welcome).

I have been a windows database application developer for almost a
decade. I am young (22) and still wanting to learn more languages,
database systems, etc. I have fiddled with Linux for quite a while
now, and have played with Ruby and find it to be a very nice language.
I run a software consulting shop that specializes in database
applications and we have a few vertical market apps.

I’m wondering if all of you think that Ruby is mature enough to write
REAL database applications that will be closed (vertical market) or
open source (admin tools) that run on Linux and have nice GUIs. I’m
thinking of mySQL or PostgreSQL for the backend, but are there any
bindings for oracle, db2 or pervasive available/in the works?

I would also like to be able to do Windows versions of these apps.
What GUIs are mature enough? Do any (Linux or windows) do
databinding?

What about IDEs, are they there yet, if not, how soon?

What about compiliing to an executeable? Is this just experimental,
or is it something that works and can be used?

Can I use Ruby (and SHOULD I) for making web aware database
applications on Linux? (I already have all of this in Windows)

IOW, is Ruby +some GUI +some DB +some compiler +some IDE, a viable
option at this point for database applications?

Should I being using Ruby as a scripting language for little stuff or
as a “glue” tool, or should I write application in it?

Thanx for any help, and if this questions is somewhere else answered,
feel free to flame me with the URL :slight_smile:

OLIVER

are there any
bindings for oracle, db2 or pervasive available/in the works?

I can answer about Oracle: you have a choice of two bindings. The package
“oracle” is a binding to the older OCI7 library and “ruby-oci8” uses, well,
OCI8 :slight_smile: Both available from http://raa.ruby-lang.org/

I have used both successfully with Oracle 9i/Solaris. OCI8 has the advantage
of mapping to more native datatypes, e.g. a Number column gives a Fixnum,
whilst ‘oracle’ seems to map everything to String. I’ve only used them via
DBI, rather than their native bindings, since that lets me chop and change
between drivers and databases with no code changes.

I am currently in the process of rewriting an existing C/OCI8 in-house
database to Ruby, basically because the C version had become unmaintainable.
The Ruby version is a fraction of the size, does more things, and is a joy
to program in - even for me who hates databases as a rule :slight_smile:

Should I being using Ruby as a scripting language for little stuff or
as a “glue” tool, or should I write application in it?

I’d certainly say you can write applications in it. Unlike (say) Perl, where
applications have a tendency to sprawl and become unmaintainable, Ruby lets
you write at the appropriate abstraction level for your code. If your
database contains customers, or bills, or services, you can neatly represent
them as objects with methods. You can do that in Perl too, but you have to
expend a lot of effort in doing so.

I also think it’s worth buying into the “unit testing” concept, which Ruby
supports in the “testunit” library. Having an automated test script which
confirms that you haven’t broken anything lets you make rapid changes and
rewrites to code (refactoring) without having to worry about whether you’ve
broken something.

Regards,

Brian.

···

On Mon, Apr 07, 2003 at 05:26:21AM +0900, Oliver Nelson wrote:

obviously, imho:

I have a question that requires a bit of background that I hope some
of you can help me with (your opinions welcome).

I have been a windows database application developer for almost a
decade. I am young (22) and still wanting to learn more languages,
database systems, etc. I have fiddled with Linux for quite a while
now, and have played with Ruby and find it to be a very nice language.
I run a software consulting shop that specializes in database
applications and we have a few vertical market apps.

you started writing db app ad 12?? ;)

I’m wondering if all of you think that Ruby is mature enough to write
REAL database applications that will be closed (vertical market) or
open source (admin tools) that run on Linux and have nice GUIs.

I think so.
Talking about gui you can chose Gtk2/Fox. But if you plan to develope
win-only apps you can easily start with vruby

I’m
thinking of mySQL or PostgreSQL for the backend, but are there any
bindings for oracle, db2 or pervasive available/in the works?

ruby-dbi.sf.net
db2, oracle, interbase etc…

I would also like to be able to do Windows versions of these apps.
What GUIs are mature enough? Do any (Linux or windows) do
databinding?

As I said earlier, vruby uses native win gui, fox/gtk look less native
on windows.
But , imho, in these times, you can easily see how the GUI consistence
in windows is already lost.

What about IDEs, are they there yet, if not, how soon?

http://raa.ruby-lang.org/cat.rhtml?category_major=Application;category_minor=IDE

What about compiliing to an executeable? Is this just experimental,
or is it something that works and can be used?

you can’t compile to native binaries. Yet, you can have a single
packaged program looking for exerb and rb2exe

Can I use Ruby (and SHOULD I) for making web aware database
applications on Linux? (I already have all of this in Windows)

missing your point, sorry …
Anyway you have working modules to use SOAP and the like if that’s
what you want…

IOW, is Ruby +some GUI +some DB +some compiler +some IDE, a viable
option at this point for database applications?

definitely :slight_smile:

···

il 6 Apr 2003 13:22:14 -0700, flxkid@techemail.com (Oliver Nelson) ha scritto::

Thanx all for the replies so far. More opinions definitely welcome…

A couple more questions. Does anyone know of any applications that
have a nice simple installation that were written in Ruby? IOW, an
app that a USER rather than a developer could install?

Also, I guess my question about web based stuff was a little
convoluted. I won’t even try and explain what I mean, because frankly
I’m not quite sure what I meant yet :wink:

I looked at the IDE link…seems to be a bit early for Ruby IDEs…no
GUI tools from the link I saw…I remember reading somewhere about
some commercial IDE that was supposed to support Ruby, but I couldn’t
even get a beta of it IIRC.

Another thing just popped into my mind. Are any companies doing
commercial support for Ruby? Are there any companies that are
investing in extending and strengthening this language?

One more question, not really for Ruby per se, but…:

On most Windows development languages, if I need a tool that does
something that is beyond the scope of what I want to develop for an
application I purchase a COM control. Maybe its to play some special
multimedia files, or advanced document imaging, or custom date/time
controls, or a instant messaging interface, or whatever! Is there
anything out there for Ruby/Perl/Python/etc. that gives this for
Linux? Do people sell “controls” for Linux based languages that do
these types of things? I know there may be open source alternatives
for some things (that might even work with Ruby), but imaging for
example is an area where I think there probably isn’t much (barcode
detection and reading from an image, forms recognition, etc.).

BTW, I’m not asking you all to give me everything here, I’m just
trying to get a feel for non-windows based and open source
development. I came here because Ruby originated on Linux and it is
the only language out of all the ones I’ve been looking at that really
made sense to me.

Thanx,

OLIVER
P.S. To Gabriele…first app (a collaborative PIM for a small
insurance company) deployed when I was 13…been doing database work
(corporate for 5 or 6 years and my own company for 3 years now) ever
since.

I would also like to be able to do Windows versions of these apps.
What GUIs are mature enough? Do any (Linux or windows) do
databinding?

On GUI’s: IMHO, FXRuby is the most mature (especially for Windows since
it gives a windows look&feel) but it has a few quirks and
Ruby-gnome/gtk will probably be a viable contender once it matures some
more.

What about IDEs, are they there yet, if not, how soon?

FreeRIDE has had a pre-release but I haven’t used it much so far.
Long-term it will be a killer.

What about compiliing to an executeable? Is this just experimental,
or is it something that works and can be used?

Exerb works perfectly for me. Be sure to build your Ruby and extensions
with mingw or VStudio first though so there are no external dependencies.
Also note that Exerb is only windows so far.

Should I being using Ruby as a scripting language for little stuff or
as a “glue” tool, or should I write application in it?

I’ve been writing a couple of larger apps in it. The combination of Ruby +
FXRuby + exerb + upx give stand-alone executables in the 1.5-2MB size. Its
large but who cares with todays HD’s and memories…

On COM etc

There was some work on using COM’s from Ruby but I can’t find the link
right now. Maybe someone else can. I guess you can do something via the
win32api if everything else fails.

Regards,

Robert Feldt

···

On Mon, 7 Apr 2003, Oliver Nelson wrote:

Thanx all for the advice so far. I actually used Ruby for something
real for the first time yesterday…I think I’ll get used to this
REAL quick…

OLIVER

In article 6cc8282d.0304062145.3fcc675d@posting.google.com,

Another thing just popped into my mind. Are any companies doing
commercial support for Ruby? Are there any companies that are
investing in extending and strengthening this language?

No commercial companies that I know of. There’s the semi-annual,
reocurring thread about ‘Active state support for Ruby?’ but so far
no visible movement from ActiveState.

One more question, not really for Ruby per se, but…:

On most Windows development languages, if I need a tool that does
something that is beyond the scope of what I want to develop for an
application I purchase a COM control. Maybe its to play some special
multimedia files, or advanced document imaging, or custom date/time
controls, or a instant messaging interface, or whatever! Is there
anything out there for Ruby/Perl/Python/etc. that gives this for
Linux? Do people sell “controls” for Linux based languages that do
these types of things? I know there may be open source alternatives
for some things (that might even work with Ruby), but imaging for
example is an area where I think there probably isn’t much (barcode
detection and reading from an image, forms recognition, etc.).

Linux culture has tended to be a lot different in that regard. I’m not
too familiar with COM controls not having been on the Windows side of
things much, but I kind’a know what you’re talking about. The Linux
culture is much more of a potlatch (or sharing) culture. For better or
worse, that is probably changing as more corporations/governments adoopt
Linux. For now I’d say that you should google for these sorts of things
for Linux, you might find them freely available including the source code.

Phil

···

Oliver Nelson flxkid@techemail.com wrote: