MS Acess-> Ruby? (newbie)

I have created several desktop database applications with MS Access. I
want to freely distribute them to my friends but don’t want them to have
to purchase Access. My questions are:

  1. How difficult is it to create small database intensive applications
    with Ruby? (Much SQL for combos and listboxes).

  2. My applications use extensive reporting. Is this hard with Ruby?

  3. Is the code portable to other OS like Mac?

  4. What would my users need to run my programs?

  5. Is Ruby the best choice for this type of application? Speed of
    execution is not as important as flexibility and usability.

Thanks.

Harlan Pankau

“Harlan Pankau” hpankaux@earthlink.net wrote in message
news:Xns92F965DFB28DDhpankauxearthlinknet@207.217.77.26

I have created several desktop database applications with MS Access. I
want to freely distribute them to my friends but don’t want them to have
to purchase Access. My questions are:

  1. How difficult is it to create small database intensive applications
    with Ruby? (Much SQL for combos and listboxes).

There is Ruby DBI as a generic DB interface - requires some DB installed -
but is supposedly easy to work with.
I’m not an expert on DBI though.

You can continue to use MS Access databases and create them in Ruby if you
like.
It is legal to redistribute the Access runtime dll’s (not the GUI) and you
can use Ruby via WIN32OLE to access COM objects. I believe there is also a
DBI binding for Access which is probably easier but more limited than doing
COM directly. You could look at the source for the DBI binding.

If you search a month back or so Shannon Fang worked a lot with this.
I’ve been working directly with Access databases via DAO COM interface (C++,
not Ruby though) and it is fairly easy to work with.

  1. My applications use extensive reporting. Is this hard with Ruby?

As easy in Ruby as in any language, but it really depends on what you want -
GUI, log file, remote logging?

  1. Is the code portable to other OS like Mac?

Generally speaking Ruby code is very portably, but there are some corners
here and there - there some problems with Fox GUI toolkit AFAIK - but they
are being worked on. The major problem is in finding a cross platform
database.

  1. What would my users need to run my programs?

Depending on the database - they’d need the database runtime independently
of Ruby, then the Ruby installation - which is a one click install on
Windows and sometimes installed on Linux with additional installs. Ruby is
in Mac OS X v.?. You probably also have to download some database specific
driver for Ruby at RAA.

  1. Is Ruby the best choice for this type of application? Speed of
    execution is not as important as flexibility and usability.

It is very suitable for the purpose - but in the end it depends on whether
you can find a suitable database that actually has a mature Ruby interface -
generally Perl has more mature bindings to most things, but if Ruby supports
something it is a much more pleasent experience to do it in Ruby.

If it doesn’t bother you to run on Windows only, I’d suggest continuing to
use MS Access - the easiest way to install the Access JET database engine is
to install Microsoft data access components (MDAC) avaialble at various SDK
CD’s and online at Microsofts site. Go with the raw DAO COM objects, not ADO
as they are just and adaption layer to a newer interface which cannot do
everything (might not be entirely true for latest Access version - I haven’t
investigated).

On the other hand, if you are not handing out a CD, it may be a problem with
all the software end users must install. Text file formats can be a good
solution - XML, YAML or plain text can handly fairly large amounts of data
these days. Ruby has good support for this.

Mikkel

I have created several desktop database applications with MS Access. I
want to freely distribute them to my friends but don’t want them to have
to purchase Access. My questions are:

Good call! :slight_smile:

  1. How difficult is it to create small database intensive applications
    with Ruby? (Much SQL for combos and listboxes).

Not at all difficult, imho. I find using a scripting language and a free
RDBMS like MySQL or postgreSQL much more satisfying and productive than
trying to script the whole deal in Access.

However, it sounds as though your application may be a bit intense in the
GUI arena. Because it is likely that you and your friends will be on a
variety of platforms, I would suggest the Tk GUI library, which runs on
most platforms (although I’m not sure what it’s state is on Mac OS X).
There aren’t a lot of solid Ruby docs for Tk, but there are some good
Perl/Tk and Tcl/Tk references out there that will at least help you get
started.

  1. My applications use extensive reporting. Is this hard with Ruby?

How fancy is the reporting? How much intelligence do the reports contain in
terms of layout? Are you looking for extremely pretty-printing or just
screen-quality output?

Again, Tk is probably most helpful in this regard as its Text widget is
very versatile. You can tag text (i.e. make it bold, or a different font,
or other stylings). You can insert an image into the flow of text. You can
also use Tk’s Canvas widget to lay out other widgets more exactly. I hear
there’s even functionality to convert a Canvas into a PostScript file (but
I’ve never used it).

You could also emit valid HTML, which could be viewed and/or printed from
any web browser.

  1. Is the code portable to other OS like Mac?

If Ruby and Tk have been ported, then they would be. I try not to think
about Macs for some time now, so I have no idea what the state of Ruby and
its libraries on Mac are.

  1. What would my users need to run my programs?

To install Ruby. On Windows, the Pragmatic Programmers’ installer includes
enough to run Tk.

  1. Is Ruby the best choice for this type of application? Speed of
    execution is not as important as flexibility and usability.

Ruby is the most flexible and usable scripting language I’ve ever used. I
use Microsoft Access everyday and if I could convince my bosses to let me
have a system running Ruby and MySQL I would ditch Access in a heartbeat.

But here’s a better question for you: why do you want to go through the
trouble of packaging and distributing an application that sounds like a
good fit for the web? The ISP I use (www.rootr.net) supports Ruby and
MySQL hosting for approx. $10/month.

With something like that you’d have a much easier time getting an
appliation “to market” I should think. HTML, forms, and CGI are easier to
get into than a full-fledged GUI. And your friends probably all have
browsers installed already, so they’d need to do nothing except type in a
URL and a password to access your application. Upgrades are easier, too.
You just change the application on the server, and instantly everyone’s
running the newest version.

Just some thoughts.

-michael

···

On Saturday 04 January 2003 12:16, Harlan Pankau wrote:

Thanks for the insight. Most of my users are NOT very computer literate.
I must provide a very intuitive GUI for them, for them not get into
trouble. I am not yet familiar with COM objects as I have only used
whatever Access provides.

-Harlan

“MikkelFJ” mikkelfj-anti-spam@bigfoot.com wrote in
news:3e176658$0$47424$edfadb0f@dtext01.news.tele.dk:

···

“Harlan Pankau” hpankaux@earthlink.net wrote in message
news:Xns92F965DFB28DDhpankauxearthlinknet@207.217.77.26

I have created several desktop database applications with MS Access.
I want to freely distribute them to my friends but don’t want them to
have to purchase Access. My questions are:

  1. How difficult is it to create small database intensive
    applications with Ruby? (Much SQL for combos and listboxes).

There is Ruby DBI as a generic DB interface - requires some DB
installed - but is supposedly easy to work with.
I’m not an expert on DBI though.

You can continue to use MS Access databases and create them in Ruby if
you like.
It is legal to redistribute the Access runtime dll’s (not the GUI) and
you can use Ruby via WIN32OLE to access COM objects. I believe there
is also a DBI binding for Access which is probably easier but more
limited than doing COM directly. You could look at the source for the
DBI binding.

If you search a month back or so Shannon Fang worked a lot with this.
I’ve been working directly with Access databases via DAO COM interface
(C++, not Ruby though) and it is fairly easy to work with.

  1. My applications use extensive reporting. Is this hard with Ruby?

As easy in Ruby as in any language, but it really depends on what you
want - GUI, log file, remote logging?

  1. Is the code portable to other OS like Mac?

Generally speaking Ruby code is very portably, but there are some
corners here and there - there some problems with Fox GUI toolkit
AFAIK - but they are being worked on. The major problem is in finding
a cross platform database.

  1. What would my users need to run my programs?

Depending on the database - they’d need the database runtime
independently of Ruby, then the Ruby installation - which is a one
click install on Windows and sometimes installed on Linux with
additional installs. Ruby is in Mac OS X v.?. You probably also have
to download some database specific driver for Ruby at RAA.

  1. Is Ruby the best choice for this type of application? Speed of
    execution is not as important as flexibility and usability.

It is very suitable for the purpose - but in the end it depends on
whether you can find a suitable database that actually has a mature
Ruby interface - generally Perl has more mature bindings to most
things, but if Ruby supports something it is a much more pleasent
experience to do it in Ruby.

If it doesn’t bother you to run on Windows only, I’d suggest
continuing to use MS Access - the easiest way to install the Access
JET database engine is to install Microsoft data access components
(MDAC) avaialble at various SDK CD’s and online at Microsofts site. Go
with the raw DAO COM objects, not ADO as they are just and adaption
layer to a newer interface which cannot do everything (might not be
entirely true for latest Access version - I haven’t investigated).

On the other hand, if you are not handing out a CD, it may be a
problem with all the software end users must install. Text file
formats can be a good solution - XML, YAML or plain text can handly
fairly large amounts of data these days. Ruby has good support for
this.

Mikkel

“Harlan Pankau” hpankaux@earthlink.net wrote in message
news:Xns92F9A34088C27hpankauxearthlinknet@207.217.77.21

Thanks for the insight. Most of my users are NOT very computer literate.
I must provide a very intuitive GUI for them, for them not get into
trouble. I am not yet familiar with COM objects as I have only used
whatever Access provides.

You can use the FOX GUI (FxRuby) for user interface - it’s in the one click
windows installer.
Using COM can be difficult, but the Access COM objects are easy to work with
and the syntax in Ruby should be very close to Access Basic. You have been
using COM objects all along without knowing it. But if possible, try start
with the DBI interface - it will probably do what you need and is less
hassle figuring out what you can do and how to do it.

I haven’t read the book “Ruby Developers Guide”, but I think there is good
DB material in it.

Mikkel