base-domain
Version:
simple module to help build Domain-Driven Design
62 lines (43 loc) • 1.23 kB
text/coffeescript
{ hyphenize } = require './util'
###*
parent class of model, factory and repository.
gives them @getFacade() method.
###
class Base
###*
get facade
the implementation is in Facade#requre()
###
throw new Error """
Facade is not created yet, or you required domain classes not from Facade.
Require domain classes by facade.getModel(), facade.getFactory(), facade.getRepository()
to attach them getFacade() method.
"""
###*
get facade
the implementation is in Facade#requre()
###
getFacade : ->
throw new Error """
Facade is not created yet, or you required domain classes not from Facade.
Require domain classes by facade.getModel(), facade.getFactory(), facade.getRepository()
to attach them getFacade() method.
"""
###*
ClassName -> class-name
the name must compatible with file name
###
module.exports = Base