How to organize a Ruby Ruby application?

May I have some examples of how you organize your shoe apps? I mean, just using the Shoes.app {} package and instance variables is awkward .. I'd like to create an MVC framework. I'm used to it (from rails, flexive frames, etc.) and how to recreate something similar.

+2


a source to share


2 answers


The way I usually deal with this problem is through the following separation:

  • Models - your regular model code / business logic (ripe for testing!)
  • Tabs / Views - separate views for different menu items built into the application

To achieve the latter, I have pulled out a small slot handling library that has not yet been checked out into a separate gem or even a repository (shoes4 waiting here).



The required files here in my pomdoro tracker project are slot.rb, slot_manager.rb and dynamic_slot.rb - you can see them which will be used in the above project.

Basically the slot manager hides the old view and loads the new view on demand. This code was originally pulled from hacketyhack tabs.

Hope it helps!

+2


a source


I would look at some open source shoe apps and see how the developers organized them. A massive list of shoe products can be found at: http://the-shoebox.org/ .



0


a source







All Articles