SlideShare una empresa de Scribd logo
1 de 18
Descargar para leer sin conexión
Susmus.hu
{ ‘name’: ‘Bártházi András’,
‘company’: ‘Wish Internet Consulting’,
‘event’: ‘Budapest.JS’,
‘date’: Date(‘2010/10/25’) }
Friday, October 29, 2010
Az előadó
BártháziAndrás
webfejlesztő, infojunkie
Kapcsolat:
mail: andras(beigli)barthazi(pont)hu
twitter: @ba78
Blog:
http://webakademia.hu
Friday, October 29, 2010
Susmus.hu
http://susmus.hu/
legújabb “hobbi” projektem, me&yel céljaim:
egy 100% JavaScript webalkalmazás létrehozása, fejlesztése
igényeim szerinti “kommunikációs központ” kialakítása
nemzetközi projektben tapasztalatszerzés
Friday, October 29, 2010
Miről lesz ma szó?
felsorolok egy jó adag fü(vénytárat, amikről
beszélgethetünk :)
mitől 100% JavaScript egy webalkalmazás?
miket használok szerver oldalon, kliens oldalon?
miért lehet érdekes (majd) a projekt felhasználóként is
egy JavaScript fejlesztőnek?
Friday, October 29, 2010
100% JavaScript
Célom egy olyan webalkalmazás létrehozása, mely esetén
a szerver oldali backend, és a kliens oldali +ontend is
teljes egészében JavaScript nyelven készül el
Már csak a Twitterre beléptetés az, ami PHP-ben van
(historikus okokból), de ahogy időm engedi, ez is átírásra
kerül JavaScriptre
Friday, October 29, 2010
100% JavaScript
az architektúra:
szerver oldalon NGINX + Node.JS
kliens oldalon jQuery + rengeteg kis fü(vénykönyvtár
Friday, October 29, 2010
100% JavaScript
Előny, hogy a kliens oldalon megírt kódrészletet szerver
oldalon is használni tudom (és fordítva)
A terhelhetőség és a reszponzivitás miatt minél több
dolgot kliens oldalon érdemes megcsinálni, sok kódrészlet
ugrál fejlesztés közben a két oldal között
Friday, October 29, 2010
Szerver oldal
Node.JS: márciusban már beszéltem róla, azóta is nagy
rajongója vagyok
ATwitter real-timeAPI-ja miatt mindenképpen egy
event centrikus szerver oldali megoldást ke&ett
választanom, ezért esett rá a választásom
Friday, October 29, 2010
Szerver oldal
Felmerült a HTML5 WebSocket használata, melyre a
Node.JS kiválóan alkalmas is lenne (van több modulja
is), azonban az NGINX sajnos nem tudja proxy-zni
Végül a Cometre esett a választásom
Friday, October 29, 2010
Szerver oldal
Node.JS-ben egy proxy készült, mely a TwitterAPI felé
tudja proxy-zni a felhasználóAJAX-os kéréseit:AJAX
felől jön a GET vagy POST kérés, ezt továbbküldi
oAuth aláírással a Twitter felé
Friday, October 29, 2010
Szerver oldal
Ahogy a felhasználó authentikálja magát, a Node.JS
megnyitja a Twitter User StreamAPI-ját, és amíg
vannak comet kérések, fenntartja a kapcsolatot, s tölt egy
queue-t
A comet kérések ezt a queue-t olvassák, és szolgálják ki a
webalkalmazás felé
Friday, October 29, 2010
Szerver oldal
MongoDB - felhasználó adatok, hamarosan status-ok
tárolására, TwitterAPI-nál gyorsabb, több
információt adó kiszolgálásra
Friday, October 29, 2010
Kliens oldal
Megpróbáltam a Sammy.js-t használni, de...
a HTML template-ek renderelése csak az adott route alatti
“context” változóban működtethető :(
az alap információkat nehezen találtam meg, nagyon kevés
doksija van
“nagy”, ahhoz képest hogy hosszútávon faragni szeretnék majd
this.bind('home', function(context) {
context.render('templates/status.template',
{status: status},
function(rendered){}
});
Friday, October 29, 2010
Kliens oldal
hashchange-et használok a routinghoz
#!/user/ba78 lekezelésére:
http://benalman.com/projects/jquery-hashchange-plugin/
Friday, October 29, 2010
Kliens oldal
EJS-t használok a template-ezéshez:
http://embeddedjs.com/
Friday, October 29, 2010
Kliens oldal
ATwitter üzenetekkel együtt érkeznek az üzenetet író
felhasználó +iss adatai is, ezt egy egyszerű cache-ben
letárolom, és onnan tudom kiszolgálni: nem ke&
szerverkérést indítani
Friday, October 29, 2010
Kliens oldal
A +iss üzeneteket dinamikus faviconnal jelzem ki:
http://remysharp.com/2010/08/24/dynamic-favicons/
A trükk itt az, hogy egy 16x16-os canvas-ra lehet
rajzolni, s ezt beá&ítani faviconnak
Friday, October 29, 2010
Köszönöm!
Kérdések?
BártháziAndrás
Kapcsolat:
mail: andras(beigli)barthazi(pont)hu
twitter: @ba78
Blog:
http://webakademia.hu
Friday, October 29, 2010

Más contenido relacionado

Destacado

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
 

Destacado (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...
 

Susmus.hu - technológiák

  • 1. Susmus.hu { ‘name’: ‘Bártházi András’, ‘company’: ‘Wish Internet Consulting’, ‘event’: ‘Budapest.JS’, ‘date’: Date(‘2010/10/25’) } Friday, October 29, 2010
  • 2. Az előadó BártháziAndrás webfejlesztő, infojunkie Kapcsolat: mail: andras(beigli)barthazi(pont)hu twitter: @ba78 Blog: http://webakademia.hu Friday, October 29, 2010
  • 3. Susmus.hu http://susmus.hu/ legújabb “hobbi” projektem, me&yel céljaim: egy 100% JavaScript webalkalmazás létrehozása, fejlesztése igényeim szerinti “kommunikációs központ” kialakítása nemzetközi projektben tapasztalatszerzés Friday, October 29, 2010
  • 4. Miről lesz ma szó? felsorolok egy jó adag fü(vénytárat, amikről beszélgethetünk :) mitől 100% JavaScript egy webalkalmazás? miket használok szerver oldalon, kliens oldalon? miért lehet érdekes (majd) a projekt felhasználóként is egy JavaScript fejlesztőnek? Friday, October 29, 2010
  • 5. 100% JavaScript Célom egy olyan webalkalmazás létrehozása, mely esetén a szerver oldali backend, és a kliens oldali +ontend is teljes egészében JavaScript nyelven készül el Már csak a Twitterre beléptetés az, ami PHP-ben van (historikus okokból), de ahogy időm engedi, ez is átírásra kerül JavaScriptre Friday, October 29, 2010
  • 6. 100% JavaScript az architektúra: szerver oldalon NGINX + Node.JS kliens oldalon jQuery + rengeteg kis fü(vénykönyvtár Friday, October 29, 2010
  • 7. 100% JavaScript Előny, hogy a kliens oldalon megírt kódrészletet szerver oldalon is használni tudom (és fordítva) A terhelhetőség és a reszponzivitás miatt minél több dolgot kliens oldalon érdemes megcsinálni, sok kódrészlet ugrál fejlesztés közben a két oldal között Friday, October 29, 2010
  • 8. Szerver oldal Node.JS: márciusban már beszéltem róla, azóta is nagy rajongója vagyok ATwitter real-timeAPI-ja miatt mindenképpen egy event centrikus szerver oldali megoldást ke&ett választanom, ezért esett rá a választásom Friday, October 29, 2010
  • 9. Szerver oldal Felmerült a HTML5 WebSocket használata, melyre a Node.JS kiválóan alkalmas is lenne (van több modulja is), azonban az NGINX sajnos nem tudja proxy-zni Végül a Cometre esett a választásom Friday, October 29, 2010
  • 10. Szerver oldal Node.JS-ben egy proxy készült, mely a TwitterAPI felé tudja proxy-zni a felhasználóAJAX-os kéréseit:AJAX felől jön a GET vagy POST kérés, ezt továbbküldi oAuth aláírással a Twitter felé Friday, October 29, 2010
  • 11. Szerver oldal Ahogy a felhasználó authentikálja magát, a Node.JS megnyitja a Twitter User StreamAPI-ját, és amíg vannak comet kérések, fenntartja a kapcsolatot, s tölt egy queue-t A comet kérések ezt a queue-t olvassák, és szolgálják ki a webalkalmazás felé Friday, October 29, 2010
  • 12. Szerver oldal MongoDB - felhasználó adatok, hamarosan status-ok tárolására, TwitterAPI-nál gyorsabb, több információt adó kiszolgálásra Friday, October 29, 2010
  • 13. Kliens oldal Megpróbáltam a Sammy.js-t használni, de... a HTML template-ek renderelése csak az adott route alatti “context” változóban működtethető :( az alap információkat nehezen találtam meg, nagyon kevés doksija van “nagy”, ahhoz képest hogy hosszútávon faragni szeretnék majd this.bind('home', function(context) { context.render('templates/status.template', {status: status}, function(rendered){} }); Friday, October 29, 2010
  • 14. Kliens oldal hashchange-et használok a routinghoz #!/user/ba78 lekezelésére: http://benalman.com/projects/jquery-hashchange-plugin/ Friday, October 29, 2010
  • 15. Kliens oldal EJS-t használok a template-ezéshez: http://embeddedjs.com/ Friday, October 29, 2010
  • 16. Kliens oldal ATwitter üzenetekkel együtt érkeznek az üzenetet író felhasználó +iss adatai is, ezt egy egyszerű cache-ben letárolom, és onnan tudom kiszolgálni: nem ke& szerverkérést indítani Friday, October 29, 2010
  • 17. Kliens oldal A +iss üzeneteket dinamikus faviconnal jelzem ki: http://remysharp.com/2010/08/24/dynamic-favicons/ A trükk itt az, hogy egy 16x16-os canvas-ra lehet rajzolni, s ezt beá&ítani faviconnak Friday, October 29, 2010