c# - Sharing the business layer between applications in Scala -
i have business logic (domain services/model) want share between 2 type of projects. 1 mvc web application , terminal/console application.
in .net world create solution @ least 3 projects (each project compiled dll file).
- services (library)
- web (mvc web application)
- console (console application)
then reference services
web
, console
projects. way web
, console
applications using same services
layer , can run separated.
now want same work in scala. i'm looking best patterns , practices such work.
more over, idea move models the web
application services
, use models in console
app? i'm using models classes both domain , mvc models.
note: don't know if it's important say, use play web application framework.
- create subprojects a, b, c , move business logic d.
- make a, b, c depend on jar artifact produced result of d. (take closer on classpath dependencies section)
- ????
- profit!
Comments
Post a Comment