Windows desktop app w/ simple db; how?

Imagine that you had a very simple web based application. It queries some
data from a database and displays it in a table. Several of the data items
are hyperlinks that pull up some other data from a database table and
displays that in a table. Super simple stuff.

However, here’s my wrinkle. I need to be able to produce an equivalent
application that is not web based, but rather is a standalone application
that runs under Windows.

I know that I can use exerb to package the application for installation on
other windows boxes. I assume that there should be some relatively easy to
use widget for Fox or GTK or something that will make emulating the web
applications tables with hyperlinks simple to program, though I certainly
could use suggestions. I haven’t done any GUI programming with Ruby yet.

However, does anyone have any suggestions about the database? There is too
much data to use an in-memory store like Madeline, but I don’t want the
users to have to explicitly install any sort of database engine, either.

Thanks much,

Kirk Haines

well, you could use sqlite or one of the non sql databse (dbm or
pstore). But are you sure that madeleine is not a choice?

···

il Wed, 19 May 2004 05:59:13 +0900, “Kirk Haines” khaines@enigo.com ha scritto::

However, does anyone have any suggestions about the database? There is too
much data to use an in-memory store like Madeline, but I don’t want the
users to have to explicitly install any sort of database engine, either.

Here a nice Listview implementation for Fox:

  http://www.netpromi.com/listview.html

I'm sure, Hyperlinks shouldn't be that hard to implement (underline the
text and check for mouse clicks).

Otherwise, maybe Fltk is an option (http://ruby-fltk.sourceforge.net/\).

Or if platform independence is no issue for you, there's VRuby
(404 Page Not Found. - GMOインターネット). VRuby uses
the native Windows API.

Not to mention Apollo, which combines Ruby and Delphi
(http://www.moriq.com/apollo/index-en.html\).

Regards,

  Michael

···

On Wed, May 19, 2004 at 05:59:13AM +0900, Kirk Haines wrote:

Imagine that you had a very simple web based application. It queries some
data from a database and displays it in a table. Several of the data items
are hyperlinks that pull up some other data from a database table and
displays that in a table. Super simple stuff.

Imagine that you had a very simple web based application. It queries some
data from a database and displays it in a table. Several of the data items
are hyperlinks that pull up some other data from a database table and
displays that in a table. Super simple stuff.

However, here’s my wrinkle. I need to be able to produce an equivalent
application that is not web based, but rather is a standalone application
that runs under Windows.

I know that I can use exerb to package the application for installation on
other windows boxes. I assume that there should be some relatively easy to
use widget for Fox or GTK or something that will make emulating the web
applications tables with hyperlinks simple to program, though I certainly
could use suggestions. I haven’t done any GUI programming with Ruby yet.

However, does anyone have any suggestions about the database? There is too
much data to use an in-memory store like Madeline, but I don’t want the
users to have to explicitly install any sort of database engine, either.

i’m using PStore to store up to 50,000 job entries for a distrbuted job
processing system. it should work and ships with ruby - even 1.6.8.

···

On Wed, 19 May 2004, Kirk Haines wrote:

Thanks much,

Kirk Haines

EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
PHONE :: 303.497.6469
ADDRESS :: E/GC2 325 Broadway, Boulder, CO 80305-3328
URL :: Solar-Terrestrial Physics Data | NCEI
“640K ought to be enough for anybody.” - Bill Gates, 1981
===============================================================================

However, does anyone have any suggestions about the database? There is too
much data to use an in-memory store like Madeline, but I don’t want the
users to have to explicitly install any sort of database engine, either.

I can think of nothing better than sqlite. It is amazingly fast,
supports all the SQL you need (including subselects), is very easy to
extend, and best of all, is completely embedded into the client–it
doesn’t use a “server” at all.

Carl Youngblood

“Kirk Haines” khaines@enigo.com wrote in message

I know that I can use exerb to package the application for installation on
other windows boxes. I assume that there should be some relatively easy
to
use widget for Fox or GTK or something that will make emulating the web
applications tables with hyperlinks simple to program, though I certainly
could use suggestions. I haven’t done any GUI programming with Ruby yet.

I cannot answer your database question, but I can tell you from experience,
that
wxRuby is also a very nice option on Windows. I have been using it lately
and
like it very much. Documentation is sparse but I was able to get most of it
from the wxWidgets.org on which wxRuby is based.

Carl Youngblood wrote:

However, does anyone have any suggestions about the database? There
is too much data to use an in-memory store like Madeline, but I don’t
want the users to have to explicitly install any sort of database
engine, either.

I can think of nothing better than sqlite. It is amazingly fast,
supports all the SQL you need (including subselects), is very easy to
extend, and best of all, is completely embedded into the client–it
doesn’t use a “server” at all.

Someone was suggesting that to me the other day.

What if I don’t really need SQL – should I still use it? Is it as fast
as, say, DBM?

Hal

I adore SQLite. A couple+ years ago I wrote a Perl binding for it (before
there was a good one available) and even used it’s virtual machine a bit to
write some new functions. It’s a sweet piece of software. I have just
never used it under Windows. I wasn’t aware of whether there were any
gotchas to it on Windows or not.

If all you need is simple key/value storage and you don’t need or can’t
benefit from the ability to query your data using SQL, you may as well use
some flavor of dbm. However, if you have more complex requirements, sqlite
is a wonderful thing.

Once upon a time I wrote a set of tools to take large quantities of CSV data
and manipulate it, merging sets of files, performing unions, adding fields
from one set to another, etc. I found that it was faster, by far, to do
this by importing the CSV files into SQLite databases then constructing
queries to perform the desired operations and selecting the data back out to
CSV format than it was to operate directly on the files with Perl. SQLite
is quite pleasingly fast.

Take a look at the SQLite site at www.sqlite.org for some good information
on its architecture and on what parts of SQL it supports.

Kirk Haines

···

On Wed, 19 May 2004 08:35:11 +0900, Hal Fulton wrote

Carl Youngblood wrote:

I can think of nothing better than sqlite. It is amazingly fast,
supports all the SQL you need (including subselects), is very easy to
extend, and best of all, is completely embedded into the client–it
doesn’t use a “server” at all.

Someone was suggesting that to me the other day.

What if I don’t really need SQL – should I still use it? Is it as fast
as, say, DBM?

Hal Fulton wrote:

Carl Youngblood wrote:

However, does anyone have any suggestions about the database? There
is too much data to use an in-memory store like Madeline, but I
don’t want the users to have to explicitly install any sort of
database engine, either.

I can think of nothing better than sqlite. It is amazingly fast,
supports all the SQL you need (including subselects), is very easy to
extend, and best of all, is completely embedded into the client–it
doesn’t use a “server” at all.

Someone was suggesting that to me the other day.

What if I don’t really need SQL – should I still use it? Is it as fast
as, say, DBM?

Hal

Unfortunately I haven’t used DBM so I don’t know how to compare it. I
can say that it seems to be about 300% faster than MySQL for an database
of equivalent complexity, as long as you aren’t dealing with many
simultaneous clients, at which point its performance seriously degrades
due to the fact that the entire database is locked for each
transaction. (when I say “simultaneous clients” I mean a situation
where your app is behaving as a server for many other clients that are
each queued up waiting for a query to run)

Carl

no - not as fast. i keep looking at this too, but my tests can consistently
core dump the sqlite interpreter… not exactly confidence instilling…

also - depending on your data even PStore can be faster - i just depends on
the size of the data, how it is laid out, how much memory you have (eg can the
entire database fit in memory at once or not), and what type of queries you
run - though it is quite fast. for my own stuff i just keep coming back to
some sort of object store - Madeline or PStore (or my new NFSStore) - or a
full blown RDBMS like postgresql. sqlite is cool but, if you can program ruby
(don’t NEED sql), i can never seem to justify the extra dependancy… of
course multi app access would justify this - but that’s not common for
embedded aps.

my 2cts.

-a

···

On Wed, 19 May 2004, Hal Fulton wrote:

Carl Youngblood wrote:

However, does anyone have any suggestions about the database? There
is too much data to use an in-memory store like Madeline, but I don’t
want the users to have to explicitly install any sort of database
engine, either.

I can think of nothing better than sqlite. It is amazingly fast,
supports all the SQL you need (including subselects), is very easy to
extend, and best of all, is completely embedded into the client–it
doesn’t use a “server” at all.

Someone was suggesting that to me the other day.

What if I don’t really need SQL – should I still use it? Is it as fast as,
say, DBM?

Hal

EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
PHONE :: 303.497.6469
ADDRESS :: E/GC2 325 Broadway, Boulder, CO 80305-3328
URL :: Solar-Terrestrial Physics Data | NCEI
“640K ought to be enough for anybody.” - Bill Gates, 1981
===============================================================================

Kirk Haines wrote:

I adore SQLite. A couple+ years ago I wrote a Perl binding for it (before
there was a good one available) and even used it’s virtual machine a bit to
write some new functions. It’s a sweet piece of software. I have just
never used it under Windows. I wasn’t aware of whether there were any
gotchas to it on Windows or not.

I’ve compiled and used Jamis Buck’s sqlite-ruby module on windows. It
worked fine. I had no issues with it.

http://sqlite-ruby.rubyforge.org/

Carl

Ara, would you mind sharing what it is that you are doing that is causing
SQLite to core dump? I’d love to try that out myself.

Kirk Haines

···

On Wed, 19 May 2004 09:13:48 +0900, Ara.T.Howard wrote

no - not as fast. i keep looking at this too, but my tests can consistently
core dump the sqlite interpreter… not exactly confidence instilling…