Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Building a Web App in 100% JavaScript

Building a Web App in 100% JavaScript

We all love and adore JavaScript when we use it on the front-end of our web apps – why not use it in the back-end as well? That’s like having your cake and eating it too! Prepare to have your mind blown, because in this presentation we will create an entire web application using just (or well, mostly) JavaScript. Learn how to create a fast and flexible back-end utilizing the popular Node.js library and see how it ties in with your UI. From accessing the database to handling interactions with the front-end – we’ll do it all!

For full source code of the project and the slides, written in Reveal.js, jump over to my GitHub: https://github.com/bergenhem/talks/tree/master/building-web-apps-in-js

Carl Bergenhem

April 22, 2013
Tweet

More Decks by Carl Bergenhem

Other Decks in Technology

Transcript

  1. BUILDING A WEB APP IN 100% JAVASCRIPT USING NODE.JS, EXPRESS.JS,

    AND KENDO UI - Carl Bergenhem @carlbergenhem
  2. NPM

  3. SUPER EASY TO USE n p m i n s

    t a l l [ p a c k a g e n a m e ]
  4. QUICK NODE.JS SERVER v a r h t t p

    = r e q u i r e ( ' h t t p ' ) ; h t t p . c r e a t e S e r v e r ( f u n c t i o n ( r e q , r e s ) { r e s . w r i t e H e a d ( 2 0 0 , { ' C o n t e n t - T y p e ' : ' t e x t / p l a i n ' } ) ; r e s . e n d ( ' H e l l o W o r l d \ n ' ) ; } ) . l i s t e n ( 1 3 3 7 , ' 1 2 7 . 0 . 0 . 1 ' ) ;
  5. PASTE THE FOLLOWING { " n a m e "

    : " S a m p l e A p p " , " d e s c r i p t i o n " : " S a m p l e A p p D e s c r i p t i o n " , " v e r s i o n " : " 0 . 0 . 1 " , " p r i v a t e " : t r u e , " d e p e n d e n c i e s " : { " e x p r e s s " : " 3 . x " } }
  6. QUICK EXPRESS.JS SETUP v a r e x p r

    e s s = r e q u i r e ( ' e x p r e s s ' ) ; v a r a p p = e x p r e s s ( ) ; a p p . g e t ( ' / r e q u e s t ' , f u n c t i o n ( r e q , r e s ) { c o n s o l e . l o g ( ' W e g o t a r e q u e s t ! ' ) ; } ) ; a p p . l i s t e n ( 3 0 0 0 ) ; c o n s o l e . l o g ( ' L i s t e n i n g o n p o r t 3 0 0 0 . . . ' ) ;
  7. VERY EASY INSTALL! n p m i n s t

    a l l m o n g o o s e
  8. QUICK KENDO SAMPLE < u l i d = '

    m y M e n u ' > < l i > B o o k s < / l i > < l i > V i d e o G a m e s < / l i > < l i > M o v i e s < / l i > < u l > < l i > T h e B i g L e b o w s k i < / l i > < l i > T h e M a t r i x < / l i > < / u l > < / l i > < / u l > < s c r i p t > < / s c r i p t > $ ( f u n c t i o n ( ) { $ ( ' # m y M e n u ' ) . k e n d o M e n u ( ) ; } ) ;
  9. EASY TO INSTALL n p m i n s t

    a l l - g n o d e - i n s p e c t o r
  10. EASY TO USE n o d e - i n

    s p e c t o r &