View pres.rb
1 2 3 4 5 6 7 8 9 10
# given these models
 
class Study < AR::Base
class Site < AR::Base
class Visit < AR::Base
end
end
end
 
Study::Site::Visit
View locking.md

Data referenced in code

Sometimes data is referenced in code, for example a dynamically created "tab" has a key (it's unique id).

If we want to fetch that tab in our code, we do Tab.find_by_key('organisations'). This will break if a user deletes this tab.

Locking some fields of an entity should solve this.

EntityLock(entity_class, entity_uuid, attributes, reason)

View search.md

Low level search

Updating the index

When a resource is CRUD'd it must update the Search index:

Search.put(:study, attributes) # create, update
Search.rm(:study, id) # delete
View auth.md

Task Orientated Authorization

Actor <-> Role <-> Task

  • Not a CRUD only solution
  • Tasks can describe anything
  • Roles and/or Policies
  • Actors are typically users, but can be any object
  • Actors are not polluted with authentication concerns
  • Tasks can be added at runtime
View gudelines.md

Guidelines

Be pragmatic, this is a guide.

Value

Engage with Customer / Domain experts

Encourage them to describe their process and root problem.

View data_grid.md

DataGrid: build cells, rows and columns

Cells referenced by x,y (like spreadsheet)

Features:

  • Cells with conditional formatting, e.g. cell is red is value over threshold
  • Cells with formula, e.g. SUM(A5-A6)

Table has default cell attributes, e.g. height/width

View gist:8949744ef2cc11d50cd0
1 2 3 4 5 6 7 8 9
-input1->
-event4+5-> [Process1] -event1-> [Process2] -event2-> [process4] -event4->
-event1-> [Process3] -event3-> [process5] -event5->
 
Each process could be a pool of processes. Each process can use the Actor model.
 
Events need to include a uuid so inputs and results (event4 + event5) can be matched up.
 
Event1 is consumed by two different processes break up different processing of input.
View gist:8c56096946dc02a192a1
1
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq/9WdnAcWFW720c/kK2Kyo21SD0z2U0xm11cLKdPofxwKvb97H0m+URLAZhsbJ232R7sfQuUfgGSM6Spg+iv5qyo2nEY3ksyGYn5xMfkS1tIkmP+Q69XoEmNjBh3Pon0X0AITi9QGbRdQ/pYoYpNTcjePPC/1dOqnl/HWNuUyx/DglnFnUoedQAufTLsnTV3eySc9tYFUEjYUGrX+EDcAD+Fg2VmHLhGItRe4lnCy2MSbDFeGI8N7te4ZnwuXp6fHIPSDn74UdDRWAdcrtu99ZEvieMA1ONf3p21w/T2QdiWBUokXv6kmkq8BMucmGXxtl7tZt3QMYoL8D8PxNcM7Q== kris
View events.rb
1 2 3 4 5 6 7 8 9
# initializer
$event_store = EventStore.new
event_store.subscribe(StudyDenormalizer.new, prefix: ‘on’)
 
# controller
 
# push a new event (write database)
uuid = UUID.new
event_store.push(aggregate_id: uuid, event:StudyCreated’, data: { … })
View boundaries.md

Boundaries

Business goals (Requirements)

The goals of the business

Service (User Interface)

Implements a bounded context Exposes resources

Something went wrong with that request. Please try again.