0

I'm developing an application with MVC pattern and I have around 20 classes overall including views, models and controllers. I would like to create packages for models, views and controllers because it makes it easier for me to find them when they're in different packages. But I'm worried if this is a wrong way of using the packages in terms of the java conventions. Any ideas?

2
  • As far as I can tell there isn't really a convention for what goes into a package. Commented Mar 21, 2015 at 6:40
  • Packages help you organize your code so I think it's far from against any conventions. They also allow for package private to be useful. Commented Mar 21, 2015 at 7:03

1 Answer 1

1

That is infact the correct and cleaner approach that ideally should be used in production code. All models should be in a package, all controllers should be in a different package and all view (typically JSP files) would go in WEB/pages folder.

Sign up to request clarification or add additional context in comments.

1 Comment

Well mine is a java application so there isn't any JSP files but yeah I got the idea. Thank you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.