You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Simpla's SDK currently has some MVP work around internal states built. We need to finalise this interface, document it, and make it public. We also need to settle on a new data schema that is easier to reason about.
What we have so far:
State properties 'editable': Boolean (whether Simpla is in edit mode), authenticated: Boolean (whether the Simpla client has a logged in user).
State getter getState(state: String) : Multiple
State observer observeState(state: String, callback: Function) : Function
What we need to finalise
We want to implement a 'data': Object state which would hold the entire set of Simpla data on a page, to make reasoning about content both at an element level and for project developers much easier. Need to finalise how this works - is it primary (CRUD methods operate only on the buffer, then save() sets back to the API) or secondary (CRUD methods talk directly to the API, and update the buffer on the way through)?
Add observe() method for observing content changes, makes authoring Simpla elements trivial.
Data schema. The current 'anything goes' approach was fine for early development, but we're already running into inconsistencies and dodgy outcomes - eg: getting a block should not return an array, when getting a leaf node returns an object. All UIDs should have standardised metadata.
The text was updated successfully, but these errors were encountered:
After much discussion Simpla's SDK is going to be buffer-first, which means that get() / set() / etc will talk directly to the data state to get and set data, and it will talk to the API if need be. Then calling save() will PUT those changes in the buffer back to the API.
Simpla's SDK currently has some MVP work around internal states built. We need to finalise this interface, document it, and make it public. We also need to settle on a new data schema that is easier to reason about.
What we have so far:
'editable': Boolean
(whether Simpla is in edit mode),authenticated: Boolean
(whether the Simpla client has a logged in user).getState(state: String) : Multiple
observeState(state: String, callback: Function) : Function
What we need to finalise
'data': Object
state which would hold the entire set of Simpla data on a page, to make reasoning about content both at an element level and for project developers much easier. Need to finalise how this works - is it primary (CRUD methods operate only on the buffer, thensave()
sets back to the API) or secondary (CRUD methods talk directly to the API, and update the buffer on the way through)?get
/set
/remove
methodsobserve()
method for observing content changes, makes authoring Simpla elements trivial.The text was updated successfully, but these errors were encountered: