Module: Rddd::Services

Defined in:
lib/rddd/services/service_bus.rb,
lib/rddd/services/service.rb,
lib/rddd/services/remote_service.rb,
lib/rddd/services/service_factory.rb,
lib/rddd/services/transports/factory.rb,
lib/rddd/services/transports/http_json.rb

Overview

Service bus is the central entry point for execution of service within the domain layer. Unless you have a very good reason, services should not be instantiated directly outside the domain layer, as you leave the flexibility on domain itself to choose the correct implementation.

## Usage

Service bus as the module could be included to any object which intend to call services within the domain layer.

## Example

class ProjectsController

include ServiceBus

def create
  execute(:create_project, params) do |errors|
    render :new, :errors => errors
    return
  end

  redirect_to projects_path, :notice => 'Project was successfully created!'
end

end

Defined Under Namespace

Modules: ServiceBus, Transports Classes: RemoteService, Service, ServiceFactory