MVC and convention over configuration

0 views
Skip to first unread message

CVertex

unread,
Jan 23, 2008, 7:00:57 AM1/23/08
to Rucola
Day 3 of my Rucola/OSX/RubyCocoa adventures and I thought I'd
congratulate Rucola devs on a nice gem for getting started with OS X
dev.

I don't mean to sound like a pedant, but shouldn't the default NIB be
in the view folder? or not exist at all.

This seems to break the MVC pattern.

I'm liking the BDD stuff - but I haven't had much of a shot at keeping
my tests up to the pace of my apps.

Regards,
-CV

Eloy Duran

unread,
Jan 24, 2008, 7:28:01 AM1/24/08
to ruc...@googlegroups.com
Hi,

Well yes and no. I agree that it should go in the views directory.
But not that we shouldn't have one at all.

Because it isn't necessary to have a window instance in the
MainMenu.nib,
that's just the default for if you're gonna make a simple one window
application.
In which case most of the times your ApplicationController will simply
be the controller
for that window, thus being MVC.

In other cases where you're using documents or have separate window
nibs and controllers for
every window, you'd still need one MainMenu.nib for global things like
the menu/menuitems etc.

About the BDD, it's hart to always follow the test/spec first way.
Most of the times I do some prototyping and when I know what is needed
and an idea of how it will be implemented, then I start over in a test/
spec first way
to make sure that all the important stuff is covered. 1:1 code/test
ratio is not that important to me.

Cheers,
Eloy

CVertex

unread,
Jan 29, 2008, 4:37:00 PM1/29/08
to Rucola
I can't speak from experience (cos i have none) but it makes sense
that MainMenu.nib exists on project creation. It just needs to be in
the View.

Thanks for your BDD advice, I'll definitely do something similar.
Reply all
Reply to author
Forward
0 new messages