SlideShare uma empresa Scribd logo
1 de 22
UNTANGLING THE WEB
FALL 2017 WEEK 11 – MORE ABOUT DATABASES, BACK TO CHATBOTS, GETTING
READY FOR PROJECT 3 NEXT WEEK
AGENDA
• A few things about replication and queries
• Query examples from the movies database
• Looking back at chatbots
• Project work time – this is your last in-person time with me before project 3 is due
DATABSE QUERIES
• Unlike SQL queries, querying the Cloudant DB involves indexes and queries, described as JSON
• We’ll mostly use the default indexes in the movies database example, but you may need to make one of
your own for your database
• https://youtu.be/yr73c5WiliY
REPLICATING THE MOVIES DATABASE
• These are the credentials you
• need, not your IBM ID
SETTING UP A REPLICATION JOB
• Replicate from:
https://examples.cloudant.com/
movies-demo
REMEMBER YOUR CREDENTIALS!
• Well, they are un-memorizable, so remember where they came from. It’s not your Bluemix ID and
password
VIEWING THE MOVIES
• https://849d963b-e883-4420-a23a-
b54b6db5a8a8-
bluemix.cloudant.com/movies/_all_docs?limit=
20&include_docs=true
CREATING QUERIES
CREATING QUERIES
QUERY REFERENCE DOCUMENT
• https://console.bluemix.net/docs/services/Cloudant/api/cloudant_query.html#query
• You probably won’t need all of it, though
• https://youtu.be/B3ZkxSFau8U
EXERCISE
• Go ahead and replicate the movies database to your cloudant instance
• Create a couple queries, for instance all films with Matt Damon
BACK TO CHATBOTS
• Designing the UI for the chatbot, conversational turns, etc is pretty straightforward
• Hooking it into the website is more challenging
• I’ll describe how the conversation_simple sample works
• https://github.com/derekja/conversation-simple
CLONING AND USING THE SAMPLE
• Cloning from https://github.com/derekja/conversation-simple is as usua
• A bit different than before, , though, you can use the cf command line tools instead of the bluemix
console
• Most of these operations can be done through the bluemix UI as well
SETTING UP THE SERVICE
• Setting up the Conversation service
• You can use an existing instance of the Conversation service. Otherwise, follow these steps.
• At the command line, go to the local project directory (conversation-simple).
• cf login
• Create an instance of the Conversation service in Bluemix. For example:
• cf create-service conversation free my-conversation-service
CF LOGIN ISSUES
• I had some problems with “cf login” where it kept rejecting my credentials
• I finally instead used “cf auth derekja@gmail.com pwd” and then “cf target –o derekja@gmail.com –s
dev” to authenticate and set my organization and space
• “cf login” is supposed to do all these steps, but didn’t
• Of course, you’ll use your own space and org and login credentials
BRING IN THE TRAINING DATA
• This is basically the set of test sentences you’ll use with the intents identified
• (https://console.ng.bluemix.net/dashboard/services)
SET SERVICE CREDENTIALS
• Unlike with vcap-local.json, there is little risk of misuse with these service credentials because they can
ONLY access the service you’ve defined, so might as well leave them in the open repo
NPM INSTALL AND START
• Then go to localhost:3000 to run and play with the chatbot
CODE WALKTHROUGH
• App.js again is the root of the application
• Index.html handles the display
• Instead of routes, it is mostly handled in javascript in this example
• Conversation.js and api.js are the two main ones to be aware of. The rest is basically just taking the
response and making nice HTML out of it
PROJECT 3 GRADING (ORIGINAL)
• All project 3 presentation are due on November 29th in class, late projects will not be accepted
• If you are horribly ill and nobody in your group can come in to present, the project itself is still due and the
presentation marks will be forfeit, or if absolutely necessary you can send me a demo video
• 15 points total
• 4 points presentation
• Is the demo good, is the website working, is the story about why it is interesting smooth
• 4 points database design and function (do things actually work)
• What is your table structure like? Talk about any problems you ran into. How was connecting it to the front end?
• 3 points chatbot implementation – is it effectively designed and well implemented?
• 4 points code quality and robustness
• Not everything has to work, but if it is there I want it to do nothing at all or the right thing. How have you structured your code? Is
it commented and easy to understand? Everything checked into github and deployed to the server? Good commit messages?
PROJECT 3 GRADING (REVISED)
• All project 3 presentation are due on November 29th in class, late projects will not be accepted
• If you are horribly ill and nobody in your group can come in to present, the project itself is still due and the
presentation marks will be forfeit, or if absolutely necessary you can send me a demo video
• 15 points total (chatbot grades and database grades can be reversed if desired)
• 4 points presentation
• Is the demo good, is the website working, is the story about why it is interesting smooth
• 5 points database design and function (do things actually work)
• What is your table structure like? Talk about any problems you ran into. How was connecting it to the front end?
• 2 points chatbot implementation – is it effectively designed and well implemented?
• 4 points code quality and robustness
• Not everything has to work, but if it is there I want it to do nothing at all or the right thing. How have you structured your code? Is
it commented and easy to understand? Everything checked into github and deployed to the server? Good commit messages?
HOMEWORK 12 (DUE NOV 29ND BEFORE CLASS)
• Replicate the movies database into your cloudant instance on Bluemix (each group has to do this only
once.. Note the password issue I talked about in lecture)
• Run a simple query for movies that Matt Damon was in
• Write a query for movies that Robert De Niro was in between 1985 and 2001
• For each query screenshot the query and the results

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Untangling spring week8
Untangling spring week8Untangling spring week8
Untangling spring week8
 
Untangling spring week4
Untangling spring week4Untangling spring week4
Untangling spring week4
 
Untangling fall2017 week1
Untangling fall2017 week1Untangling fall2017 week1
Untangling fall2017 week1
 
Untangling spring week12
Untangling spring week12Untangling spring week12
Untangling spring week12
 
Untangling7
Untangling7Untangling7
Untangling7
 
Untangling the web week 2 - SEO
Untangling the web week 2 - SEOUntangling the web week 2 - SEO
Untangling the web week 2 - SEO
 
Untangling spring week2
Untangling spring week2Untangling spring week2
Untangling spring week2
 
A Personal Journey
A Personal JourneyA Personal Journey
A Personal Journey
 
Engage 2019: Modernising Your Domino and XPages Applications
Engage 2019: Modernising Your Domino and XPages Applications Engage 2019: Modernising Your Domino and XPages Applications
Engage 2019: Modernising Your Domino and XPages Applications
 
Untangling fall2017 week2
Untangling fall2017 week2Untangling fall2017 week2
Untangling fall2017 week2
 
Why use Go for web development?
Why use Go for web development?Why use Go for web development?
Why use Go for web development?
 
APIs: A Better Alternative to Page Objects
APIs: A Better Alternative to Page ObjectsAPIs: A Better Alternative to Page Objects
APIs: A Better Alternative to Page Objects
 
Job DSL Plugin for Jenkins
Job DSL Plugin for JenkinsJob DSL Plugin for Jenkins
Job DSL Plugin for Jenkins
 
Untangling6
Untangling6Untangling6
Untangling6
 
Configuration As Code: The Job DSL Plugin
Configuration As Code: The Job DSL PluginConfiguration As Code: The Job DSL Plugin
Configuration As Code: The Job DSL Plugin
 
Jenkins Job DSL plugin
Jenkins Job DSL plugin Jenkins Job DSL plugin
Jenkins Job DSL plugin
 
Dev112 let's calendar that
Dev112   let's calendar thatDev112   let's calendar that
Dev112 let's calendar that
 
Engage 2019 - De04. Java with Domino After XPages
Engage 2019 - De04. Java with Domino After XPagesEngage 2019 - De04. Java with Domino After XPages
Engage 2019 - De04. Java with Domino After XPages
 
The Job DSL Plugin: Introduction & What’s New
The Job DSL Plugin: Introduction & What’s NewThe Job DSL Plugin: Introduction & What’s New
The Job DSL Plugin: Introduction & What’s New
 
Automated Acceptance Testing from Scratch
Automated Acceptance Testing from ScratchAutomated Acceptance Testing from Scratch
Automated Acceptance Testing from Scratch
 

Semelhante a Untangling11

Driving application development through behavior driven development
Driving application development through behavior driven developmentDriving application development through behavior driven development
Driving application development through behavior driven development
Einar Ingebrigtsen
 

Semelhante a Untangling11 (20)

Untangling the web11
Untangling the web11Untangling the web11
Untangling the web11
 
Why Plone Will Die
Why Plone Will DieWhy Plone Will Die
Why Plone Will Die
 
Pearls and Must-Have Tools for the Modern Web / .NET Developer
Pearls and Must-Have Tools for the Modern Web / .NET DeveloperPearls and Must-Have Tools for the Modern Web / .NET Developer
Pearls and Must-Have Tools for the Modern Web / .NET Developer
 
Untangling the web week1
Untangling the web week1Untangling the web week1
Untangling the web week1
 
Untangling spring week1
Untangling spring week1Untangling spring week1
Untangling spring week1
 
SharePoint Framework 101 (SPFx)
SharePoint Framework 101 (SPFx)SharePoint Framework 101 (SPFx)
SharePoint Framework 101 (SPFx)
 
Framing the Argument: How to Scale Faster with NoSQL
Framing the Argument: How to Scale Faster with NoSQLFraming the Argument: How to Scale Faster with NoSQL
Framing the Argument: How to Scale Faster with NoSQL
 
Component-first Applications
Component-first ApplicationsComponent-first Applications
Component-first Applications
 
JSLink for ITPros - SharePoint Saturday Jersey
JSLink for ITPros - SharePoint Saturday JerseyJSLink for ITPros - SharePoint Saturday Jersey
JSLink for ITPros - SharePoint Saturday Jersey
 
How to do b tech be projects or any academic projects
How to do b tech be projects or any academic projectsHow to do b tech be projects or any academic projects
How to do b tech be projects or any academic projects
 
Desert Code Camp Presentation
Desert Code Camp PresentationDesert Code Camp Presentation
Desert Code Camp Presentation
 
Rapid Prototyping with WordPress Page Builders - WordCamp Asheville 2016 - an...
Rapid Prototyping with WordPress Page Builders - WordCamp Asheville 2016 - an...Rapid Prototyping with WordPress Page Builders - WordCamp Asheville 2016 - an...
Rapid Prototyping with WordPress Page Builders - WordCamp Asheville 2016 - an...
 
Survey on Script-based languages to write a Chatbot
Survey on Script-based languages to write a ChatbotSurvey on Script-based languages to write a Chatbot
Survey on Script-based languages to write a Chatbot
 
Feature folders
Feature foldersFeature folders
Feature folders
 
Standardizing and Managing Your Infrastructure - MOSC 2011
Standardizing and Managing Your Infrastructure - MOSC 2011Standardizing and Managing Your Infrastructure - MOSC 2011
Standardizing and Managing Your Infrastructure - MOSC 2011
 
Driving application development through behavior driven development
Driving application development through behavior driven developmentDriving application development through behavior driven development
Driving application development through behavior driven development
 
SharePoint Saturday San Antonio: Workflow 2013
SharePoint Saturday San Antonio: Workflow 2013SharePoint Saturday San Antonio: Workflow 2013
SharePoint Saturday San Antonio: Workflow 2013
 
How engineering practices help business
How engineering practices help businessHow engineering practices help business
How engineering practices help business
 
Automation in Drupal
Automation in DrupalAutomation in Drupal
Automation in Drupal
 
50 Shades of Fail KScope16
50 Shades of Fail KScope1650 Shades of Fail KScope16
50 Shades of Fail KScope16
 

Mais de Derek Jacoby (12)

Untangling - fall2017 - week6
Untangling - fall2017 - week6Untangling - fall2017 - week6
Untangling - fall2017 - week6
 
Untangling - fall2017 - week5
Untangling - fall2017 - week5Untangling - fall2017 - week5
Untangling - fall2017 - week5
 
Untangling the web - fall2017 - class 4
Untangling the web - fall2017 - class 4Untangling the web - fall2017 - class 4
Untangling the web - fall2017 - class 4
 
Untangling the web fall2017 class 3
Untangling the web fall2017 class 3Untangling the web fall2017 class 3
Untangling the web fall2017 class 3
 
Untangling fall2017 week2_try2
Untangling fall2017 week2_try2Untangling fall2017 week2_try2
Untangling fall2017 week2_try2
 
Untangling spring week7
Untangling spring week7Untangling spring week7
Untangling spring week7
 
Untangling spring week6
Untangling spring week6Untangling spring week6
Untangling spring week6
 
Untangling spring week3
Untangling spring week3Untangling spring week3
Untangling spring week3
 
Untangling the web10
Untangling the web10Untangling the web10
Untangling the web10
 
Untangling the web9
Untangling the web9Untangling the web9
Untangling the web9
 
Untangling8
Untangling8Untangling8
Untangling8
 
Untangling4
Untangling4Untangling4
Untangling4
 

Último

Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 

Último (20)

Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 

Untangling11

  • 1. UNTANGLING THE WEB FALL 2017 WEEK 11 – MORE ABOUT DATABASES, BACK TO CHATBOTS, GETTING READY FOR PROJECT 3 NEXT WEEK
  • 2. AGENDA • A few things about replication and queries • Query examples from the movies database • Looking back at chatbots • Project work time – this is your last in-person time with me before project 3 is due
  • 3. DATABSE QUERIES • Unlike SQL queries, querying the Cloudant DB involves indexes and queries, described as JSON • We’ll mostly use the default indexes in the movies database example, but you may need to make one of your own for your database • https://youtu.be/yr73c5WiliY
  • 4. REPLICATING THE MOVIES DATABASE • These are the credentials you • need, not your IBM ID
  • 5. SETTING UP A REPLICATION JOB • Replicate from: https://examples.cloudant.com/ movies-demo
  • 6. REMEMBER YOUR CREDENTIALS! • Well, they are un-memorizable, so remember where they came from. It’s not your Bluemix ID and password
  • 7. VIEWING THE MOVIES • https://849d963b-e883-4420-a23a- b54b6db5a8a8- bluemix.cloudant.com/movies/_all_docs?limit= 20&include_docs=true
  • 10. QUERY REFERENCE DOCUMENT • https://console.bluemix.net/docs/services/Cloudant/api/cloudant_query.html#query • You probably won’t need all of it, though • https://youtu.be/B3ZkxSFau8U
  • 11. EXERCISE • Go ahead and replicate the movies database to your cloudant instance • Create a couple queries, for instance all films with Matt Damon
  • 12. BACK TO CHATBOTS • Designing the UI for the chatbot, conversational turns, etc is pretty straightforward • Hooking it into the website is more challenging • I’ll describe how the conversation_simple sample works • https://github.com/derekja/conversation-simple
  • 13. CLONING AND USING THE SAMPLE • Cloning from https://github.com/derekja/conversation-simple is as usua • A bit different than before, , though, you can use the cf command line tools instead of the bluemix console • Most of these operations can be done through the bluemix UI as well
  • 14. SETTING UP THE SERVICE • Setting up the Conversation service • You can use an existing instance of the Conversation service. Otherwise, follow these steps. • At the command line, go to the local project directory (conversation-simple). • cf login • Create an instance of the Conversation service in Bluemix. For example: • cf create-service conversation free my-conversation-service
  • 15. CF LOGIN ISSUES • I had some problems with “cf login” where it kept rejecting my credentials • I finally instead used “cf auth derekja@gmail.com pwd” and then “cf target –o derekja@gmail.com –s dev” to authenticate and set my organization and space • “cf login” is supposed to do all these steps, but didn’t • Of course, you’ll use your own space and org and login credentials
  • 16. BRING IN THE TRAINING DATA • This is basically the set of test sentences you’ll use with the intents identified • (https://console.ng.bluemix.net/dashboard/services)
  • 17. SET SERVICE CREDENTIALS • Unlike with vcap-local.json, there is little risk of misuse with these service credentials because they can ONLY access the service you’ve defined, so might as well leave them in the open repo
  • 18. NPM INSTALL AND START • Then go to localhost:3000 to run and play with the chatbot
  • 19. CODE WALKTHROUGH • App.js again is the root of the application • Index.html handles the display • Instead of routes, it is mostly handled in javascript in this example • Conversation.js and api.js are the two main ones to be aware of. The rest is basically just taking the response and making nice HTML out of it
  • 20. PROJECT 3 GRADING (ORIGINAL) • All project 3 presentation are due on November 29th in class, late projects will not be accepted • If you are horribly ill and nobody in your group can come in to present, the project itself is still due and the presentation marks will be forfeit, or if absolutely necessary you can send me a demo video • 15 points total • 4 points presentation • Is the demo good, is the website working, is the story about why it is interesting smooth • 4 points database design and function (do things actually work) • What is your table structure like? Talk about any problems you ran into. How was connecting it to the front end? • 3 points chatbot implementation – is it effectively designed and well implemented? • 4 points code quality and robustness • Not everything has to work, but if it is there I want it to do nothing at all or the right thing. How have you structured your code? Is it commented and easy to understand? Everything checked into github and deployed to the server? Good commit messages?
  • 21. PROJECT 3 GRADING (REVISED) • All project 3 presentation are due on November 29th in class, late projects will not be accepted • If you are horribly ill and nobody in your group can come in to present, the project itself is still due and the presentation marks will be forfeit, or if absolutely necessary you can send me a demo video • 15 points total (chatbot grades and database grades can be reversed if desired) • 4 points presentation • Is the demo good, is the website working, is the story about why it is interesting smooth • 5 points database design and function (do things actually work) • What is your table structure like? Talk about any problems you ran into. How was connecting it to the front end? • 2 points chatbot implementation – is it effectively designed and well implemented? • 4 points code quality and robustness • Not everything has to work, but if it is there I want it to do nothing at all or the right thing. How have you structured your code? Is it commented and easy to understand? Everything checked into github and deployed to the server? Good commit messages?
  • 22. HOMEWORK 12 (DUE NOV 29ND BEFORE CLASS) • Replicate the movies database into your cloudant instance on Bluemix (each group has to do this only once.. Note the password issue I talked about in lecture) • Run a simple query for movies that Matt Damon was in • Write a query for movies that Robert De Niro was in between 1985 and 2001 • For each query screenshot the query and the results