Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.ruby > #2642 > unrolled thread

Creating a full application with Ruby

Started byFily Salas <fs_tigre@hotmail.com>
First post2011-04-11 15:52 -0500
Last post2011-04-14 10:53 -0500
Articles 20 on this page of 22 — 5 participants

Back to article view | Back to comp.lang.ruby


Contents

  Creating a full application with Ruby Fily Salas <fs_tigre@hotmail.com> - 2011-04-11 15:52 -0500
    Re: Creating a full application with Ruby 7stud -- <bbxx789_05ss@yahoo.com> - 2011-04-11 18:38 -0500
    Re: Creating a full application with Ruby jake kaiden <jakekaiden@yahoo.com> - 2011-04-11 19:03 -0500
    Re: Creating a full application with Ruby Fily Salas <fs_tigre@hotmail.com> - 2011-04-11 20:33 -0500
      Re: Creating a full application with Ruby jake kaiden <jakekaiden@yahoo.com> - 2011-04-12 07:16 -0500
        Re: Creating a full application with Ruby ashbb <ashbbb@gmail.com> - 2011-04-12 07:55 -0500
          Re: Creating a full application with Ruby jake kaiden <jakekaiden@yahoo.com> - 2011-04-12 08:35 -0500
      Re: Creating a full application with Ruby ashbb <ashbbb@gmail.com> - 2011-04-12 07:48 -0500
    Re: Creating a full application with Ruby Fily Salas <fs_tigre@hotmail.com> - 2011-04-12 09:09 -0500
      Re: Creating a full application with Ruby 7stud -- <bbxx789_05ss@yahoo.com> - 2011-04-12 13:54 -0500
    Re: Creating a full application with Ruby Fily Salas <fs_tigre@hotmail.com> - 2011-04-12 15:10 -0500
      Re: Creating a full application with Ruby Steve Klabnik <steve@steveklabnik.com> - 2011-04-12 15:27 -0500
    Re: Creating a full application with Ruby Fily Salas <fs_tigre@hotmail.com> - 2011-04-12 20:12 -0500
      Re: Creating a full application with Ruby ashbb <ashbbb@gmail.com> - 2011-04-13 09:45 -0500
      Re: Creating a full application with Ruby Steve Klabnik <steve@steveklabnik.com> - 2011-04-13 09:58 -0500
    Re: Creating a full application with Ruby Fily Salas <fs_tigre@hotmail.com> - 2011-04-13 12:03 -0500
      Re: Creating a full application with Ruby Steve Klabnik <steve@steveklabnik.com> - 2011-04-13 13:37 -0500
    Re: Creating a full application with Ruby Fily Salas <fs_tigre@hotmail.com> - 2011-04-13 20:31 -0500
      Re: Creating a full application with Ruby Steve Klabnik <steve@steveklabnik.com> - 2011-04-13 21:03 -0500
    Re: Creating a full application with Ruby Fily Salas <fs_tigre@hotmail.com> - 2011-04-14 07:07 -0500
      Re: Creating a full application with Ruby ashbb <ashbbb@gmail.com> - 2011-04-14 08:41 -0500
    Re: Creating a full application with Ruby Fily Salas <fs_tigre@hotmail.com> - 2011-04-14 10:53 -0500

Page 1 of 2  [1] 2  Next page →


#2642 — Creating a full application with Ruby

FromFily Salas <fs_tigre@hotmail.com>
Date2011-04-11 15:52 -0500
SubjectCreating a full application with Ruby
Message-ID<8e0e0842a3439de88c0617cc8e5553a7@ruby-forum.com>
Hi,

I have a desk-top application that I created using Actionscript 3.0 and
AIR, nothing fancy it just basically calculates the quantity of
rectangular parts that can fit in a bigger rectangular part based on the
user’s input, the thing  is that it ALSO dynamically creates the actual
rectangles and show them on the screen based on the same factors and I
was wondering if this is something I can create with Ruby and may be
FXRuby, I do understand that Ruby is not meant for big application but
for something like this I think it would be nice to give it try since I
want to start working more with Ruby and this would be the perfect time
since I need to update the application.

I guess my question is what do I need to create full applications
because I have no doubt that it can be done with Ruby I just need to
know what tools do I need to create it?

What GUI can dynamically create objects?

 I currently have FXRuby installed in my machine and I also bought the
book but when I go to their website it looks outdated and I’m wondering
if it would be worth it to learn it or is it even the right tool to
create the application I’m describing (see screen-shot).

Just to give you an idea in the attached screen shot I’m calculating how
many times I can fit a 15”x2” part into a 60”x120”

Thanks

Attachments:
http://www.ruby-forum.com/attachment/6115/calculator.JPG
http://www.ruby-forum.com/attachment/6116/calculator.JPG


-- 
Posted via http://www.ruby-forum.com/.

[toc] | [next] | [standalone]


#2645

From7stud -- <bbxx789_05ss@yahoo.com>
Date2011-04-11 18:38 -0500
Message-ID<7f8b9f825ade6ffa07217064fa85f0d1@ruby-forum.com>
In reply to#2642
Fily Salas wrote in post #992154:
> Hi,
>
> I have a desk-top application that I created using Actionscript 3.0 and
> AIR, nothing fancy it just basically calculates the quantity of
> rectangular parts that can fit in a bigger rectangular part based on the
> user’s input, the thing  is that it ALSO dynamically creates the actual
> rectangles and show them on the screen based on the same factors and I
> was wondering if this is something I can create with Ruby and may be
> FXRuby, I do understand that Ruby is not meant for big application
>

The creators of the application Ruby on Rails would disagree with you.

> but
> for something like this I think it would be nice to give it try since I
> want to start working more with Ruby and this would be the perfect time
> since I need to update the application.
>

Then go for it.

> I guess my question is what do I need to create full applications
> because I have no doubt that it can be done with Ruby I just need to
> know what tools do I need to create it?
>
> What GUI can dynamically create objects?
>

All of them.  You might want to check out Shoes, which is a simplistic 
gui toolkit that is easy to learn.  See here:

http://shoesrb.com/manual/Art.html


>  I currently have FXRuby installed in my machine and I also bought the
> book but when I go to their website it looks outdated and I’m wondering
> if it would be worth it to learn it or is it even the right tool to
> create the application I’m describing (see screen-shot).
>
> Just to give you an idea in the attached screen shot I’m calculating how
> many times I can fit a 15”x2” part into a 60”x120”
>
> Thanks

I prefer wxRuby for gui applications, although drawing shapes is a 
little more involved than with Shoes.

-- 
Posted via http://www.ruby-forum.com/.

[toc] | [prev] | [next] | [standalone]


#2650

Fromjake kaiden <jakekaiden@yahoo.com>
Date2011-04-11 19:03 -0500
Message-ID<05935b9e27da4b8cd26bf277a5d26643@ruby-forum.com>
In reply to#2642
Fily Salas wrote in post #992154:
> ...was wondering if this is something I can create with Ruby and may be
> FXRuby,
> ...What GUI can dynamically create objects?
> ...Just to give you an idea in the attached screen shot...

hi fily -

  this looks like something you could do relatively easily with ruby - 
give it a shot!
  i agree that shoes is probably the easiest, though i really haven't 
used it at all.  i use gtk2 for gui's, and you can redraw shapes 
relatively easily...

http://ruby-gnome2.sourceforge.jp/hiki.cgi?Ruby/GTK
http://zetcode.com/tutorials/rubygtktutorial/cairo/#shapes

 -j

-- 
Posted via http://www.ruby-forum.com/.

[toc] | [prev] | [next] | [standalone]


#2653

FromFily Salas <fs_tigre@hotmail.com>
Date2011-04-11 20:33 -0500
Message-ID<24192d008f7229f15b9292ee00d12689@ruby-forum.com>
In reply to#2642
Thank you all for your reply.

It looks like Shoes is the easiest GUI but I'm a little afraid when I 
dont have a book or something to learn from thats why I went with FXRuby 
because it has a book, but since it looks like learning a GUI is like 
learning a new language I want to make the right decision and stick with 
one for a while.

I will give Shoes a try.

Excuse my ignorance but is it possible to make small animations with 
Ruby? If yes, is this what the GUI is for?

When I say small animation I'm talking about mouse over transitions and 
all the simple stuff NOT animations for banners or anything like that.

Do I need a separate program to package the application?

I usually get exited about being able to create an application using a 
language like ruby, thats why I want to give it a try.


Thanks a lot

-- 
Posted via http://www.ruby-forum.com/.

[toc] | [prev] | [next] | [standalone]


#2676

Fromjake kaiden <jakekaiden@yahoo.com>
Date2011-04-12 07:16 -0500
Message-ID<87b367ae97c68d243dbb08a0d60bcd8a@ruby-forum.com>
In reply to#2653
Fily Salas wrote in post #992195:

> is it possible to make small animations with
> Ruby? If yes, is this what the GUI is for?
>

  hi fily -

   simple animations are easy with gtk2...
http://ruby-gnome2.sourceforge.jp/ja/hiki.cgi?Gdk::PixbufAnimation

for example:

require 'gtk2'

  win = Gtk::Window.new()

  anim = Gdk::PixbufAnimation.new("TradyBlix.gif")
  image = Gtk::Image.new(anim)

  win.add(image)
  win.show_all

  win.signal_connect("destroy"){Gtk.main_quit}

Gtk.main

  "TradyBlix.gif" is a simple animation i made in gimp.

  i don't know about animations with wxRuby, as i don't use it, but it's
probably also possible.


> Do I need a separate program to package the application?

  ruby apps can be made executable (so you don't have to type "ruby"
before the app name to run it...  how you do that depends on your
system, and the target system - there's plenty of info with a google
search.

  have fun...

  -j

-- 
Posted via http://www.ruby-forum.com/.

[toc] | [prev] | [next] | [standalone]


#2681

Fromashbb <ashbbb@gmail.com>
Date2011-04-12 07:55 -0500
Message-ID<BANLkTinV2_7M4RnHjE1avAzgOQ3fvcp5oQ@mail.gmail.com>
In reply to#2676
[Note:  parts of this message were removed to make it a legal post.]

Hi jake,

If you like both gtk2 and Shoes, how about Green Shoes? ;-)

http://rubygems.org/gems/green_shoes

Green Shoes is one of the colorful Shoes.
It is written in pure ruby with gtk2.

Cheers,
ashbb

[toc] | [prev] | [next] | [standalone]


#2684

Fromjake kaiden <jakekaiden@yahoo.com>
Date2011-04-12 08:35 -0500
Message-ID<a2fb44df3a354d692f5f246a66946fa1@ruby-forum.com>
In reply to#2681
Satoshi A. wrote in post #992299:
> Hi jake,
>
> If you like both gtk2 and Shoes, how about Green Shoes? ;-)
>
> http://rubygems.org/gems/green_shoes
>
> Green Shoes is one of the colorful Shoes.
> It is written in pure ruby with gtk2.
>
> Cheers,
> ashbb

  i'll give it a look - thanks...

 -j

-- 
Posted via http://www.ruby-forum.com/.

[toc] | [prev] | [next] | [standalone]


#2679

Fromashbb <ashbbb@gmail.com>
Date2011-04-12 07:48 -0500
Message-ID<BANLkTinAeOx4Z0PAM9HpNZW9XGxjqOmO5g@mail.gmail.com>
In reply to#2653
[Note:  parts of this message were removed to make it a legal post.]

Hi Fily,

> I'm a little afraid when I dont have a book
How about the Shoes manual?

http://shoes.heroku.com/manual/Hello.html

or `Nobody Knows Shoes` (a big pdf file)

http://cloud.github.com/downloads/shoes/shoes/nks.pdf

> I will give Shoes a try.
Cool!
If you have any questions, feel free to ask in Shoes ML.

http://shoes.heroku.com/current-progress

> When I say small animation I'm talking about mouse over transitions
Umm,...

Try out the following snippet with your Shoes.
When the mouse enters the black oval, it'll change the color to red.

    Shoes.app do
      o = oval 100, 100, 100
      o.hover{o.style fill: red}
    end

Cheers,
ashbb

[toc] | [prev] | [next] | [standalone]


#2685

FromFily Salas <fs_tigre@hotmail.com>
Date2011-04-12 09:09 -0500
Message-ID<6605d0b5976db87e10c50eaef6adcd7b@ruby-forum.com>
In reply to#2642
I was reading the documentation from the Shoes' website and it looks 
simple but I was surprised because apparently you don't have to have 
Ruby installed so I started wondering how is your code going to work 
without Ruby?

Is Ruby embedded in Shoes?

Can you write your own code or you are limited to the the pre-built 
functions from Shoes?

Thanks a lot for your help!

-- 
Posted via http://www.ruby-forum.com/.

[toc] | [prev] | [next] | [standalone]


#2703

From7stud -- <bbxx789_05ss@yahoo.com>
Date2011-04-12 13:54 -0500
Message-ID<7071430e1146a399f0d9c98f59c37454@ruby-forum.com>
In reply to#2685
Fily Salas wrote in post #992314:
> I was reading the documentation from the Shoes' website and it looks
> simple but I was surprised because apparently you don't have to have
> Ruby installed so I started wondering how is your code going to work
> without Ruby?
>

Please point us to what you are referring to.

-- 
Posted via http://www.ruby-forum.com/.

[toc] | [prev] | [next] | [standalone]


#2707

FromFily Salas <fs_tigre@hotmail.com>
Date2011-04-12 15:10 -0500
Message-ID<1c30bfe6370d81d9ed2bca56f0f38ecf@ruby-forum.com>
In reply to#2642
>Please point us to what you are referring to.
Here.
http://shoes.heroku.com/manual/Installing.html

I have been reading the book "No Body Knows Shoes" and it seems to be 
pretty simple and makes me wonder if shoes is really a complete GUI 
program, or is simply for very simple stuff.

What are the limitation of using Shoes? I like it and even if there are 
some limitations I will definitely give it a try.

Thanks a lot

-- 
Posted via http://www.ruby-forum.com/.

[toc] | [prev] | [next] | [standalone]


#2709

FromSteve Klabnik <steve@steveklabnik.com>
Date2011-04-12 15:27 -0500
Message-ID<BANLkTik7D6UR00fWds5sPWFUDd5NH1EtwA@mail.gmail.com>
In reply to#2707
[Note:  parts of this message were removed to make it a legal post.]

Hey there! Maintainer of Shoes here!

You don't need to install Ruby because Shoes is like its own Ruby
distribution. It comes with a Ruby 1.9.1 built inside of it.

> What are the limitation of using Shoes? I like it and even if there are
some limitations I will definitely give it a try.

The main limitation is that you can't use gems with C extensions. We've
included a few with Shoes: bloopsaphone, chipmunk, ftsearch, hpricot, json,
and squite3, but that's all you're going to get.

The second limitation is that Shoes can still be a bit strange in places.
I'm currently undergoing an effort to increase documentation and add tests,
but you can run into strange corners sometimes.

The last big limitation is that some larger Shoes programs can be a bit
unstable on Windows sometimes. I can't reproduce this myself, but Hackety
Hack (the largest Shoes program I know of) will just die on certain systems
after about 15 minutes of running. It has something to do with Ruby 1.9.1
and threads, and I'm working on it, but be aware of that. Smaller programs
seem to have no issues, and it's not on every system, just some.

With that said, Shoes is a lot of fun to code with, and you get all three
platforms for free, so... yeah!

Any other questions about Shoes, I'll be happy to answer them.

[toc] | [prev] | [next] | [standalone]


#2716

FromFily Salas <fs_tigre@hotmail.com>
Date2011-04-12 20:12 -0500
Message-ID<3b7d254e048e4465b0e6786e3f77e55b@ruby-forum.com>
In reply to#2642
Thank you for your reply!

I'm currently trying it and as I said its way too easy, I like it.

What would you considere a small-big program?

I also heard that with shoes you can not create menus, like File, Save 
as, Version etc. is this true?


Thanks a lot!

-- 
Posted via http://www.ruby-forum.com/.

[toc] | [prev] | [next] | [standalone]


#2762

Fromashbb <ashbbb@gmail.com>
Date2011-04-13 09:45 -0500
Message-ID<BANLkTimwVugOY4LXnCa=dv4GNGPT=yEYFQ@mail.gmail.com>
In reply to#2716
[Note:  parts of this message were removed to make it a legal post.]

Hi Fily,

> I also heard that with shoes you can not create menus,
> like File, Save as, Version etc. is this true?
Umm,... No.
You can use list_box like this:

    Shoes.app do
      list_box items: %w[File Save Version]
    end

Or, you can write your original menu method with image or shape
elements of Shoes. ;-)

You can find lots of way in the ShoeBox: http://the-shoebox.org/

Cheers,
ashbb

[toc] | [prev] | [next] | [standalone]


#2765

FromSteve Klabnik <steve@steveklabnik.com>
Date2011-04-13 09:58 -0500
Message-ID<BANLkTikoTqvZta7uy56q8DNkp5VU=DMKxw@mail.gmail.com>
In reply to#2716
[Note:  parts of this message were removed to make it a legal post.]

>
> I'm currently trying it and as I said its way too easy, I like it.
>

Glad to hear it. :)


> What would you considere a small-big program?
>

I dunno, a couple of hundred lines? Check out Hackety Hack, for example:
https://github.com/hacketyhack/hacketyhack


> I also heard that with shoes you can not create menus, like File, Save
> as, Version etc. is this true?
>

Yes, we don't have a good solution for this yet. Basically, cross-platform
menus are hard to do right, since they end up looking different on every
platform... ashbb's suggestion is how most Shoes apps handle such things.

[toc] | [prev] | [next] | [standalone]


#2774

FromFily Salas <fs_tigre@hotmail.com>
Date2011-04-13 12:03 -0500
Message-ID<953dfffc238d2a8d38d9a73b7fa9b349@ruby-forum.com>
In reply to#2642
Thank you all for your help!

>You can find lots of way in the ShoeBox: http://the-shoebox.org/
Thank you for the link.

>What would you considere a small-big program?

>I dunno, a couple of hundred lines? Check out Hackety Hack, for example:
>https://github.com/hacketyhack/hacketyhack



Are you saying that Hackety Hack is a perfect example of a program that 
may unexpectedly quit after 15 minutes using it? Now, this is a Windows 
problem only right?

Thanks

-- 
Posted via http://www.ruby-forum.com/.

[toc] | [prev] | [next] | [standalone]


#2787

FromSteve Klabnik <steve@steveklabnik.com>
Date2011-04-13 13:37 -0500
Message-ID<BANLkTi=EixV8aA5t7HCBE2u_fcyEFPrAyg@mail.gmail.com>
In reply to#2774
[Note:  parts of this message were removed to make it a legal post.]

> Are you saying that Hackety Hack is a perfect example of a program that
> may unexpectedly quit after 15 minutes using it?


heheh, yes, that may be what I'm referring to. :/ Working on it!


> Now, this is a Windows
> problem only right?
>

Yep. Flawless on my Mac and Linux. In fact, mostly flawless on my Windows,
too: it's only some configurations.

[toc] | [prev] | [next] | [standalone]


#2808

FromFily Salas <fs_tigre@hotmail.com>
Date2011-04-13 20:31 -0500
Message-ID<1cb5fb49d024270d3b18fa6095f9b8a8@ruby-forum.com>
In reply to#2642
Thank you for your help!

There are currently 19 users using the application I described im my 
original post and a little worried about stability since they are all 
Windows users, I know its a small application but it can create up to 
50,000 rectangle shapes.

Could this be a problem if I create it using Shoes?

Now, is it even possible to pack and distribute an application created 
in Shoes?

Thanks a lot!

-- 
Posted via http://www.ruby-forum.com/.

[toc] | [prev] | [next] | [standalone]


#2813

FromSteve Klabnik <steve@steveklabnik.com>
Date2011-04-13 21:03 -0500
Message-ID<BANLkTin8Zh12-NH=KR2sTwP3ivXnNTcQmQ@mail.gmail.com>
In reply to#2808
[Note:  parts of this message were removed to make it a legal post.]

>
> Could this be a problem if I create it using Shoes?
>

Only way to know for sure is to try. ;)


> Now, is it even possible to pack and distribute an application created
> in Shoes?
>

Absolutely! There should be a 'package an app' screen on the main shoes
screen. It'll give you a .exe of your app.

[toc] | [prev] | [next] | [standalone]


#2840

FromFily Salas <fs_tigre@hotmail.com>
Date2011-04-14 07:07 -0500
Message-ID<51e444d5f513f01bfd0b76daded3bd15@ruby-forum.com>
In reply to#2642
Thanks a lot for your help!

I will try to create the app and see how it goes. Where can I ask future 
questions about Shoes? I'm sure I will have some...

Thanks

-- 
Posted via http://www.ruby-forum.com/.

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | comp.lang.ruby


csiph-web