isomorphic javascript - nodebr

Post on 10-May-2015

559 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

In this talk, David Lojudice Sobrinho talks about Isomorphic Javascript and how to achieve this. Github: https://github.com/Vizir/isomorphic_js Original (with lovely animated gifs): https://dl.dropboxusercontent.com/u/702095/Apresenta%C3%A7%C3%B5es/isomorphic%20javascript%20-%20nodebr.zip

TRANSCRIPT

isomorphic javascript

?

client = server?

client = server

symmetric infra

app

infra

client server

infrastructure?

DOM

MVC

HTML

SQLWebSocke

t

Route

CSS

SMTP

HTTP

NoSQL

OAuth

isomorphic view

document.getElementById('content');

rendr (AirBnB)

backbone + templatehttps://github.com/rendrjs/rendr

react (Facebook)

virtual DOMhttp://facebook.github.io/react/

isomorphic data

mongoObj.insert({text: ‘hello word'});

meteor

mongo APIhttps://www.meteor.com/

pouchDB

couchDB implementationhttp://pouchdb.com/

client != server

asymmetric infra

client serve

MVC angular express

view HTML JSON

persistence

XMLHttpRequest

SELECT * FROM

isomorphic business logic

asymmetric infra

app

infra

client server

infra

mvc != app

separation of concerns

http://socket.io/#how-to-use

single page application

file

http://vimeo.com/89258863

Modular JavaScript With npm and Node Modules

https://www.youtube.com/watch?v=WpkDN78P884

architecture the lost years by Uncle Bob

architecture is not about frameworks and tools

architecture is about use cases

business logic should be isolated from frameworks

business logic should be isolated from the frontend (delivery mechanism)

business logic should be isolated from the backend (persistence mechanism)

business/package.jsonuse_case/model/test/

web/server/

package.jsonroute.jscontrollers/repository/test/

client/package.jsonindex.jsview/controllers/repository/public/test/

business/web/

server/client/

rest-api/cli/irc/voice/{{whatever}}/

https://github.com/qertoip/guru_watch/wiki/Real-World-Concerns

SHOW IT!

usecase

models

controller

repository

view

Business

Infra

Client & Server

SalvarCliente

Use CaseCliente

ClienteControll

er(angular)

ClienteReposito

ry

index.html

Infra(browse

r)

Client

DOM $HTTP

Business

SalvarCliente

Use CaseCliente

ClienteControll

er(express)

ClienteReposito

ryJSON

Server

HTTP DB

Cliente(server)

Business

Infra(node.j

s)

client = server

X

cliente != server

david lojudice sb@dalssoftdavid@vizir.com.br

https://github.com/Vizir/isomorphic_js

top related