How to contribute modules in Play Framework 2.0?

后端 未结 4 889
独厮守ぢ
独厮守ぢ 2020-12-30 23:31

The original Play Framework 1.x had an elegant and simple module management system. Coupled with the Play repository, it was a great way to quickly enhance

相关标签:
4条回答
  • 2020-12-30 23:43

    If you want to create/contribute a module for Play 2.x and don't know where to start check out this two-parts tutorial.

    • Part 1
    • Part 2
    0 讨论(0)
  • 2020-12-30 23:45

    Simply explained, now any SBT project can be a Module. Which is (somehow) an improvement, as you can import existing projects without having to convert them to a specific "Play framework module project" format.

    For example, in Play 1.x you have several modules which provide a lot of the logic inside a jar file that belongs to the "Play Module" project. The source of that jar is not in the same project, which may complicate debugging. With the new system you can simply import the sbt-jar project (no need to create a wrapper project) or, if you are importing a Play project that contains that other project, you can follow the dependencies more easily.

    An additional benefit is that you can reuse full Play projects as Modules. Which means that your Admin module for application X can be created as a full and independent Play project and then reused in Application Z by just adding a line to the Sbt build file. Lots of possibilities in there.

    0 讨论(0)
  • 2020-12-30 23:53

    Quoting Guillaume Bort from the mailing list:

    modules are just standard subprojects.

    [...] now as everything is compiled, your module routes file must define its own route for controllers.Assets.at

    By the way, the route inclusion between modules is not ready yet. Will work on that soon.

    0 讨论(0)
  • 2020-12-31 00:07

    Have a look at https://github.com/playframework/modules.playframework.org/wiki.

    This Play 2.0 appliction will be the official Play Framework modules directory, hosted at modules.playframework.org, and will replace the original Play 1.x modules page.

    It's in an very early stage at the moment and help is certainly needed. Contribution is possible. Check out: https://github.com/playframework/modules.playframework.org

    0 讨论(0)
提交回复
热议问题