Slide 1

Slide 1 text

Composing frontend Web applications with MontageJS montagestudio.com @montagejs ✉ [email protected] Ryan Paul Dev Relations @segphault

Slide 2

Slide 2 text

Ryan Paul @segphault Montage Studio Dev Relations

Slide 3

Slide 3 text

Interchangeable Parts

Slide 4

Slide 4 text

while -- $1" -* 0: c h return x l r t * ! Software Components

Slide 5

Slide 5 text

ASSEMBLE APPLICATIONS by COMPOSING COMPONENTS

Slide 6

Slide 6 text

Framework for frontend web development Ideal for building single-page applications Best suited for modern browsers Open source, under BSD license What is MontageJS?

Slide 7

Slide 7 text

CONTENT > HTML CODE JS JAVASCRIPT DECLARATION {} JSON COMPONENT.REEL 

Slide 8

Slide 8 text

> HTML COMPONENT.REEL  ! !
...
!

Slide 9

Slide 9 text

{} JSON COMPONENT.REEL  Declarative description of a component’s contents Instantiates objects nested inside component Attach components to the page DOM Populate component properties

Slide 10

Slide 10 text

{} JSON "celsiusNumberfield": { "prototype": "digit/ui/number-field.reel", "properties": { "element": {"#": "celsius"} }, "bindings": { "value": {"<->": "([email protected] - 32) / 1.8"} } }, "fahrenheitNumberfield": { "prototype": "digit/ui/number-field.reel", "properties": { "element": {"#": "fahrenheit"}, "value": "32" } }, HTML JSON COMPONENT.REEL 

Slide 11

Slide 11 text

{} JSON "celsiusNumberfield": { "prototype": "digit/ui/number-field.reel", "properties": { "element": {"#": "celsius"} }, "bindings": { "value": {"<->": "([email protected] - 32) / 1.8"} } }, "fahrenheitNumberfield": { "prototype": "digit/ui/number-field.reel", "properties": { "element": {"#": "fahrenheit"}, "value": "32" } }, HTML JSON Prototype: reference to a module ID

Slide 12

Slide 12 text

{} JSON "celsiusNumberfield": { "prototype": "digit/ui/number-field.reel", "properties": { "element": {"#": "celsius"} }, "bindings": { "value": {"<->": "([email protected] - 32) / 1.8"} } }, "fahrenheitNumberfield": { "prototype": "digit/ui/number-field.reel", "properties": { "element": {"#": "fahrenheit"}, "value": "32" } }, HTML JSON Element: Montage ID of DOM element

Slide 13

Slide 13 text

Bindings • Functional Reactive Bindings (FRB) • Propagate changes between object properties • Can be 1-way or 2-way • Bind to other components or regular JavaScript objects FRB FRB

Slide 14

Slide 14 text

{} JSON "celsiusNumberfield": { "prototype": "digit/ui/number-field.reel", "properties": { "element": {"#": "celsius"} }, "bindings": { "value": {"<->": "([email protected] - 32) / 1.8"} } }, "fahrenheitNumberfield": { "prototype": "digit/ui/number-field.reel", "properties": { "element": {"#": "fahrenheit"}, "value": "32" } }, HTML JSON <-> signifies a 2-way binding

Slide 15

Slide 15 text

{} JSON "celsiusNumberfield": { "prototype": "digit/ui/number-field.reel", "properties": { "element": {"#": "celsius"} }, "bindings": { "value": {"<->": "([email protected] - 32) / 1.8"} } }, "fahrenheitNumberfield": { "prototype": "digit/ui/number-field.reel", "properties": { "element": {"#": "fahrenheit"}, "value": "32" } }, HTML JSON @ references an existing object

Slide 16

Slide 16 text

> {} No procedural flow control statements in the HTML
  • Vote
+  Clean, Semantic Markup

Slide 17

Slide 17 text

DEMO

Slide 18

Slide 18 text

"paths": [ { "knots": [ { "previousHandlerPosition": [], "nextDensity": 10, "previousDensity": 10, "knotPosition": [ -761.874, -270, 691.324], "rotateX": 0, "rotateY": 0, "rotateZ": 0, "opacity": 1, "nextHandlerPosition": [ 738.125, -270, -328.675] }, { "knotPosition": [ 1937.09, -270, -1316.049], "nextHandlerPosition": [ 3207.825, -270, -1461.849], "previousHandlerPosition": [ 666.374, -270, -1170.25], "nextDensity": 10, "previousDensity": 10, "rotateX": 0, "rotateY": 0, "rotateZ": 0, "opacity": 1 } ], Flow Declaration

Slide 19

Slide 19 text

HOMOICONICITY A MontageJS component declaration is data that you can manipulate programmatically.

Slide 20

Slide 20 text

Application Authoring You are already using tools, are they the right ones? ! WYSIWYG HTML authoring has not worked ! Visual authoring that exploits MontageJS homoiconicity

Slide 21

Slide 21 text

NO CODE GENERATION

Slide 22

Slide 22 text

DEMO

Slide 23

Slide 23 text

DEMO

Slide 24

Slide 24 text

montagestudio.com/c/jsconfus JOIN THE BETA

Slide 25

Slide 25 text

QUESTIONS?