[nijmegenjs] node.js - 2014/04/25
DESCRIPTION
About mixins, proxies and identifiers in Node.jsTRANSCRIPT
![Page 1: [NijmegenJS] Node.js - 2014/04/25](https://reader034.vdocuments.mx/reader034/viewer/2022052507/5585e1ead8b42a87608b4e36/html5/thumbnails/1.jpg)
Agenda
● Introduction● Creating a framework● [code] Mixins / Proxies● [code] Identifers● [code] Component example
![Page 2: [NijmegenJS] Node.js - 2014/04/25](https://reader034.vdocuments.mx/reader034/viewer/2022052507/5585e1ead8b42a87608b4e36/html5/thumbnails/2.jpg)
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](https://reader034.vdocuments.mx/reader034/viewer/2022052507/5585e1ead8b42a87608b4e36/html5/thumbnails/3.jpg)
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](https://reader034.vdocuments.mx/reader034/viewer/2022052507/5585e1ead8b42a87608b4e36/html5/thumbnails/4.jpg)
Creating a frameworkWhat should it do?
Provide an environment for Rapid Application Development
![Page 5: [NijmegenJS] Node.js - 2014/04/25](https://reader034.vdocuments.mx/reader034/viewer/2022052507/5585e1ead8b42a87608b4e36/html5/thumbnails/5.jpg)
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](https://reader034.vdocuments.mx/reader034/viewer/2022052507/5585e1ead8b42a87608b4e36/html5/thumbnails/6.jpg)
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](https://reader034.vdocuments.mx/reader034/viewer/2022052507/5585e1ead8b42a87608b4e36/html5/thumbnails/7.jpg)
Mixins / Proxies
Code
![Page 8: [NijmegenJS] Node.js - 2014/04/25](https://reader034.vdocuments.mx/reader034/viewer/2022052507/5585e1ead8b42a87608b4e36/html5/thumbnails/8.jpg)
Identifers
[scheme]://[authority]/[package].[path].[name]
Example:com://site/customers.controller.customer
![Page 9: [NijmegenJS] Node.js - 2014/04/25](https://reader034.vdocuments.mx/reader034/viewer/2022052507/5585e1ead8b42a87608b4e36/html5/thumbnails/9.jpg)
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](https://reader034.vdocuments.mx/reader034/viewer/2022052507/5585e1ead8b42a87608b4e36/html5/thumbnails/10.jpg)
Identifers
Code
![Page 11: [NijmegenJS] Node.js - 2014/04/25](https://reader034.vdocuments.mx/reader034/viewer/2022052507/5585e1ead8b42a87608b4e36/html5/thumbnails/11.jpg)
What's next
● First: stable v1 release with examples● Look at ecmascript 6 features● Future: succes ? continue : rewrite for express
![Page 12: [NijmegenJS] Node.js - 2014/04/25](https://reader034.vdocuments.mx/reader034/viewer/2022052507/5585e1ead8b42a87608b4e36/html5/thumbnails/12.jpg)
Homework :)
http://addyosmani.com /resources/essentialjsdesignpatterns/book/
https://github.com/lukehoban/es6features
Subscribe on:
http://javascriptweekly.com/
http://nodeweekly.com/
https://www.destroyallsoftware.com/talks/wat
https://www.destroyallsoftware.com/talks/the-birth-and-death-of-javascripthttp://nodejsreactions.tumblr.com/
http://nooku.org (inspiration)