How to do windows applications ?

Discussion in 'Ruby' started by Simon Strandgaard, Sep 18, 2003.

  1. 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
     
    Simon Strandgaard, Sep 18, 2003
    #1
    1. Advertising

  2. 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
     
    Thomas Sondergaard, Sep 18, 2003
    #2
    1. Advertising

  3. "Simon Strandgaard" <> schrieb im Newsbeitrag
    news:p...
    > 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
     
    Robert Klemme, Sep 19, 2003
    #3
  4. On Fri, 19 Sep 2003 11:24:55 +0200, Robert Klemme wrote:

    >
    > "Simon Strandgaard" <> schrieb im Newsbeitrag
    > news:p...
    >> 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
     
    Simon Strandgaard, Sep 20, 2003
    #4
  5. 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
     
    Stephan Kämper, Sep 20, 2003
    #5
  6. il Sat, 20 Sep 2003 13:30:24 +0200, Simon Strandgaard
    <> 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..
     
    gabriele renzi, Sep 20, 2003
    #6
  7. On Sat, 20 Sep 2003 18:19:11 +0000, gabriele renzi wrote:

    > il Sat, 20 Sep 2003 13:30:24 +0200, Simon Strandgaard
    > <> 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
     
    Simon Strandgaard, Sep 21, 2003
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Davis
    Replies:
    0
    Views:
    765
    John Davis
    Aug 21, 2003
  2. Wolfgang
    Replies:
    5
    Views:
    1,510
    Tris Orendorff
    Feb 19, 2004
  3. praba kar
    Replies:
    2
    Views:
    900
    Paul Rubin
    May 4, 2005
  4. Rob Raad
    Replies:
    1
    Views:
    434
    diamondwxp
    Oct 10, 2003
  5. Anil
    Replies:
    1
    Views:
    468
    Jean-Luc David [MS-MVP]
    Jul 31, 2004
Loading...

Share This Page