server-side javascript for the rest of us

Post on 15-Jan-2015

2.290 Views

Category:

Technology

1 Downloads

Preview:

Click to see full reader

DESCRIPTION

Exploring patterns for using server-side JavaScript along side existing (non-JavaScript) application architectures. In other words, how to use *some* SSJS without rewriting your entire app in JS.

TRANSCRIPT

Server-side JavaScript For The Rest Of Us

Kyle Simpson@getify

http://getify.me

Server-side JavaScriptnode.jsMiddle-End (BikechainJS)

Pep Talk

Wait... you're not using

server-side JavaScript in all your apps?

You haven't replaced

Apache with Node.js yet?

You still write PHP/Java/RoR/

Python/C# code on the

server?

It's OK. You're just like the rest of us.

Server-side JavaScript

Cheat Guide

It's all been done before

JavaScript:engine !=

environment

You still need a web server*

*unless your SSJS environment is a web server

node.js is a special type of

JavaScript environment

socket/network/web

server + application

server

Alternate usage patterns

reverse proxy

https://github.com/nodejitsu/node-http-proxy

backend web service

php.js?http://

phpjs.org

side (bypass) service

example: http://goLook

.athttp://jsno.de/presentations/

jsconf2011/#slide6

Middle-End Architecture

In between the front-end and the

back-end is...

the Middle-End

Middle-End?

templating, URL routing, data

validation, data formatting, ajax,

caching, cookies/headers

Why?

The Middle-End is meant to bring order

to the general dis-order of today's web stack architectures

CVC (vs. MVC)

CVC (Clients-Views-Controllers) is an

alternate pattern for web application architecture that

leverages the Middle-End

CVC Middle-End is not a framework or

library...it's the removal of

abstractions to expose and control

what's already there... better

Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.

— Antoine de Saint-Exupery

Middle-End patterns

Wordpress (or any CMS)

http://wordpress.org/extend/plugins/json-api/

BikechainJS

http://bikechainjs.com

http://shortie.me

https://github.com/getify/shortie.me

Server-side JavaScript

FTW

Questions?

http://

nodejs.org

Kyle Simpson@getify

http://getify.me

http://bikechainjs.com

http://middleend.com

http://start.middleend.com

top related