MVC Architecture -- How many Controllers do I need?
I have been coding for a while, but mostly scripts and simple
applications. I've moved into a new role where it is all about developing
Web Apps and using a proper MVC architecture, so I am desperately trying
to learn about all that very quickly.
I hope this question is not too similar to "Best Practices for MVC
Architecture" but as I am going through a few different tutorials, I
notice that some have multiple controllers for multiple different things.
How many controllers does a single web app need? As I realize this would
be difficult to answer without an example, I'll provide one:
Application:
1) User logs in.
2) User can do one of three things:
a) Upload a file (stored in a mongodb database with meta data).
b) Search for a file.
c) Log out.
My question is a general one, but I give the example to help out anyone
trying to answer.
No comments:
Post a Comment