[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

How to do windows applications ?

Simon Strandgaard

9/18/2003 8:37:00 PM

I am going to write a ruby application for a dog-school.
They train dogs, do statistics of the dogs, etc..
I use unix myself, but the application has to be available
on offline windows machines (so an online webservice doesn't work).

I would prefer a platform independent solution; bundling
apache+mod_ruby+my future dog application. But I see many loose ends:
How to bundle these things together, so it will be
installed as *one* application ?


Question1: What modules do you use for windows applications ?

Question2: Any hints to a unix-man, which has to write a windows
application?


--
Simon Strandgaard

6 Answers

Thomas Sondergaard

9/18/2003 8:57:00 PM

0

Does it have to be a web application? If it is an offline application why
not take advantage of the situation and give your users a proper user
interface for once.

> apache+mod_ruby+my future dog application.

I suppose you will need ruby too :-)

Tom


Robert Klemme

9/19/2003 8:25:00 AM

0


"Simon Strandgaard" <qj5nd7l02@sneakemail.com> schrieb im Newsbeitrag
news:pan.2003.09.18.20.36.56.418954@sneakemail.com...
> I am going to write a ruby application for a dog-school.
> They train dogs, do statistics of the dogs, etc..
> I use unix myself, but the application has to be available
> on offline windows machines (so an online webservice doesn''t work).
>
> I would prefer a platform independent solution; bundling
> apache+mod_ruby+my future dog application. But I see many loose ends:
> How to bundle these things together, so it will be
> installed as *one* application ?

Why do you want to use a web server if the machines are offline anyway?
Why not just create a Ruby/Tk (or other GUI toolkit) application? If you
have a local network and need a centralized server then Ruby/Tk with DRB
might be an option, too. If you want to go for a web application IMHO
bundling is not so important since you will install it only on one
machine.

> Question1: What modules do you use for windows applications ?

For web apps there''s plenty of template frameworks out there, eruby,
amrita, ...

> Question2: Any hints to a unix-man, which has to write a windows
> application?

I''d say do it the same way as Unix applications: write it portable. Use
such things as File.join, File.basename, File.dirname, File::SEPARATOR,
File::PATH_SEPARATOR etc.

Cheers

robert

Simon Strandgaard

9/20/2003 11:30:00 AM

0

On Fri, 19 Sep 2003 11:24:55 +0200, Robert Klemme wrote:

>
> "Simon Strandgaard" <qj5nd7l02@sneakemail.com> schrieb im Newsbeitrag
> news:pan.2003.09.18.20.36.56.418954@sneakemail.com...
>> I am going to write a ruby application for a dog-school.
>> They train dogs, do statistics of the dogs, etc..
>> I use unix myself, but the application has to be available
>> on offline windows machines (so an online webservice doesn''t work).
>>
>> I would prefer a platform independent solution; bundling
>> apache+mod_ruby+my future dog application. But I see many loose ends:
>> How to bundle these things together, so it will be
>> installed as *one* application ?
>
> Why do you want to use a web server if the machines are offline anyway?

It was just a thought..


> Why not just create a Ruby/Tk (or other GUI toolkit) application?

Yes I some experience with using FxRuby, this is probably the way for me
to go.



>> Question1: What modules do you use for windows applications ?
>
> For web apps there''s plenty of template frameworks out there, eruby,
> amrita, ...

This doesn''t answer the question, what ruby-modules/frameworks do you use
for composing windows application ? How do you install it so it *feels*
like a typical windows application (installshield?) ?


>> Question2: Any hints to a unix-man, which has to write a windows
>> application?
>
> I''d say do it the same way as Unix applications: write it portable. Use
> such things as File.join, File.basename, File.dirname, File::SEPARATOR,
> File::PATH_SEPARATOR etc.

Also the shebang concept does''nt work on windows, what do I have to do if
I want to make a ruby script executable ?

--
Simon Strandgaard

Stephan Kämper

9/20/2003 5:08:00 PM

0

Simon Strandgaard wrote:
> On Fri, 19 Sep 2003 11:24:55 +0200, Robert Klemme wrote:
>
>>Why not just create a Ruby/Tk (or other GUI toolkit) application?
>
>>>Question1: What modules do you use for windows applications ?
>>
>>For web apps there''s plenty of template frameworks out there, eruby,
>>amrita, ...
>
> This doesn''t answer the question, what ruby-modules/frameworks do you use
> for composing windows application ? How do you install it so it *feels*
> like a typical windows application (installshield?) ?

I use a) whatever I need and b) what''s available. (That''s of course completely indepentent of the OS
anyway...)
I personally, don''t think a special kind of installer makes an application feel more like a typical
windows app. Many people don''t like that installer stuff anyway, and prefer to just place the
file(s) in a directory and run the program. That depends heavily on your customers "culture" and
back ground, of course.

Do you think about wrapping the app in something like exerb to produce a windows executable?
Then you might think about wrapping _that_ into some installer in turn...
But I wouldn''t like it delivered that way. But I''m not a dog trainer.

> Also the shebang concept does''nt work on windows, what do I have to do if
> I want to make a ruby script executable ?

Just run it - like in "ruby killerapp".
If the system''s set up appropriately it should recognize the .rb prefix and run the Ruby interpreter
automatically. What I think is that "How to fire up the program" is likely the most OS oriented
question you should encounter (part from trying "fork" and things on a Windows box).

The main part of the app however should be largely unrelated to the underlying OS - especially if
you do it in Ruby anyway.


Cheers,

Stephan

gabriele renzi

9/20/2003 5:19:00 PM

0

il Sat, 20 Sep 2003 13:30:24 +0200, Simon Strandgaard
<qj5nd7l02@sneakemail.com> ha scritto::




>
>Also the shebang concept does''nt work on windows, what do I have to do if
>I want to make a ruby script executable ?

I think you may set some stuff in WinRegistry to get this same effect,
but I can''t remember :(
BTW, imo, it is far better to distribute a single installer with a
batch file or exe file that just execute ''ruby myscript.rb''.
You should take a look at how FreeRIDE is distributed, maybe..

Simon Strandgaard

9/21/2003 8:30:00 AM

0

On Sat, 20 Sep 2003 18:19:11 +0000, gabriele renzi wrote:

> il Sat, 20 Sep 2003 13:30:24 +0200, Simon Strandgaard
> <qj5nd7l02@sneakemail.com> ha scritto::
>
>>Also the shebang concept does''nt work on windows, what do I have to do if
>>I want to make a ruby script executable ?
>
> I think you may set some stuff in WinRegistry to get this same effect,
> but I can''t remember :(
<
> BTW, imo, it is far better to distribute a single installer with a
> batch file or exe file that just execute ''ruby myscript.rb''.
> You should take a look at how FreeRIDE is distributed, maybe..

Thanks everyone, I will take a look at FreeRIDE.

Who wants to do batch jobs, when they got ruby :-)

--
Simon Strandgaard