How to contribute modules in Play Framework 2.0?

后端 未结 4 893
独厮守ぢ
独厮守ぢ 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: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.

提交回复
热议问题