Thanks for this. I think it's pretty slick. I think the view name for the default project should be AccountSetupView, but other than that, cool. I'm just struggling with MacRuby and HotCocoa right now -- doing much more Rails, so maybe I'm the wrong person to ask. But the M ... as far as I can tell you only have the LighthouseAPi module that kinda resembles how models sometimes fit into MVC. Were you thinking about some models directory that contained classes that mapped to some kind of data modeling or persistence layer?

--steve


On Apr 16, 2009, at 5:07 PM, Matt Aimonetti wrote:

I recently worked on a proof of concept with HotCocoa. I wanted to see how easy it would be to stay in pure Ruby and still use a MVC type approach.
I put together the beginning of a sample app to see how it would work in real life: http://github.com/mattetti/phare/

I first wanted to make sure to separate the controller code and the view code. I also wanted to avoid use class variables to deal with my views.
There isn't much there but you can see how I organized the various parts of my app:

http://github.com/mattetti/phare/tree/2d8d06ceefcfced5040bbe99fdea9b892a0db877/lib

lib/controllers
lib/views
lib/vendor (string.rb extends String, logger.rb will eventually let you log at different debugging levels, mvc.rb takes care of loading the various files)

Views just need to respond to render and have a description if you want to use the segmented controller helper.

Anyways, as I said there isn't much, it's lacking the entire testing part of the app and the code could definitively be cleaned up/optimized.
I just want to know if that's something others are interested in, or if you prefer to
1. come up with your own solution every time
2. don't bother with mvc
3. use xcode/ib

- Matt