SlideShare une entreprise Scribd logo
1  sur  24
Télécharger pour lire hors ligne
Quinta-feira, 22 de Agosto de 13
Agenda
Node.js
About
Benefits
Installing
NPM
Express
About
Installing Express & Generate an app
Jade & Stylus
Quinta-feira, 22 de Agosto de 13
about me
15 years programming experience
Software Developer and MSSQL DBA @ Com-
UT/Sedimap
using Node.js about 3 years
Quinta-feira, 22 de Agosto de 13
NODE.JS
Quinta-feira, 22 de Agosto de 13
Node -About
Node.js is a platform to build fast and scalable
network applications
we know this can be very painful and hard in some languages
Quinta-feira, 22 de Agosto de 13
Node -About
It is built on GoogleV8 JavaScript engine, the libuv
platform abstraction layer and a core library, which is
itself primarily written in JavaScript.
perhaps the best and faster JavaScript engine...
Quinta-feira, 22 de Agosto de 13
Node -About
event-driven
defined as an application technique in which the
application has a main loop
non-blocking I/O
is a form of I/O processing that permits other processing to
continue before the last transmission has finished
Quinta-feira, 22 de Agosto de 13
Quinta-feira, 22 de Agosto de 13
Node - Benefits
Small Core
Multi-Platform
implements some CommonJS specifications
Easy to use, easy to start
JavaScript on server, JavaScript on client
Single thread simplifies concurrency
Package Module (NPM)
Community
Great Modules (like underscore, async, express, request, etc...)
Rapidly changing, e.g., updating in shortly time
Quinta-feira, 22 de Agosto de 13
Installing Node
Go to http://nodejs.org/
Windons and Mac OS X click on “install”
Linux, using package manager
Gentoo, Ubuntu, Fedora, etc...
Quinta-feira, 22 de Agosto de 13
Installing Node(Cont.)
Install from source code
wget http://nodejs.org/dist/v0.10.x/node-v0.10.x.tar.gz
tar xzf node-v0.10x.tar.gz
./configure
make
make test
make install
node --version
Quinta-feira, 22 de Agosto de 13
NPM
How to find a module
npm search express
https://npmjs.org/
Some attentions you need to take before install a module
were updated relatively recently
have github repositories linked
have READMEs with good documentation
have at least some number of people instaling them every
week
are liberally licensed (feel free to use)
Quinta-feira, 22 de Agosto de 13
Installing a module
Global Mode
will install in /usr/local/lib/node_modules
is more suited for modules that should always be available
Local Mode
NPM default mode
“your application path”/node_modules
is ideal for installing the modules your applications depends
don’t affect others applications that you have installed
use always this mode is more safe
Quinta-feira, 22 de Agosto de 13
Let’s Play
with a
TCP Server
Chat
Quinta-feira, 22 de Agosto de 13
EXPRESS
Quinta-feira, 22 de Agosto de 13
About
is a minimal and flexible web application
framework
provide a robust set of features for building
single, multi-page and hybrid web applications
is based on the Connect middleware
and implements MVC
Quinta-feira, 22 de Agosto de 13
Installing & Generate an
app
sudo npm install -g express
express --sessions --css stylus myapp
cd myapp & npm install
node app
Quinta-feira, 22 de Agosto de 13
Express - app
package.json (some app
settings)
app.js (launch app)
public/*
routes/*
views/*
Quinta-feira, 22 de Agosto de 13
Jade
is a high performance template engine
implemented with JavaScript for node
Quinta-feira, 22 de Agosto de 13
H
T
M
L
J
A
D
E
Quinta-feira, 22 de Agosto de 13
Stylus
robust, feature-rich CSS language built
for node
providing an efficient, dynamic and
expressive way to generate CSS
Quinta-feira, 22 de Agosto de 13
CSS
Stylus
Quinta-feira, 22 de Agosto de 13
Some Resources
Node.JS
http://nodeguide.com/ (Felix Geisendörfer)
https://github.com/maxogden/art-of-node (Max Ogden)
http://nodetuts.com(Pedro Teixeira)
Express
http://expressjs.com/
http://www.senchalabs.org/connect/
http://learnboost.github.io/stylus/
http://jade-lang.com/
Quinta-feira, 22 de Agosto de 13
Quinta-feira, 22 de Agosto de 13

Contenu connexe

Tendances

Daniel Steigerwald: EsteJS - javascriptové aplikace robusně, modulárně a komf...
Daniel Steigerwald: EsteJS - javascriptové aplikace robusně, modulárně a komf...Daniel Steigerwald: EsteJS - javascriptové aplikace robusně, modulárně a komf...
Daniel Steigerwald: EsteJS - javascriptové aplikace robusně, modulárně a komf...Develcz
 
Work smart with Gutenberg - Fellyph Cintra
Work smart with Gutenberg - Fellyph CintraWork smart with Gutenberg - Fellyph Cintra
Work smart with Gutenberg - Fellyph CintraFellyph Cintra
 
[Nuxeo World 2013] XML EXTENSION POINT COMPLETION IN NUXEO IDE - SUN TAN, SERLI
[Nuxeo World 2013] XML EXTENSION POINT COMPLETION IN NUXEO IDE - SUN TAN, SERLI[Nuxeo World 2013] XML EXTENSION POINT COMPLETION IN NUXEO IDE - SUN TAN, SERLI
[Nuxeo World 2013] XML EXTENSION POINT COMPLETION IN NUXEO IDE - SUN TAN, SERLINuxeo
 
What's New in ASP.NET Core 3
What's New in ASP.NET Core 3What's New in ASP.NET Core 3
What's New in ASP.NET Core 3Andrea Dottor
 
Node Js Websocket Js Meetup Slides
Node Js Websocket Js Meetup SlidesNode Js Websocket Js Meetup Slides
Node Js Websocket Js Meetup SlidesMakoto Inoue
 
NodeJS and MEAN stack - II SorocabaJS
NodeJS and MEAN stack - II SorocabaJSNodeJS and MEAN stack - II SorocabaJS
NodeJS and MEAN stack - II SorocabaJSVitor Casadei
 
Vuejs and Web components - current state
Vuejs and Web components - current stateVuejs and Web components - current state
Vuejs and Web components - current stateMikhail Kuznetcov
 
Front-end tools in java webapps
Front-end tools in java webappsFront-end tools in java webapps
Front-end tools in java webappsbenfante
 
Using PhantomJS to keep product screenshots up to date
Using PhantomJS to keep product screenshots up to dateUsing PhantomJS to keep product screenshots up to date
Using PhantomJS to keep product screenshots up to dateMatthias Burtscher
 
Running Java In Smalltalk
Running Java In SmalltalkRunning Java In Smalltalk
Running Java In SmalltalkESUG
 
Export pdf with puppeteer
Export pdf with puppeteerExport pdf with puppeteer
Export pdf with puppeteerKnoldus Inc.
 
Scripting Support in GlassFish v3 Prelude
Scripting Support in GlassFish v3 PreludeScripting Support in GlassFish v3 Prelude
Scripting Support in GlassFish v3 PreludeEduardo Pelegri-Llopart
 
Rubygem Dev And Workflow
Rubygem Dev And WorkflowRubygem Dev And Workflow
Rubygem Dev And WorkflowDr Nic Williams
 

Tendances (20)

Production ready Vert.x
Production ready Vert.xProduction ready Vert.x
Production ready Vert.x
 
Daniel Steigerwald: EsteJS - javascriptové aplikace robusně, modulárně a komf...
Daniel Steigerwald: EsteJS - javascriptové aplikace robusně, modulárně a komf...Daniel Steigerwald: EsteJS - javascriptové aplikace robusně, modulárně a komf...
Daniel Steigerwald: EsteJS - javascriptové aplikace robusně, modulárně a komf...
 
Work smart with Gutenberg - Fellyph Cintra
Work smart with Gutenberg - Fellyph CintraWork smart with Gutenberg - Fellyph Cintra
Work smart with Gutenberg - Fellyph Cintra
 
[Nuxeo World 2013] XML EXTENSION POINT COMPLETION IN NUXEO IDE - SUN TAN, SERLI
[Nuxeo World 2013] XML EXTENSION POINT COMPLETION IN NUXEO IDE - SUN TAN, SERLI[Nuxeo World 2013] XML EXTENSION POINT COMPLETION IN NUXEO IDE - SUN TAN, SERLI
[Nuxeo World 2013] XML EXTENSION POINT COMPLETION IN NUXEO IDE - SUN TAN, SERLI
 
What's New in ASP.NET Core 3
What's New in ASP.NET Core 3What's New in ASP.NET Core 3
What's New in ASP.NET Core 3
 
Node js meetup
Node js meetupNode js meetup
Node js meetup
 
Node Js Websocket Js Meetup Slides
Node Js Websocket Js Meetup SlidesNode Js Websocket Js Meetup Slides
Node Js Websocket Js Meetup Slides
 
NodeJS and MEAN stack - II SorocabaJS
NodeJS and MEAN stack - II SorocabaJSNodeJS and MEAN stack - II SorocabaJS
NodeJS and MEAN stack - II SorocabaJS
 
Vuejs and Web components - current state
Vuejs and Web components - current stateVuejs and Web components - current state
Vuejs and Web components - current state
 
Front-end tools in java webapps
Front-end tools in java webappsFront-end tools in java webapps
Front-end tools in java webapps
 
What the HACK is HHVM?
What the HACK is HHVM?What the HACK is HHVM?
What the HACK is HHVM?
 
Whats new in .net core 3
Whats new in .net core 3Whats new in .net core 3
Whats new in .net core 3
 
Using PhantomJS to keep product screenshots up to date
Using PhantomJS to keep product screenshots up to dateUsing PhantomJS to keep product screenshots up to date
Using PhantomJS to keep product screenshots up to date
 
Running Java In Smalltalk
Running Java In SmalltalkRunning Java In Smalltalk
Running Java In Smalltalk
 
TDD with Spock @xpdays_ua
TDD with Spock @xpdays_uaTDD with Spock @xpdays_ua
TDD with Spock @xpdays_ua
 
Intro to JavaScript
Intro to JavaScriptIntro to JavaScript
Intro to JavaScript
 
Export pdf with puppeteer
Export pdf with puppeteerExport pdf with puppeteer
Export pdf with puppeteer
 
Scripting Support in GlassFish v3 Prelude
Scripting Support in GlassFish v3 PreludeScripting Support in GlassFish v3 Prelude
Scripting Support in GlassFish v3 Prelude
 
Think beyond http
Think beyond httpThink beyond http
Think beyond http
 
Rubygem Dev And Workflow
Rubygem Dev And WorkflowRubygem Dev And Workflow
Rubygem Dev And Workflow
 

Similaire à Node.js and express

Fundamental of Node.JS - Internship Presentation - Week7
Fundamental of Node.JS - Internship Presentation - Week7Fundamental of Node.JS - Internship Presentation - Week7
Fundamental of Node.JS - Internship Presentation - Week7Devang Garach
 
OSDC.no 2015 introduction to node.js workshop
OSDC.no 2015 introduction to node.js workshopOSDC.no 2015 introduction to node.js workshop
OSDC.no 2015 introduction to node.js workshopleffen
 
Node.js and the MEAN Stack Building Full-Stack Web Applications.pdf
Node.js and the MEAN Stack Building Full-Stack Web Applications.pdfNode.js and the MEAN Stack Building Full-Stack Web Applications.pdf
Node.js and the MEAN Stack Building Full-Stack Web Applications.pdflubnayasminsebl
 
All You Need to Know About Using Node.pdf
All You Need to Know About Using Node.pdfAll You Need to Know About Using Node.pdf
All You Need to Know About Using Node.pdfiDataScientists
 
Halton Software Peer 2 Peer Meetup #10
Halton Software Peer 2 Peer Meetup #10Halton Software Peer 2 Peer Meetup #10
Halton Software Peer 2 Peer Meetup #10David Ashton
 
Basic Concept of Node.js & NPM
Basic Concept of Node.js & NPMBasic Concept of Node.js & NPM
Basic Concept of Node.js & NPMBhargav Anadkat
 
Steps to Install NPM and Node.js on Windows and MAC
Steps to Install NPM and Node.js on Windows and MACSteps to Install NPM and Node.js on Windows and MAC
Steps to Install NPM and Node.js on Windows and MACInexture Solutions
 
An Introduction to Node.js Development with Windows Azure
An Introduction to Node.js Development with Windows AzureAn Introduction to Node.js Development with Windows Azure
An Introduction to Node.js Development with Windows AzureTroy Miles
 
Introduction to node.js By Ahmed Assaf
Introduction to node.js  By Ahmed AssafIntroduction to node.js  By Ahmed Assaf
Introduction to node.js By Ahmed AssafAhmed Assaf
 
Create Restful Web Application With Node.js Express Framework
Create Restful Web Application With Node.js Express FrameworkCreate Restful Web Application With Node.js Express Framework
Create Restful Web Application With Node.js Express FrameworkEdureka!
 
Serverless java
Serverless   javaServerless   java
Serverless javaVishwas N
 
Node js (runtime environment + js library) platform
Node js (runtime environment + js library) platformNode js (runtime environment + js library) platform
Node js (runtime environment + js library) platformSreenivas Kappala
 
Node.js Development Tools
 Node.js Development Tools Node.js Development Tools
Node.js Development ToolsSofiaCarter4
 
Node JS Express: Steps to Create Restful Web App
Node JS Express: Steps to Create Restful Web AppNode JS Express: Steps to Create Restful Web App
Node JS Express: Steps to Create Restful Web AppEdureka!
 

Similaire à Node.js and express (20)

Fundamental of Node.JS - Internship Presentation - Week7
Fundamental of Node.JS - Internship Presentation - Week7Fundamental of Node.JS - Internship Presentation - Week7
Fundamental of Node.JS - Internship Presentation - Week7
 
OSDC.no 2015 introduction to node.js workshop
OSDC.no 2015 introduction to node.js workshopOSDC.no 2015 introduction to node.js workshop
OSDC.no 2015 introduction to node.js workshop
 
Node.js and the MEAN Stack Building Full-Stack Web Applications.pdf
Node.js and the MEAN Stack Building Full-Stack Web Applications.pdfNode.js and the MEAN Stack Building Full-Stack Web Applications.pdf
Node.js and the MEAN Stack Building Full-Stack Web Applications.pdf
 
All You Need to Know About Using Node.pdf
All You Need to Know About Using Node.pdfAll You Need to Know About Using Node.pdf
All You Need to Know About Using Node.pdf
 
Halton Software Peer 2 Peer Meetup #10
Halton Software Peer 2 Peer Meetup #10Halton Software Peer 2 Peer Meetup #10
Halton Software Peer 2 Peer Meetup #10
 
Basic Concept of Node.js & NPM
Basic Concept of Node.js & NPMBasic Concept of Node.js & NPM
Basic Concept of Node.js & NPM
 
Node js for beginners
Node js for beginnersNode js for beginners
Node js for beginners
 
Steps to Install NPM and Node.js on Windows and MAC
Steps to Install NPM and Node.js on Windows and MACSteps to Install NPM and Node.js on Windows and MAC
Steps to Install NPM and Node.js on Windows and MAC
 
An Introduction to Node.js Development with Windows Azure
An Introduction to Node.js Development with Windows AzureAn Introduction to Node.js Development with Windows Azure
An Introduction to Node.js Development with Windows Azure
 
Node js
Node jsNode js
Node js
 
Nodejs
NodejsNodejs
Nodejs
 
Introduction to node.js By Ahmed Assaf
Introduction to node.js  By Ahmed AssafIntroduction to node.js  By Ahmed Assaf
Introduction to node.js By Ahmed Assaf
 
Create Restful Web Application With Node.js Express Framework
Create Restful Web Application With Node.js Express FrameworkCreate Restful Web Application With Node.js Express Framework
Create Restful Web Application With Node.js Express Framework
 
02 Node introduction
02 Node introduction02 Node introduction
02 Node introduction
 
Serverless java
Serverless   javaServerless   java
Serverless java
 
Node.js.pdf
Node.js.pdfNode.js.pdf
Node.js.pdf
 
Node js (runtime environment + js library) platform
Node js (runtime environment + js library) platformNode js (runtime environment + js library) platform
Node js (runtime environment + js library) platform
 
Node.js Development Tools
 Node.js Development Tools Node.js Development Tools
Node.js Development Tools
 
Node JS Express: Steps to Create Restful Web App
Node JS Express: Steps to Create Restful Web AppNode JS Express: Steps to Create Restful Web App
Node JS Express: Steps to Create Restful Web App
 
Node.js security tour
Node.js security tourNode.js security tour
Node.js security tour
 

Dernier

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 

Dernier (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Node.js and express

  • 1. Quinta-feira, 22 de Agosto de 13
  • 2. Agenda Node.js About Benefits Installing NPM Express About Installing Express & Generate an app Jade & Stylus Quinta-feira, 22 de Agosto de 13
  • 3. about me 15 years programming experience Software Developer and MSSQL DBA @ Com- UT/Sedimap using Node.js about 3 years Quinta-feira, 22 de Agosto de 13
  • 5. Node -About Node.js is a platform to build fast and scalable network applications we know this can be very painful and hard in some languages Quinta-feira, 22 de Agosto de 13
  • 6. Node -About It is built on GoogleV8 JavaScript engine, the libuv platform abstraction layer and a core library, which is itself primarily written in JavaScript. perhaps the best and faster JavaScript engine... Quinta-feira, 22 de Agosto de 13
  • 7. Node -About event-driven defined as an application technique in which the application has a main loop non-blocking I/O is a form of I/O processing that permits other processing to continue before the last transmission has finished Quinta-feira, 22 de Agosto de 13
  • 8. Quinta-feira, 22 de Agosto de 13
  • 9. Node - Benefits Small Core Multi-Platform implements some CommonJS specifications Easy to use, easy to start JavaScript on server, JavaScript on client Single thread simplifies concurrency Package Module (NPM) Community Great Modules (like underscore, async, express, request, etc...) Rapidly changing, e.g., updating in shortly time Quinta-feira, 22 de Agosto de 13
  • 10. Installing Node Go to http://nodejs.org/ Windons and Mac OS X click on “install” Linux, using package manager Gentoo, Ubuntu, Fedora, etc... Quinta-feira, 22 de Agosto de 13
  • 11. Installing Node(Cont.) Install from source code wget http://nodejs.org/dist/v0.10.x/node-v0.10.x.tar.gz tar xzf node-v0.10x.tar.gz ./configure make make test make install node --version Quinta-feira, 22 de Agosto de 13
  • 12. NPM How to find a module npm search express https://npmjs.org/ Some attentions you need to take before install a module were updated relatively recently have github repositories linked have READMEs with good documentation have at least some number of people instaling them every week are liberally licensed (feel free to use) Quinta-feira, 22 de Agosto de 13
  • 13. Installing a module Global Mode will install in /usr/local/lib/node_modules is more suited for modules that should always be available Local Mode NPM default mode “your application path”/node_modules is ideal for installing the modules your applications depends don’t affect others applications that you have installed use always this mode is more safe Quinta-feira, 22 de Agosto de 13
  • 14. Let’s Play with a TCP Server Chat Quinta-feira, 22 de Agosto de 13
  • 16. About is a minimal and flexible web application framework provide a robust set of features for building single, multi-page and hybrid web applications is based on the Connect middleware and implements MVC Quinta-feira, 22 de Agosto de 13
  • 17. Installing & Generate an app sudo npm install -g express express --sessions --css stylus myapp cd myapp & npm install node app Quinta-feira, 22 de Agosto de 13
  • 18. Express - app package.json (some app settings) app.js (launch app) public/* routes/* views/* Quinta-feira, 22 de Agosto de 13
  • 19. Jade is a high performance template engine implemented with JavaScript for node Quinta-feira, 22 de Agosto de 13
  • 21. Stylus robust, feature-rich CSS language built for node providing an efficient, dynamic and expressive way to generate CSS Quinta-feira, 22 de Agosto de 13
  • 23. Some Resources Node.JS http://nodeguide.com/ (Felix Geisendörfer) https://github.com/maxogden/art-of-node (Max Ogden) http://nodetuts.com(Pedro Teixeira) Express http://expressjs.com/ http://www.senchalabs.org/connect/ http://learnboost.github.io/stylus/ http://jade-lang.com/ Quinta-feira, 22 de Agosto de 13
  • 24. Quinta-feira, 22 de Agosto de 13