model view controller - Building a Play framework module for sharing a data layer among several services -
keeping notion of soa in mind, intent provide several different services, leverage same data model. imagine poker application - may have following services:
- game frontend
- administrative frontend
- player rank / leaderboard service
- player finances service
- bank integration service
- ...
all of these services can leverage same model (perhaps providing additional model information neccessary).
in play! framework, possible me externalize data model, maintain benefits gain using play. example, runtime re-compilation.
modules seem might serve job, there little documentation them, , examples given suggest opposite paradigm - services modules, , core play application pulls in features.
any guidance appreciated.
it's hard true soa style using play. because play not framework - it's web platform providing services right httprequest database persistence , not in isolation.
in case, if have externalize data-layer- suggest try spring module. spring should take care of persistence, business logic , encapsulate in service interfaces.
in play app, controller depends on these exposed service interfaces. spring services should in-dependent on play features (be validation or jpa persistence etc. i.e. no imports)
the objective - tommo if required, should able use mvc framework (spring mvc, struts etc) , utilize same services.
Comments
Post a Comment