SlideShare a Scribd company logo
1 of 17
Download to read offline
Node.JS
                          { ‘name’:      ‘Bártházi András’,
                            ‘company’:   ‘Wish Internet Consulting’,
                            ‘event’:     ‘Budapest.JS’,
                            ‘date’:      Date(‘2010/03/30’) }




Tuesday, March 30, 2010
Az előadó
                          Bártházi András
                          webfejlesztő, infojunkie

                          Kapcsolat:
                          mail: andras(beigli)barthazi(pont)hu
                          twitter: @ba78

                          Blog:
                          http://webakademia.hu


Tuesday, March 30, 2010
ról-ről
                 http://nodejs.org/

                 gyors fejlődés, korrekt közösség
                 2009. november óta (!), 2009. januári előzményekkel

                 a V8 nevű JavaScript értelmezőre épülő futtatókörnyezet

                 hálózati programozást (különböző szerverek, kliensek) lehetővé tevő
                 kiegészítők

                 esemény alapú, aszinkron programozás (vö: thread alapú megoldások)


Tuesday, March 30, 2010
ról-ről

                          gyorsan, egyszerűen telepíthető, kevés fü)őség

                          a JavaScriptet “mindenki” ismeri, gyorsan tanulható,
                          egyszerű környezet

                          nagyon könnyen lehet olyan látványos eredményeket
                          elérni vele, amit LAMP környezetben “sehogysem”



Tuesday, March 30, 2010
V8


                          A Chrome JavaScript motorja

                          gyors, szabványos, aktívan fejlesztett JavaScript
                          értelmező




Tuesday, March 30, 2010
+CommonJS
                          standard JavaScript fü)vénykönyvtár

                          a CommonJS (http://commonjs.org/) alapján kezel
                          modulokat:
                          var sys = require("sys");
                          var sajatmodul = require("./module");
                          sys.puts(sajatmodul.uzenet);
                      a module.js az “exports” objektumon keresztül
                      “kommunikál” a külvilá)al:
                          exports.uzenet = "Hello Világ!";


Tuesday, March 30, 2010
+I/O +hálózat

                          fájlkezelés

                          HTTP szerver és kliens

                          TCP szerver és kliens

                          DNS kliens

                          + további kiegészítők lehetősége (pl. node_postgres)



Tuesday, March 30, 2010
+esemény alapú

                          setTimeout és AJAX ismerős?

                          egy szálon fut (böngészőkből ez is ismerős lehet)

                          alapfilozófia: I/O-ra nem várunk, hanem átadunk egy
                          eseménykezelő fü)vényt, az majd lefut ha megjött a
                          válasz



Tuesday, March 30, 2010
webszerver

         var sys = require("sys"),
            http = require("http");
         http.createServer(function (request, response) {
           response.writeHead(200, {"Content-Type": "text/plain"});
           response.write("Hello Worldn");
           response.close();
         }).listen(8000);
         sys.puts("Server running at http://127.0.0.1:8000/");




Tuesday, March 30, 2010
webszerver gyorsan

                          statikus fájlok kiszolgálása lassúnak mondható

                          célszerű egy proxy szervert elétenni, például nginx-et

                          egy korrekt felá-ás:
                          http://dailyjs.com/2010/03/15/hosting-nodejs-apps




Tuesday, March 30, 2010
adatbáziskezelés
                          még igencsak gyerekcipőben, de már több lehetőség is van:

                            PostgreSQL: JavaScriptben és C-ben írt modul
                            http://github.com/ry/node_postgres és http://github.com/creationix/postgres-js


                            MySQL: DBSlayer nevű “proxy”-n keresztül
                            http://devthought.com/blog/2009/12/accessing-a-mysql-database-.om-nodejs/


                            Redis, CouchDB, MongoDB...

                            http://wiki.github.com/ry/node/modules#database


Tuesday, March 30, 2010
baráti projektek

                          számos Node.JS-re épülő modul:
                          http://wiki.github.com/ry/node/modules

                          számos Node.JS-re épülő projekt
                          http://wiki.github.com/ry/node/

                          a gyors fejlődés kapcsán nem feltétlenül vannak
                          szinkronban, így lehet, hogy nem működnek



Tuesday, March 30, 2010
webes frameworkök
                          ebből is igen sok van, az egyszerűbbektől az összetettekig

                            fura: http://www.fabjs.org/

                            okos: http://expressjs.com/

                          de van még többfajta sablonkezelés, HTML5 websocket,
                          XML feldolgozó, gzip tömörítő, GD és ImageMagick
                          wrapper, ésatöbbi


Tuesday, March 30, 2010
“csomag” kezelés


                          ebből is van több, például a “kiwi”:
                          http://github.com/visionmedia/kiwi

                          kiwi install node




Tuesday, March 30, 2010
wow


                          IRC bot: http://github.com/gf3/Jerk

                          FTP szerver: http://github.com/bi-ywhizz/node/pd

                          kész példák: chatszerver, wiki, blogmotor...




Tuesday, March 30, 2010
olvasnivaló


                          http://howtonode.org/

                          http://wiki.github.com/ry/node/ => Articles

                          http://dailyjs.com/tags.html#nodejs




Tuesday, March 30, 2010
Köszönöm!
                          Kérdések?

                          Bártházi András

                          Kapcsolat:
                          mail: andras(beigli)barthazi(pont)hu
                          twitter: @ba78

                          Blog:
                          http://webakademia.hu


Tuesday, March 30, 2010

More Related Content

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

NodeJS

  • 1. Node.JS { ‘name’: ‘Bártházi András’, ‘company’: ‘Wish Internet Consulting’, ‘event’: ‘Budapest.JS’, ‘date’: Date(‘2010/03/30’) } Tuesday, March 30, 2010
  • 2. Az előadó Bártházi András webfejlesztő, infojunkie Kapcsolat: mail: andras(beigli)barthazi(pont)hu twitter: @ba78 Blog: http://webakademia.hu Tuesday, March 30, 2010
  • 3. ról-ről http://nodejs.org/ gyors fejlődés, korrekt közösség 2009. november óta (!), 2009. januári előzményekkel a V8 nevű JavaScript értelmezőre épülő futtatókörnyezet hálózati programozást (különböző szerverek, kliensek) lehetővé tevő kiegészítők esemény alapú, aszinkron programozás (vö: thread alapú megoldások) Tuesday, March 30, 2010
  • 4. ról-ről gyorsan, egyszerűen telepíthető, kevés fü)őség a JavaScriptet “mindenki” ismeri, gyorsan tanulható, egyszerű környezet nagyon könnyen lehet olyan látványos eredményeket elérni vele, amit LAMP környezetben “sehogysem” Tuesday, March 30, 2010
  • 5. V8 A Chrome JavaScript motorja gyors, szabványos, aktívan fejlesztett JavaScript értelmező Tuesday, March 30, 2010
  • 6. +CommonJS standard JavaScript fü)vénykönyvtár a CommonJS (http://commonjs.org/) alapján kezel modulokat: var sys = require("sys"); var sajatmodul = require("./module"); sys.puts(sajatmodul.uzenet); a module.js az “exports” objektumon keresztül “kommunikál” a külvilá)al: exports.uzenet = "Hello Világ!"; Tuesday, March 30, 2010
  • 7. +I/O +hálózat fájlkezelés HTTP szerver és kliens TCP szerver és kliens DNS kliens + további kiegészítők lehetősége (pl. node_postgres) Tuesday, March 30, 2010
  • 8. +esemény alapú setTimeout és AJAX ismerős? egy szálon fut (böngészőkből ez is ismerős lehet) alapfilozófia: I/O-ra nem várunk, hanem átadunk egy eseménykezelő fü)vényt, az majd lefut ha megjött a válasz Tuesday, March 30, 2010
  • 9. webszerver var sys = require("sys"), http = require("http"); http.createServer(function (request, response) { response.writeHead(200, {"Content-Type": "text/plain"}); response.write("Hello Worldn"); response.close(); }).listen(8000); sys.puts("Server running at http://127.0.0.1:8000/"); Tuesday, March 30, 2010
  • 10. webszerver gyorsan statikus fájlok kiszolgálása lassúnak mondható célszerű egy proxy szervert elétenni, például nginx-et egy korrekt felá-ás: http://dailyjs.com/2010/03/15/hosting-nodejs-apps Tuesday, March 30, 2010
  • 11. adatbáziskezelés még igencsak gyerekcipőben, de már több lehetőség is van: PostgreSQL: JavaScriptben és C-ben írt modul http://github.com/ry/node_postgres és http://github.com/creationix/postgres-js MySQL: DBSlayer nevű “proxy”-n keresztül http://devthought.com/blog/2009/12/accessing-a-mysql-database-.om-nodejs/ Redis, CouchDB, MongoDB... http://wiki.github.com/ry/node/modules#database Tuesday, March 30, 2010
  • 12. baráti projektek számos Node.JS-re épülő modul: http://wiki.github.com/ry/node/modules számos Node.JS-re épülő projekt http://wiki.github.com/ry/node/ a gyors fejlődés kapcsán nem feltétlenül vannak szinkronban, így lehet, hogy nem működnek Tuesday, March 30, 2010
  • 13. webes frameworkök ebből is igen sok van, az egyszerűbbektől az összetettekig fura: http://www.fabjs.org/ okos: http://expressjs.com/ de van még többfajta sablonkezelés, HTML5 websocket, XML feldolgozó, gzip tömörítő, GD és ImageMagick wrapper, ésatöbbi Tuesday, March 30, 2010
  • 14. “csomag” kezelés ebből is van több, például a “kiwi”: http://github.com/visionmedia/kiwi kiwi install node Tuesday, March 30, 2010
  • 15. wow IRC bot: http://github.com/gf3/Jerk FTP szerver: http://github.com/bi-ywhizz/node/pd kész példák: chatszerver, wiki, blogmotor... Tuesday, March 30, 2010
  • 16. olvasnivaló http://howtonode.org/ http://wiki.github.com/ry/node/ => Articles http://dailyjs.com/tags.html#nodejs Tuesday, March 30, 2010
  • 17. Köszönöm! Kérdések? Bártházi András Kapcsolat: mail: andras(beigli)barthazi(pont)hu twitter: @ba78 Blog: http://webakademia.hu Tuesday, March 30, 2010