-
Notifications
You must be signed in to change notification settings - Fork 0
Installing MEF
MEF is available as a github repository. Include it in your project by following these instructions.
Add this to your appDependencies:
"commons-io" % "commons-io" % "2.3",
"mettle" % "mettle_2.10" % "1.0-SNAPSHOT"
Then set your project to include a resolver:
val main = PlayProject(appName, appVersion, appDependencies, mainLang = JAVA).settings(
resolvers += Resolver.url("Mettle Repository", url("http://ianrae.github.io/snapshot/"))(Resolver.ivyStylePatterns),
checksums := Nil
)
Eventually MEF will add commands in SBT. Until then, use JUnit tests to do code generation
This JUnit test uses the MEF AppScaffoldCodeGenerator class to generate the initial MEF files and directories needed by your app.
This JUnit test uses the MEF PresenterScaffoldCodeGenerator class to generate a new presenter and some of its associated files
This JUnit test uses the MEF DalCodeGenerator class to generate all your DAO objects. Run this every time you modify mef.xml, such as to add a field to a model.
This will create the mef directory structure and some intial files.
app boundaries layer that sits between Play and MEF
mef
core initialization code
dals (daos) database persistence
entities the 'model object in MEF (POJOs)
gen codegen puts stuff here
presenters holds business logic. equivalent to a controller
conf
mef/seed JSON database initialization files
test
mef unit tests (no FakeApplication needed)