[nijmegenjs] node.js - 2014/04/25

12
Agenda Introduction Creating a framework [code] Mixins / Proxies [code] Identifers [code] Component example

Upload: jvdheijden

Post on 21-Jun-2015

224 views

Category:

Internet


6 download

DESCRIPTION

About mixins, proxies and identifiers in Node.js

TRANSCRIPT

Page 1: [NijmegenJS] Node.js - 2014/04/25

Agenda

● Introduction● Creating a framework● [code] Mixins / Proxies● [code] Identifers● [code] Component example

Page 2: [NijmegenJS] Node.js - 2014/04/25

Me

● Joep van der He ijden● 24 years old● Graduated 2012

Software EngineeringFontys University

● Work:

● Java (Android)● Javascript (Angular.js,

Node.js, others stuf)● PHP (Joom la/Nooku)

https://g ithub .com /K laasvaak

Page 3: [NijmegenJS] Node.js - 2014/04/25

Creating a frameworkWhy?

Everyone should (try to) make a framework (or contribute)

Missing the magic in existing frameworks

Page 4: [NijmegenJS] Node.js - 2014/04/25

Creating a frameworkWhat should it do?

Provide an environment for Rapid Application Development

Page 5: [NijmegenJS] Node.js - 2014/04/25

Creating a frameworkWhat do others do?

● MVC● ORM● Router (but you have to write your own routes)

● Hooks

Page 6: [NijmegenJS] Node.js - 2014/04/25

Creating a frameworkWhat to do?

● MVC● ORM● Router (without having to write your own routes)

● Hooks● Component driven● Stimulate reuse of code (mixins)

● Magic!● JWT (https://tools.ietf.org/html/draft-jones-json-web-token-10)

Page 7: [NijmegenJS] Node.js - 2014/04/25

Mixins / Proxies

Code

Page 8: [NijmegenJS] Node.js - 2014/04/25

Identifers

[scheme]://[authority]/[package].[path].[name]

Example:com://site/customers.controller.customer

Page 9: [NijmegenJS] Node.js - 2014/04/25

Identifers

Get Objects by identifer with fallbacks

Example:com://site/customers.controller.customer

Result: BaseController or CustomerController

Page 10: [NijmegenJS] Node.js - 2014/04/25

Identifers

Code

Page 11: [NijmegenJS] Node.js - 2014/04/25

What's next

● First: stable v1 release with examples● Look at ecmascript 6 features● Future: succes ? continue : rewrite for express