Tide & Marina

Nicolas Petton

petton.nicolas@gmail.com

About me

Nicolas Petton

petton.nicolas@gmail.com

Leaving soon 😓

Amber

A Smalltalk

  • Core libraries
  • Web libraries
  • Development environment

Compiles to JavaScript

Written in itself

Why Tide? (A bit of context)

REST doesn't scale well in complexity

Amber & Pharo don't have a communication protocol

Seaside is aging

Amber ♥ Pharo

JSON

  • data is serialized in JSON objects
  • actions are serialized as callback keys

Not yet ready for prime-time!

Architecture of Tide

Presenters #1

Expose Pharo Objects to Amber

Presenters #2

MyCounter >> increase
    <action>
    count := count + 1

MyCounter >> decrease
    <action>
    count := count - 1

MyCounter >> count
    <state>
    ^ count

presenter := MyCounter new asPresenter. "=> a TDPresenter"

Presenters #3

{
  "actions":{
    "increase":"/counter?_callback=rewjkl",
    "decrease":"/counter?_callback=rewiof",
  },
  "state":{
    "count":0
  }
}

Presenters #4

Default presenters for:

  • Models TDModelPresenter
  • Literals
  • Collections

Proxies #1

  • Created on the Amber side
  • Built from presenter data

Proxies #2

  • Use promises for async communication
  • Keep the flow sequential

Proxies #3

proxy := TDClientProxy on: '/counter'.
proxy connect

Proxies #4

proxy count. "=> 0"

proxy increase then: [ proxy count ]. "=> 1"

proxy 
    decrease;
    decrease;
    then: [ proxy count ]. "=> -1"

5 timesRepeat: [ proxy increase ].

Demo

Marina

A new CMS

Why (yet) another CMS?

Built on top of Tide

Uses Pillar

Stable

Fast

Simple design

Use Mongodb

Demo

Links