a reactive full stack javascript frameworkfiles.meetup.com/18382866/meteor.pdfmeteor is an awesome...

15
A Reactive Full Stack Javascript Framework

Upload: others

Post on 19-Mar-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A Reactive Full Stack Javascript Frameworkfiles.meetup.com/18382866/Meteor.pdfMeteor is an awesome platform, but its canonical front-end is not very flexible. Asteroid gives the possibility

A Reactive Full Stack Javascript Framework

Page 2: A Reactive Full Stack Javascript Frameworkfiles.meetup.com/18382866/Meteor.pdfMeteor is an awesome platform, but its canonical front-end is not very flexible. Asteroid gives the possibility
Page 3: A Reactive Full Stack Javascript Frameworkfiles.meetup.com/18382866/Meteor.pdfMeteor is an awesome platform, but its canonical front-end is not very flexible. Asteroid gives the possibility
Page 4: A Reactive Full Stack Javascript Frameworkfiles.meetup.com/18382866/Meteor.pdfMeteor is an awesome platform, but its canonical front-end is not very flexible. Asteroid gives the possibility

What do we mean by “A Reactive Full Stack

Javascript Framework”?

Page 5: A Reactive Full Stack Javascript Frameworkfiles.meetup.com/18382866/Meteor.pdfMeteor is an awesome platform, but its canonical front-end is not very flexible. Asteroid gives the possibility

Reactive Programming Defined

• In computing, reactive programming is a programming paradigm oriented around data flows and the propagation of change. This means that it should be possible to express static or dynamic data flows with ease in the programming languages used, and that the underlying execution model will automatically propagate changes through the data flow. It’s similar to the observer pattern.

• Asynchronous Programming with Observables.

Page 6: A Reactive Full Stack Javascript Frameworkfiles.meetup.com/18382866/Meteor.pdfMeteor is an awesome platform, but its canonical front-end is not very flexible. Asteroid gives the possibility
Page 7: A Reactive Full Stack Javascript Frameworkfiles.meetup.com/18382866/Meteor.pdfMeteor is an awesome platform, but its canonical front-end is not very flexible. Asteroid gives the possibility

Imperative Programming

• When the page loads you query the API using an async promise to pull in your list of items.

• When an item is added, updated or deleted, you execute a function to update your list and post to the API.

• Others sharing the list only see the changes if they refresh or if an additional request is made to reload the data.

Page 8: A Reactive Full Stack Javascript Frameworkfiles.meetup.com/18382866/Meteor.pdfMeteor is an awesome platform, but its canonical front-end is not very flexible. Asteroid gives the possibility

Reactive Programming• When the page loads you still query the API using an async promise, but

instead of returning just the data you also return a method which has a web socket sender and listener for the API attached which communicates with a web socket server.

• Now when an item is added, updated or deleted, you update your list and the list object itself automatically sends the web socket update.

• In addition, the list object is also listening for web socket messages, so if someone else updates the list it receives the message and updates itself.

• This is essentially what Meteor is designed to help you accomplish through its javascript library.

Page 9: A Reactive Full Stack Javascript Frameworkfiles.meetup.com/18382866/Meteor.pdfMeteor is an awesome platform, but its canonical front-end is not very flexible. Asteroid gives the possibility

Other Reactive JS Libraries• RxJS, the Reactive Extensions library for "composing asynchronous [...]

programs using observable sequences”.

• ReactiveX, an API for asynchronous programming with observable streams.

• ProAct.js, a powerful Reactive Programming JavaScript library, integrating both the functional and object-oriented implementation approaches.

• React, a JavaScript library written by Facebook for creating user interfaces.

• Firebase, a full stack reactive platform.

Page 10: A Reactive Full Stack Javascript Frameworkfiles.meetup.com/18382866/Meteor.pdfMeteor is an awesome platform, but its canonical front-end is not very flexible. Asteroid gives the possibility

Full Stack Framework• Write one code base using a single

language.

• Meteor runs the server code and delivers the client app (HTML/CSS/JS) to the browser.

• Meteor provides the Reactive framework across the client and server.

• Optimistic UI

• Database Everywhere (with permissions).

• Data is automatically synchronized between the server and all clients.

Page 11: A Reactive Full Stack Javascript Frameworkfiles.meetup.com/18382866/Meteor.pdfMeteor is an awesome platform, but its canonical front-end is not very flexible. Asteroid gives the possibility

Meteor Architecture

Page 12: A Reactive Full Stack Javascript Frameworkfiles.meetup.com/18382866/Meteor.pdfMeteor is an awesome platform, but its canonical front-end is not very flexible. Asteroid gives the possibility

Modularity

• Works with Angular, Ember, Reactive and other frameworks.

• Use only the pieces you like.

Page 13: A Reactive Full Stack Javascript Frameworkfiles.meetup.com/18382866/Meteor.pdfMeteor is an awesome platform, but its canonical front-end is not very flexible. Asteroid gives the possibility

Asteroid

Meteor is an awesome platform, but its canonical front-end is not very flexible. Asteroid gives the possibility to connect to a Meteor backend with any JS app.

• Make any existing application reactive

• Use any front-end framework you want with Meteor

• Develop browser extensions backed by Meteor

Page 14: A Reactive Full Stack Javascript Frameworkfiles.meetup.com/18382866/Meteor.pdfMeteor is an awesome platform, but its canonical front-end is not very flexible. Asteroid gives the possibility

ToDo App with Meteor• Creating an app • Templates • Collections • Forms and events • Update and remove • Deploying your app • Running on mobile • Temporary UI state • Adding user accounts • Security with methods • Publish and subscribe • Next steps

Page 15: A Reactive Full Stack Javascript Frameworkfiles.meetup.com/18382866/Meteor.pdfMeteor is an awesome platform, but its canonical front-end is not very flexible. Asteroid gives the possibility

Try out our demo app (Angular and Meteor) for suggesting meeting topics.

http://renojs.meteor.com