Hi,
Some use of multiple controllers is probably a good idea. How you
do it is a question of design, code sharing, URL space, etc., and
will vary from application to application. I suspect most of us have
one controller per model, related model group, or function group.
Also, take a look at putting controllers in submodules: Page 191 of
AWDwR. This allows you to use inheritance to share code, but
partition your controllers so they are in ''subdirectories'' in
the URL
space.
The beauty of Rails is that it''s not that painful to scrap code.
So, start off with whatever works, and as they say in hotels, please
make full use of the facilities.
Mike
On 24 Oct 2005, at 15:23, Stefan Foulis wrote:
> I''m new to ruby and rails. I used to code with php and java
> (WebObjects). Finally I found a language with a framework that
> nicely abstracts the datamodel with full funtionality on a
> _sensible_ level at a high level of consistency. Enough of that, we
> all know ruby is great ;-)
>
> I followed "Agile Web Development with Rails". In the depot
> application there is one controller "admin" for the backend and
> another "store" for the public users.
> I just started coding my own application with a much more complex
> model than depot. If I create just one controller for all the
> backend administration, that one controller may turn out cluttered
> with far to many methods (like list_customers, list_contacts,
> list_projects,... instead of just one list). How should organize
> the code?
> Multiple controllers: store_admin, project_admin, billing_admin, ... ?
> Or is there some other way I''m not aware of?
>
> thanks
> stefan
>
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>