Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I've been taking a look at Ruby Shoes for GUI development with Ruby. So far, it's been a pretty good experience for making simple apps. However, I am quite worried about being able to write large scale applications with it. For example, how would I go about using MVP pattern with this framework?

For now, I have not been able to not make presentation concerns leak into the view because of the lack of some kind of "data binding". I have code that looks like this :

Shoes.app do
    @view = SampleView.new
    @presenter = SamplePresenter.new @view

    @label = para @view.sample_property

    button "Update sample_property" do
        @presenter.update_sample_property
    end
end

Here, the call to @presenter.update_sample_property updates @view.sample_property but the label is not updated accordingly.

For this to work, I would have to make @presenter.update_sample_property to return a string, and then call @label.text = return_value, but I think that would violate the MVP principle of not having presentation logic in the view.

I'm used to work in .Net with the MVP pattern so I don't know if the pattern applies correctly to Shoes like I tried to do.

Are there any resources out there for making non-trivial apps with Shoes? Especially using the MVP pattern or something similar?

EDIT : I took a look at the shoebox to see what other people have achieved with the framework. Though I did not look through it extensively, at first sight it seems like they are all simple projects with no real purposes.

UPDATE : I've finally been able to come up with something that satisfies me. Oh, and by the way, I moved to green_shoes because it is all written in ruby and I can run it from the command line rather than from the Shoes application. Packaging is not an issue for me quite yet.

share|improve this question

closed as off-topic by gnat, MichaelT, GlenH7, jmo21, Jim G. Sep 26 '13 at 3:26

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking us to recommend a tool, library or favorite off-site resource are off-topic for Programmers as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – gnat, MichaelT, GlenH7, jmo21, Jim G.
If this question can be reworded to fit the rules in the help center, please edit the question.

    
I don't understand why this was put on hold, and the reason is not even correct : "Questions asking us to recommend a tool, library or favorite off-site resource". This is not what this question is asking. I was only looking for tips about using a particular library. If you read the question carefully, you would see that I'm not asking for alternatives at all. Anyway, I don't care, it was 1 year and a half ago. –  marco-fiset Sep 26 '13 at 12:30
    
Your question ends with Are there any resources out there for making non-trivial apps with Shoes? Especially using the MVP pattern or something similar?. That looks like a request for external resources to me. –  Martijn Pieters Sep 26 '13 at 15:44
    
@marco-fiset As I wanted to ask similar question, and you probably have written lots of code in Shoes, would you mind share some informations? –  Darek Nędza Dec 30 '13 at 20:28
1  
@DarekNędza Actually no, I wrote a very simple app with Shoes, then moved on with web development. –  marco-fiset Jan 1 at 22:56

1 Answer 1

up vote 7 down vote accepted

From the first page in the Shoes manual:

Shoes is a tiny graphics toolkit. It's simple and straightforward. Shoes was born to be easy! Really, it was made for absolute beginners. There's really nothing to it.

From this statement I would say that Shoes was not really designed with large-scale apps in mind.

You may be able to implement an MVP or MVC pattern with help from the ruby observerable library.

share|improve this answer
    
Thank you, I will take a look at the Observer pattern when I get home tonight. I want to use Shoes because it is very simple and easy to use. Is there a GUI framework for Ruby that would be more suited for large-scale applications ? –  marco-fiset Mar 26 '12 at 17:15
1  
@marcof - Take a look at this site. It basically compares a bunch of different frameworks. Hopefully one of them fits your needs. –  Mike L. Mar 26 '12 at 20:06

Not the answer you're looking for? Browse other questions tagged or ask your own question.