Packages organisation with MVC design pattern
Posted
by
Oltarus
on Programmers
See other posts from Programmers
or by Oltarus
Published on 2011-10-21T08:22:11Z
Indexed on
2014/05/27
15:59 UTC
Read the original article
Hit count: 296
I have been programming quite a lot now and still can't decide which of these packages hierachies was the best:
package1
Class1Controller
Class1Model
Class1View
package2
Class2Controller
Class2Model
Class2View
or
controller
Class1Controller
Class2Contoller
model
Class1Model
Class2Model
view
Class1View
Class2View
In other words, is it better to apply the MVC design pattern to classes or to packages? Is there any reason to choose one over the other?
My question is language-agnostic, but I'm mostly a Java programmer, if it does any difference.
© Programmers or respective owner