SlideShare uma empresa Scribd logo
1 de 11
Node.js MVC Framework
MOJITO WORKSHOP
AGENDA
• Installing mojito
• Write a simple weather app on the command line
• Extend the weather app to:
• Invoke other actions
• Show a different view on a iphone device
• Page with muliple mojits; lazy loading
13 July 2013MOJITO WORKSHOP 3
INSTALLING MOJITO
• Download and install node from http://nodejs.org/download/
• sudo npm install mojito-cli –g
• mojito version
13 July 2013MOJITO WORKSHOP 4
SIMPLE WEATHER APP
• Let’s write a simple app using mojito to do a YQL query to query
weather of a place and display it.
• mojito create app SimpleWeatherApp
• Edit package.json
• cd SimpleWeatherApp/
• mojito create mojit Weather
• Edit routes.json and application.js
13 July 2013MOJITO WORKSHOP 5
SIMPLE WEATHER APP
• Execute mojito to see the simple “Mojito is working” message:
• mojito start
• Edit model to fetch data from YQL, edit the controller and the
template to render the data.
• Execute mojito again.
13 July 2013MOJITO WORKSHOP 6
EXTEND THE SIMPLE WEATHER APP
• Let us now extend the simple weather app to fetch some more
data, such as forecast info.
• Let us see how mojitProy can be used to:
• Invoke another action and render its data.
• Refresh the view
• Modify the weather app to use a different view on iphone.
13 July 2013MOJITO WORKSHOP 7
PAGE WITH MULTIPLE MOJITS; LAZY LOADING
• Let us build a page with multiple mojits: a header mojit, a footer
mojit,and a body mojit.
• Then, let us see how to lazy load the footer mojit.
• Add “defer”: true in the config for the mojit in the
application.json
13 July 2013MOJITO WORKSHOP 8
Q&A
REFERENCES
• http://developer.yahoo.com/cocktails/mojito/
• The apps we did in the workshop can be found at
https://github.com/kbsbng/mojito-examples.
• My twitter handle: kbsbng
13 July 2013MOJITO WORKSHOP 10
THANK YOU

Mais conteúdo relacionado

Destaque (7)

Cyberbullying report by decoxide
Cyberbullying report by decoxideCyberbullying report by decoxide
Cyberbullying report by decoxide
 
Livro a5
Livro a5Livro a5
Livro a5
 
Fran Descripcion
Fran DescripcionFran Descripcion
Fran Descripcion
 
Noticias de espeleología 20120205
Noticias de espeleología 20120205Noticias de espeleología 20120205
Noticias de espeleología 20120205
 
Craque Do Photoshop
Craque Do PhotoshopCraque Do Photoshop
Craque Do Photoshop
 
Texto expositivo explicativo
Texto expositivo explicativoTexto expositivo explicativo
Texto expositivo explicativo
 
ENSAYO BULLING
ENSAYO BULLINGENSAYO BULLING
ENSAYO BULLING
 

Semelhante a Mojito workshop

Cocktails – Shaken, Not Stirred @osdc.tw
Cocktails – Shaken, Not Stirred @osdc.twCocktails – Shaken, Not Stirred @osdc.tw
Cocktails – Shaken, Not Stirred @osdc.twYu-Wei Chuang
 
Intro to Mobile Development for Web iOS and Android
Intro to Mobile Development for Web iOS and AndroidIntro to Mobile Development for Web iOS and Android
Intro to Mobile Development for Web iOS and AndroidSendGrid
 
iOS Developers Conference-iOS Automation with Cucumber, Appium and Saucelabs
iOS Developers Conference-iOS Automation with Cucumber, Appium and SaucelabsiOS Developers Conference-iOS Automation with Cucumber, Appium and Saucelabs
iOS Developers Conference-iOS Automation with Cucumber, Appium and SaucelabsShashikant Jagtap
 
Open Hack Taiwan 2012 - Mojito intro
Open Hack Taiwan 2012 - Mojito introOpen Hack Taiwan 2012 - Mojito intro
Open Hack Taiwan 2012 - Mojito introsriramiyer2007
 
Primefaces mobile users_guide_0_9
Primefaces mobile users_guide_0_9Primefaces mobile users_guide_0_9
Primefaces mobile users_guide_0_9ednilsoncampos
 
Background Fetch - the most powerful API you've never heard of
Background Fetch - the most powerful API you've never heard ofBackground Fetch - the most powerful API you've never heard of
Background Fetch - the most powerful API you've never heard ofmoliver816
 
20190826 ianjoseph_FinalPresentation
20190826 ianjoseph_FinalPresentation20190826 ianjoseph_FinalPresentation
20190826 ianjoseph_FinalPresentationIan Joseph
 
iOS Automation with Cucumber, Appium and Saucelabs
iOS Automation with Cucumber, Appium and SaucelabsiOS Automation with Cucumber, Appium and Saucelabs
iOS Automation with Cucumber, Appium and SaucelabsShashikant Jagtap
 
Android Component.pptx
Android Component.pptxAndroid Component.pptx
Android Component.pptxQwerty140857
 
2016 05-07 amro handy labs workshop
2016 05-07 amro handy labs workshop2016 05-07 amro handy labs workshop
2016 05-07 amro handy labs workshopLama K Banna
 
ITB2015 - Crash Course in Ionic + AngularJS
ITB2015 - Crash Course in Ionic + AngularJSITB2015 - Crash Course in Ionic + AngularJS
ITB2015 - Crash Course in Ionic + AngularJSOrtus Solutions, Corp
 
Introduction to the Yahoo! Mojito Node.js MVC
Introduction to the Yahoo! Mojito Node.js MVCIntroduction to the Yahoo! Mojito Node.js MVC
Introduction to the Yahoo! Mojito Node.js MVCAvinash Chukka
 
Yahoo! Hack India: Hyderabad | Introduction to the Yahoo! Mojito Node.js MVC
Yahoo! Hack India: Hyderabad | Introduction to the Yahoo! Mojito Node.js MVCYahoo! Hack India: Hyderabad | Introduction to the Yahoo! Mojito Node.js MVC
Yahoo! Hack India: Hyderabad | Introduction to the Yahoo! Mojito Node.js MVCYahoo Developer Network
 

Semelhante a Mojito workshop (20)

Cocktails – Shaken, Not Stirred @osdc.tw
Cocktails – Shaken, Not Stirred @osdc.twCocktails – Shaken, Not Stirred @osdc.tw
Cocktails – Shaken, Not Stirred @osdc.tw
 
Mojito
MojitoMojito
Mojito
 
Mojito@nodejstw
Mojito@nodejstwMojito@nodejstw
Mojito@nodejstw
 
Intro to Mobile Development for Web iOS and Android
Intro to Mobile Development for Web iOS and AndroidIntro to Mobile Development for Web iOS and Android
Intro to Mobile Development for Web iOS and Android
 
Firefox OS Presentation
Firefox OS PresentationFirefox OS Presentation
Firefox OS Presentation
 
iOS Developers Conference-iOS Automation with Cucumber, Appium and Saucelabs
iOS Developers Conference-iOS Automation with Cucumber, Appium and SaucelabsiOS Developers Conference-iOS Automation with Cucumber, Appium and Saucelabs
iOS Developers Conference-iOS Automation with Cucumber, Appium and Saucelabs
 
Open Hack Taiwan 2012 - Mojito intro
Open Hack Taiwan 2012 - Mojito introOpen Hack Taiwan 2012 - Mojito intro
Open Hack Taiwan 2012 - Mojito intro
 
"We want an APP!"
"We want an APP!""We want an APP!"
"We want an APP!"
 
Primefaces mobile users_guide_0_9
Primefaces mobile users_guide_0_9Primefaces mobile users_guide_0_9
Primefaces mobile users_guide_0_9
 
Background Fetch - the most powerful API you've never heard of
Background Fetch - the most powerful API you've never heard ofBackground Fetch - the most powerful API you've never heard of
Background Fetch - the most powerful API you've never heard of
 
20190826 ianjoseph_FinalPresentation
20190826 ianjoseph_FinalPresentation20190826 ianjoseph_FinalPresentation
20190826 ianjoseph_FinalPresentation
 
Final presentation aldy ian - pwa
Final presentation   aldy ian - pwaFinal presentation   aldy ian - pwa
Final presentation aldy ian - pwa
 
iOS Automation with Cucumber, Appium and Saucelabs
iOS Automation with Cucumber, Appium and SaucelabsiOS Automation with Cucumber, Appium and Saucelabs
iOS Automation with Cucumber, Appium and Saucelabs
 
Android Component.pptx
Android Component.pptxAndroid Component.pptx
Android Component.pptx
 
David plant
David plantDavid plant
David plant
 
David plant
David plantDavid plant
David plant
 
2016 05-07 amro handy labs workshop
2016 05-07 amro handy labs workshop2016 05-07 amro handy labs workshop
2016 05-07 amro handy labs workshop
 
ITB2015 - Crash Course in Ionic + AngularJS
ITB2015 - Crash Course in Ionic + AngularJSITB2015 - Crash Course in Ionic + AngularJS
ITB2015 - Crash Course in Ionic + AngularJS
 
Introduction to the Yahoo! Mojito Node.js MVC
Introduction to the Yahoo! Mojito Node.js MVCIntroduction to the Yahoo! Mojito Node.js MVC
Introduction to the Yahoo! Mojito Node.js MVC
 
Yahoo! Hack India: Hyderabad | Introduction to the Yahoo! Mojito Node.js MVC
Yahoo! Hack India: Hyderabad | Introduction to the Yahoo! Mojito Node.js MVCYahoo! Hack India: Hyderabad | Introduction to the Yahoo! Mojito Node.js MVC
Yahoo! Hack India: Hyderabad | Introduction to the Yahoo! Mojito Node.js MVC
 

Último

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
 
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
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
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
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer 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
 
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
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
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
 

Último (20)

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
 
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
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
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
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer 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
 
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)
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
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
 

Mojito workshop

  • 1.
  • 3. AGENDA • Installing mojito • Write a simple weather app on the command line • Extend the weather app to: • Invoke other actions • Show a different view on a iphone device • Page with muliple mojits; lazy loading 13 July 2013MOJITO WORKSHOP 3
  • 4. INSTALLING MOJITO • Download and install node from http://nodejs.org/download/ • sudo npm install mojito-cli –g • mojito version 13 July 2013MOJITO WORKSHOP 4
  • 5. SIMPLE WEATHER APP • Let’s write a simple app using mojito to do a YQL query to query weather of a place and display it. • mojito create app SimpleWeatherApp • Edit package.json • cd SimpleWeatherApp/ • mojito create mojit Weather • Edit routes.json and application.js 13 July 2013MOJITO WORKSHOP 5
  • 6. SIMPLE WEATHER APP • Execute mojito to see the simple “Mojito is working” message: • mojito start • Edit model to fetch data from YQL, edit the controller and the template to render the data. • Execute mojito again. 13 July 2013MOJITO WORKSHOP 6
  • 7. EXTEND THE SIMPLE WEATHER APP • Let us now extend the simple weather app to fetch some more data, such as forecast info. • Let us see how mojitProy can be used to: • Invoke another action and render its data. • Refresh the view • Modify the weather app to use a different view on iphone. 13 July 2013MOJITO WORKSHOP 7
  • 8. PAGE WITH MULTIPLE MOJITS; LAZY LOADING • Let us build a page with multiple mojits: a header mojit, a footer mojit,and a body mojit. • Then, let us see how to lazy load the footer mojit. • Add “defer”: true in the config for the mojit in the application.json 13 July 2013MOJITO WORKSHOP 8
  • 9. Q&A
  • 10. REFERENCES • http://developer.yahoo.com/cocktails/mojito/ • The apps we did in the workshop can be found at https://github.com/kbsbng/mojito-examples. • My twitter handle: kbsbng 13 July 2013MOJITO WORKSHOP 10

Notas do Editor

  1. While editing package.json, routes and application, refer https://github.com/kbsbng/mojito-examples/tree/master/SimpleWeatherApp
  2. Refer https://github.com/kbsbng/mojito-examples/tree/master/SimpleWeatherApp to eidt the model
  3. Refer https://github.com/kbsbng/mojito-examples/tree/master/SimpleWeatherApp