Seeking "Rails Way" design advice

How many lines of code so far? A controller for each model isn't
necessarily a bad thing, and a One True Controller mightn't sound
too bad until your app has to do more stuff.

Unless you are having problems right now, I would just finish it
and refactor at the end. Refactoring and redesign is always more
obvious with a complete app than an incomplete one.

Hardy wrote:

Richard Conroy wrote:
> How many lines of code so far? A controller for each model isn't
> necessarily a bad thing, and a One True Controller mightn't sound
> too bad until your app has to do more stuff.
>
> Unless you are having problems right now, I would just finish it
> and refactor at the end. Refactoring and redesign is always more
> obvious with a complete app than an incomplete one.

Richard,

  I'm only about 20% of the way through the entire app, but like I said,
it's a signficant app. The tabs aren't tied to models, they just
provide different functionality. For instance, the frame on the left
provides a list, click on an entry and it provides more detail in the
upper right frame, click on something there and you get most detailed
view in bottom right frame.

  Maybe I should just keep plugging away. You are right about getting
the 10,000 ft view when you're done. Just wish I could figure out what
the "right" way is for such a non-trivial app.

Thanks!!

H

--
Posted via http://www.ruby-forum.com/.

I agree with Richard.

I just finished building an app like what you're saying. It has one
main page, and a few div's that have a few tabs which refresh just that
div. I had about 7 controllers, however that was because I had around
7 models, so it made sense.

It's nice to have a controller for every model, but if you only have 1
model (or none) then try going with just 1 controller.

Richard is definitely right about refactoring when you're done... I
wasted a lot of time when I was doing my app and refactoring in the
middle of it.

Good luck, let us know how it goes.

-Ben Lisbakken