Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Ruby (http://www.velocityreviews.com/forums/f66-ruby.html)
-   -   Windows desktop app w/ simple db; how? (http://www.velocityreviews.com/forums/t814696-windows-desktop-app-w-simple-db-how.html)

Kirk Haines 05-18-2004 08:59 PM

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




gabriele renzi 05-18-2004 09:18 PM

Re: Windows desktop app w/ simple db; how?
 
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.
>
>


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?

Michael Neumann 05-18-2004 09:44 PM

Re: Windows desktop app w/ simple db; how?
 
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.


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
(http://www.osk.3web.ne.jp/~nyasu/vruby/vrproject-e.html). 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



Ara.T.Howard 05-18-2004 10:00 PM

Re: Windows desktop app w/ simple db; how?
 
On Wed, 19 May 2004, 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.
>
> 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.


>
>
> 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 :: http://www.ngdc.noaa.gov/stp/
| "640K ought to be enough for anybody." - Bill Gates, 1981
================================================== =============================


Hal Fulton 05-18-2004 11:35 PM

Re: Windows desktop app w/ simple db; how?
 
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





Kirk Haines 05-18-2004 11:50 PM

Re: Windows desktop app w/ simple db; how?
 
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?


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



Ara.T.Howard 05-18-2004 11:56 PM

Re: Windows desktop app w/ simple db; how?
 
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



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
--
================================================== =============================
| EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
| PHONE :: 303.497.6469
| ADDRESS :: E/GC2 325 Broadway, Boulder, CO 80305-3328
| URL :: http://www.ngdc.noaa.gov/stp/
| "640K ought to be enough for anybody." - Bill Gates, 1981
================================================== =============================


Shashank Date 05-19-2004 12:48 AM

Re: Windows desktop app w/ simple db; how?
 

"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.




Kirk Haines 05-19-2004 06:11 AM

Re: Windows desktop app w/ simple db; how?
 
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...


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





All times are GMT. The time now is 03:53 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.