Division of the game! 2 applications in modules

I am learning the game! 2 for Scala, based on the background of Django. In Django, I got used to the possibility of a modular project, dividing it in various applications, each of which has its own models, views, controllers and assets. Is playing! allow a similar project unit or is it necessary that everything goes under the app directory?

EDIT I already got the answer, but I will give some examples of using Django applications:

  • Admin is a separate application.
  • An application can be used to define abstract patterns for internationalization. Actual models that need to be internationalized can inherit from them.
  • I created an application that defines the Facebook user model, manages the Facebook API and provides other applications that need it.
  • There is a Django application for creating a sitemap
  • Another Django application allows you to create robots.txt from rules stored in the database so that you can edit robot rules from the admin interface.

etc.

+6
source share
2 answers

Perhaps subprojects are what you need. This would help if you described a little why you want to modulate and that the module should consist of your point of view.

+4
source

Just a small update in the stream. From 2.1 Play, submodule mapping routing is supported:

https://github.com/playframework/Play20/blob/master/documentation/manual/Highlights.md#allow-more-modularization-for-your-projects

+2
source

Source: https://habr.com/ru/post/921916/


All Articles