Ruby Shoes for non-trivial apps

Posted by marcof on Programmers See other posts from Programmers or by marcof
Published on 2012-03-26T12:58:14Z Indexed on 2012/03/26 17:38 UTC
Read the original article Hit count: 436

Filed under:
|
|
|

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

© Programmers or respective owner

Related posts about ruby

Related posts about gui