English 中文(简体)
How to contribute modules in Play Framework 2.0?
原标题:

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 an application with third party components & libraries.

With Play 2.0, things are very different.

How does one contribute the so called "modules"?

问题回答

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.

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.

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.

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





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签