+ All Categories
Home > Documents > Tide - The missing web framework

Tide - The missing web framework

Date post: 19-Jun-2015
Category:
Upload: esteban-lorenzano
View: 1,767 times
Download: 1 times
Share this document with a friend
Description:
Tide is an Amber-Pharo bridge to build web applications.
Popular Tags:
30
Tide The missing web framework https://github.com/tide-framework
Transcript
Page 1: Tide - The missing web framework

TideThe missing web framework https://github.com/tide-framework

Page 2: Tide - The missing web framework

A framework by…

Nicolas Petton

Esteban Lorenzano

Damien Cassou

.. while working in the Pharo team at INRIA - RMoD

Page 3: Tide - The missing web framework

Esteban Lorenzano Pharo core developer

INRIA - RMoD http://smallworks.eu

Page 4: Tide - The missing web framework

Yet another web framework?

Page 5: Tide - The missing web framework

The problem

• Amber + REST?

• Seaside?

Page 6: Tide - The missing web framework

Amber + REST

• Request nightmare

• Leads to bad design (if not super-careful)

Page 7: Tide - The missing web framework

A small example

HeroView HeroModel

name: 'Groot'

Ok

Page 8: Tide - The missing web framework

A small example

HeroView HeroModelHeroView HeroModel

name: 'Groot'

OkNOPE!

Page 9: Tide - The missing web framework

A small exampleHeroView HeroModel

heroId: ID name: 'Groot'

Ok

HeroService

findHeroNamed: 'NotGroot'

ID, name, ...

findById: Id

hero

name: 'Groot'

Ok

HeroDAO

findByName: 'NotGroot'

hero

Page 10: Tide - The missing web framework

Seaside

• It is great!

- but aging…

- and not very well prepared for “Web 2.0”

Page 11: Tide - The missing web framework

We can do better

Page 12: Tide - The missing web framework

The problem

• How to do MVC?

• How to expose domain without adding unnecessary layers?

• How to keep the “seaside feeling” in a fat client-server application?

Page 13: Tide - The missing web framework

How?

• Amber + Pharo

• Through a communication bridge serialising JSON

Page 14: Tide - The missing web framework

Client side

• Proxies

• Futures (kinda)

- Keeps the flow sequential

- It is still not synchronic, but works most of the time

Page 15: Tide - The missing web framework

Server side

• Exposing objects

- <action>

- <state>

• Literals, Collections, Models

Page 16: Tide - The missing web framework

Demo

Page 17: Tide - The missing web framework

Counter class

HeroLair>>#heroes ^ heroes !HeroLair>>#newHero ^ Hero new !HeroLair>>#addHero:aHero heroes add: aHero !!

Page 18: Tide - The missing web framework

Counter presenterHeroLair>>#heroes <state> ^ heroes !HeroLair>>#newHero <action> ^ Hero new !HeroLair>>#addHero:aHero <action> heroes add: aHero !!

Page 19: Tide - The missing web framework

Counter client

lair := TDProxyClient on: ‘/lair’. lair connect. !lair heroes. “[]” lair newHero then: [ :hero | lair addHero: (hero name: ‘Groot’) ]; then: [ lair heroes collect: #name ]. “[ ‘Groot’ ]”

Page 20: Tide - The missing web framework

MarinaCMS for the simple minds

Page 21: Tide - The missing web framework

Yet another CMS?

Page 22: Tide - The missing web framework

The problem

• Pier is HUGE

• … and hard to learn

Page 23: Tide - The missing web framework

How?• Uses only already existing projects (we do not

reinvent the wheel…)

- On top of Tide (duh!)

- User management: Mozilla persona

- Syntax: Pillar (same as Pier)

- Persistency: Voyage

Page 24: Tide - The missing web framework

Features• Suitable for small/simple pages

• Very simple

• Stable

• Fast

• Can accept plugins

- For now, just a basic blog (Disqus for comments)

Page 25: Tide - The missing web framework

Demo

Page 26: Tide - The missing web framework
Page 27: Tide - The missing web framework
Page 28: Tide - The missing web framework
Page 29: Tide - The missing web framework

Install TidePre-requisites: node, npm, bower, pharo

$ git clone [email protected]:tide-framework/tide.git $ cd tide && bower install && cd .. $ pharo Pharo.image eval —save “ Gofer it repository: ‘filetree://tide’; package: ‘BaselineOfTide’; load. BaselineOfTide load”

TDServer startOn: 7777.

… and open your browser :)

Page 30: Tide - The missing web framework

Download it today!

https://github.com/tide-framework

Thanks!!Esteban Lorenzano - 2014


Recommended