SlideShare a Scribd company logo
1 of 18
UNTANGLING THE WEB
WEEK 9 – ASYNCHRONOUS BEHAVIOR, DATABASES, PROJECT 3
AGENDA
• Homework 8 discussion
• Asynchronous javascript
• Databases
• JSON introduction
• Project 3 discussion
• Homework 9
HOMEWORK 8 – MAIN POINTS
• Can organize a github repository with directories, just like anywhere else on the filesystem
• W3schools and MDN are good resources, but far from the only resources.
• Who found some good video sites?
• Who found some good tutorial sites?
ASYNCHRONOUS JAVASCRIPT
• What’s a callback? You’ve used them before! In the maps example
• What’s a promise?
• What’s a promise chain?
• Anyone come across async/await?
CALLBACK EXAMPLE
• https://jsfiddle.net/3cew460a/
PROMISE EXAMPLE
• https://jsfiddle.net/s3m4xv1o/
PROMISE CHAINING EXAMPLE
• https://jsfiddle.net/8Lf4zof3/
• https://www.youtube.com/watch?v=a1cTkiNuEwM
ASYNC/AWAIT
• Let’s watch rather than work
• It is an ES7 feature, so will have to use babel as a transpiler if we want to use it
• https://www.youtube.com/watch?v=COKdtOgopWQ
DATABASES
• SQL versus noSQL
• Flavours of SQL and noSQL
• Why use a database at all?
• Advanced database topics
• Schema design
• Replication
• Transactions
SQL VERSUS NOSQL
• SQL – Structured Query Language
• Relational database
• Use when you need multiple tables and
when you need to construct queries that
span those tables
• More functional than flat databases, but
also slower and more complex
• Can exist in either client or server
flavours
 NoSQL databases – anything that isn’t relational!
 MongoDB is a popular server-based flavor
 Redis is a local memory-mapped flavor
 Cloudant, couchDB, etc. there are many, many
types
 All are good for rapid, flat table access
 Avoid the complexities of relational databases
while still preserving the benefits
LOCAL SQL EXAMPLE – CARS DATABASE
• https://jsfiddle.net/m5rh3a83/1/
• (for more details see here: https://www.tutorialspoint.com/html5/html5_web_sql.htm)
MORE REALISTIC SQL EXAMPLE
• http://sqlfiddle.com/#!9/1d643/23
• (video help here: https://www.youtube.com/watch?v=DDVOMRvyAS4)
SQLZOO
• http://sqlzoo.net/
• Go do some exercises!
• (https://www.sqlteaching.com is an alternative if you want some more exercises)
MULTIPLE TABLES
• You will usually have more than one table
• If you have only one table, it is time to consider a NoSQL database
• Look on SQLZoo for the JOINS sections and make sense of that
• http://sqlzoo.net/wiki/The_JOIN_operation
• If you want more complex examples on a real database you can play here:
• http://data.stackexchange.com/stackoverflow/queries
• More about joins
• https://blog.codinghorror.com/a-visual-explanation-of-sql-joins/
WORK ON YOUR PROJECT 3 DATABASE
• Draw out your table structure and then enter it into sqlfiddle
• Write a couple queries
• Did it work?
PROJECT 3
• This is the back end, I would suggest all of you do a database connection
• If you feel strongly about some other back end component that is possible, but each of your project 2
submissions has a pretty straightforward database connection
• At the end of project 3, you will each demo your finished application
• Finished in the case, of course, means finished to the point of demo’ing it
• I don’t care if there are things that don’t work, but your demo path should work and talk to an actual
database
•
PROJECT 3 GRADING
• All project 3 presentation are due on March 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
• 5 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?
• 5 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?
HOMEWORK 8 – LOCAL CLIENT-SIDE DATABASE
• Take the cars webSQL example and modify it to hold place names and latitude/longitude points in a
local database
• As locations are added, add them to a google map on the page as a marker
• Extra special bonus problem (+2 points):
• Instead of doing this by means of degrees, use meters, allowing the user to input how far they want the list to
populate from campus
• (NB. This is rather tricky and you’ll want to use the haversine formula: http://www.movable-
type.co.uk/scripts/latlong.html, or use the google maps APIs)

More Related Content

What's hot

Untangling - fall2017 - week 9
Untangling - fall2017 - week 9Untangling - fall2017 - week 9
Untangling - fall2017 - week 9Derek Jacoby
 
Untangling - fall2017 - week 8
Untangling - fall2017 - week 8Untangling - fall2017 - week 8
Untangling - fall2017 - week 8Derek Jacoby
 
Untangling spring week12
Untangling spring week12Untangling spring week12
Untangling spring week12Derek Jacoby
 
Untangling - fall2017 - week 10
Untangling - fall2017 - week 10Untangling - fall2017 - week 10
Untangling - fall2017 - week 10Derek Jacoby
 
Untangling fall2017 week1
Untangling fall2017 week1Untangling fall2017 week1
Untangling fall2017 week1Derek Jacoby
 
Untangling the web - fall2017 - class 4
Untangling the web - fall2017 - class 4Untangling the web - fall2017 - class 4
Untangling the web - fall2017 - class 4Derek Jacoby
 
Untangling the web10
Untangling the web10Untangling the web10
Untangling the web10Derek Jacoby
 
Untangling - fall2017 - week6
Untangling - fall2017 - week6Untangling - fall2017 - week6
Untangling - fall2017 - week6Derek Jacoby
 
Untangling the web week 2 - SEO
Untangling the web week 2 - SEOUntangling the web week 2 - SEO
Untangling the web week 2 - SEODerek Jacoby
 
Why use Go for web development?
Why use Go for web development?Why use Go for web development?
Why use Go for web development?Weng Wei
 
Untangling spring week2
Untangling spring week2Untangling spring week2
Untangling spring week2Derek Jacoby
 
BP101: A Modernized Workflow w/ Domino/XPages
BP101: A Modernized Workflow w/ Domino/XPagesBP101: A Modernized Workflow w/ Domino/XPages
BP101: A Modernized Workflow w/ Domino/XPagesedm00se
 
WordPress APIs
WordPress APIsWordPress APIs
WordPress APIsmdawaffe
 
Untangling fall2017 week2
Untangling fall2017 week2Untangling fall2017 week2
Untangling fall2017 week2Derek Jacoby
 
Bootstrap and XPages (DanNotes 2013)
Bootstrap and XPages (DanNotes 2013)Bootstrap and XPages (DanNotes 2013)
Bootstrap and XPages (DanNotes 2013)Mark Leusink
 
Understanding XHProf: Pinpointing Why Your Site is Slow and How to Fix it - S...
Understanding XHProf: Pinpointing Why Your Site is Slow and How to Fix it - S...Understanding XHProf: Pinpointing Why Your Site is Slow and How to Fix it - S...
Understanding XHProf: Pinpointing Why Your Site is Slow and How to Fix it - S...Ezra Gildesgame
 
Copass + Ruby on Rails = <3 - From Simplicity to Complexity
Copass + Ruby on Rails = <3 - From Simplicity to ComplexityCopass + Ruby on Rails = <3 - From Simplicity to Complexity
Copass + Ruby on Rails = <3 - From Simplicity to ComplexityAugustin Riedinger
 
5 things STILL! TOO! HARD! in Plone 5
5 things STILL! TOO! HARD! in Plone 55 things STILL! TOO! HARD! in Plone 5
5 things STILL! TOO! HARD! in Plone 5Dylan Jay
 

What's hot (20)

Untangling - fall2017 - week 9
Untangling - fall2017 - week 9Untangling - fall2017 - week 9
Untangling - fall2017 - week 9
 
Untangling6
Untangling6Untangling6
Untangling6
 
Untangling - fall2017 - week 8
Untangling - fall2017 - week 8Untangling - fall2017 - week 8
Untangling - fall2017 - week 8
 
Untangling spring week12
Untangling spring week12Untangling spring week12
Untangling spring week12
 
Untangling11
Untangling11Untangling11
Untangling11
 
Untangling - fall2017 - week 10
Untangling - fall2017 - week 10Untangling - fall2017 - week 10
Untangling - fall2017 - week 10
 
Untangling fall2017 week1
Untangling fall2017 week1Untangling fall2017 week1
Untangling fall2017 week1
 
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 web10
Untangling the web10Untangling the web10
Untangling the web10
 
Untangling - fall2017 - week6
Untangling - fall2017 - week6Untangling - fall2017 - week6
Untangling - fall2017 - week6
 
Untangling the web week 2 - SEO
Untangling the web week 2 - SEOUntangling the web week 2 - SEO
Untangling the web week 2 - SEO
 
Why use Go for web development?
Why use Go for web development?Why use Go for web development?
Why use Go for web development?
 
Untangling spring week2
Untangling spring week2Untangling spring week2
Untangling spring week2
 
BP101: A Modernized Workflow w/ Domino/XPages
BP101: A Modernized Workflow w/ Domino/XPagesBP101: A Modernized Workflow w/ Domino/XPages
BP101: A Modernized Workflow w/ Domino/XPages
 
WordPress APIs
WordPress APIsWordPress APIs
WordPress APIs
 
Untangling fall2017 week2
Untangling fall2017 week2Untangling fall2017 week2
Untangling fall2017 week2
 
Bootstrap and XPages (DanNotes 2013)
Bootstrap and XPages (DanNotes 2013)Bootstrap and XPages (DanNotes 2013)
Bootstrap and XPages (DanNotes 2013)
 
Understanding XHProf: Pinpointing Why Your Site is Slow and How to Fix it - S...
Understanding XHProf: Pinpointing Why Your Site is Slow and How to Fix it - S...Understanding XHProf: Pinpointing Why Your Site is Slow and How to Fix it - S...
Understanding XHProf: Pinpointing Why Your Site is Slow and How to Fix it - S...
 
Copass + Ruby on Rails = <3 - From Simplicity to Complexity
Copass + Ruby on Rails = <3 - From Simplicity to ComplexityCopass + Ruby on Rails = <3 - From Simplicity to Complexity
Copass + Ruby on Rails = <3 - From Simplicity to Complexity
 
5 things STILL! TOO! HARD! in Plone 5
5 things STILL! TOO! HARD! in Plone 55 things STILL! TOO! HARD! in Plone 5
5 things STILL! TOO! HARD! in Plone 5
 

Viewers also liked

Untangling spring week7
Untangling spring week7Untangling spring week7
Untangling spring week7Derek Jacoby
 
Untangling spring week6
Untangling spring week6Untangling spring week6
Untangling spring week6Derek Jacoby
 
Untangling spring week3
Untangling spring week3Untangling spring week3
Untangling spring week3Derek Jacoby
 
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...Lucas Jellema
 
Tracxn Research - Mobile Advertising Landscape, February 2017
Tracxn Research - Mobile Advertising Landscape, February 2017Tracxn Research - Mobile Advertising Landscape, February 2017
Tracxn Research - Mobile Advertising Landscape, February 2017Tracxn
 
Untangling spring week1
Untangling spring week1Untangling spring week1
Untangling spring week1Derek Jacoby
 
Mapa mental cooperativas
Mapa mental cooperativasMapa mental cooperativas
Mapa mental cooperativasRonny Ocanto
 
Ryan del rosario
Ryan del rosarioRyan del rosario
Ryan del rosarioyanyanz
 
Desigualdade de gênero no brasil
Desigualdade de gênero no brasilDesigualdade de gênero no brasil
Desigualdade de gênero no brasilFabio Cruz
 
Focus on Your Analysis, Not Your SQL Code
Focus on Your Analysis, Not Your SQL CodeFocus on Your Analysis, Not Your SQL Code
Focus on Your Analysis, Not Your SQL CodeDATAVERSITY
 
Untangling the web - week 3
Untangling the web - week 3Untangling the web - week 3
Untangling the web - week 3Derek Jacoby
 
2015 Internet Trends Report
2015 Internet Trends Report2015 Internet Trends Report
2015 Internet Trends ReportIQbal KHan
 
Untangling the web9
Untangling the web9Untangling the web9
Untangling the web9Derek Jacoby
 

Viewers also liked (19)

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
 
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
 
Tracxn Research - Mobile Advertising Landscape, February 2017
Tracxn Research - Mobile Advertising Landscape, February 2017Tracxn Research - Mobile Advertising Landscape, February 2017
Tracxn Research - Mobile Advertising Landscape, February 2017
 
Untangling spring week1
Untangling spring week1Untangling spring week1
Untangling spring week1
 
Mapa mental cooperativas
Mapa mental cooperativasMapa mental cooperativas
Mapa mental cooperativas
 
Meta 4.2
Meta 4.2Meta 4.2
Meta 4.2
 
Discapacidad visual
Discapacidad visualDiscapacidad visual
Discapacidad visual
 
Ryan del rosario
Ryan del rosarioRyan del rosario
Ryan del rosario
 
Desigualdade de gênero no brasil
Desigualdade de gênero no brasilDesigualdade de gênero no brasil
Desigualdade de gênero no brasil
 
Focus on Your Analysis, Not Your SQL Code
Focus on Your Analysis, Not Your SQL CodeFocus on Your Analysis, Not Your SQL Code
Focus on Your Analysis, Not Your SQL Code
 
El Mundo, mi pasión
El Mundo, mi pasiónEl Mundo, mi pasión
El Mundo, mi pasión
 
Power tema general
Power tema generalPower tema general
Power tema general
 
Viajar es mi pasión
Viajar es mi pasiónViajar es mi pasión
Viajar es mi pasión
 
Google Cloud Spanner Preview
Google Cloud Spanner PreviewGoogle Cloud Spanner Preview
Google Cloud Spanner Preview
 
Untangling the web - week 3
Untangling the web - week 3Untangling the web - week 3
Untangling the web - week 3
 
2015 Internet Trends Report
2015 Internet Trends Report2015 Internet Trends Report
2015 Internet Trends Report
 
Untangling the web9
Untangling the web9Untangling the web9
Untangling the web9
 

Similar to Untangling spring week9

Ten query tuning techniques every SQL Server programmer should know
Ten query tuning techniques every SQL Server programmer should knowTen query tuning techniques every SQL Server programmer should know
Ten query tuning techniques every SQL Server programmer should knowKevin Kline
 
Untangling the web week1
Untangling the web week1Untangling the web week1
Untangling the web week1Derek Jacoby
 
Automated Visual Regression Testing by Dave Sadlon
Automated Visual Regression Testing by Dave SadlonAutomated Visual Regression Testing by Dave Sadlon
Automated Visual Regression Testing by Dave SadlonQA or the Highway
 
Lessons PostgreSQL learned from commercial databases, and didn’t
Lessons PostgreSQL learned from commercial databases, and didn’tLessons PostgreSQL learned from commercial databases, and didn’t
Lessons PostgreSQL learned from commercial databases, and didn’tPGConf APAC
 
JSLink for ITPros - SharePoint Saturday Jersey
JSLink for ITPros - SharePoint Saturday JerseyJSLink for ITPros - SharePoint Saturday Jersey
JSLink for ITPros - SharePoint Saturday JerseyPaul Hunt
 
Performance Benchmarking: Tips, Tricks, and Lessons Learned
Performance Benchmarking: Tips, Tricks, and Lessons LearnedPerformance Benchmarking: Tips, Tricks, and Lessons Learned
Performance Benchmarking: Tips, Tricks, and Lessons LearnedTim Callaghan
 
Contributing to rails
Contributing to railsContributing to rails
Contributing to railsLukas Eppler
 
Laug Mootools And Common Js
Laug   Mootools And Common JsLaug   Mootools And Common Js
Laug Mootools And Common JsSkills Matter
 
A tale of 3 databases
A tale of 3 databasesA tale of 3 databases
A tale of 3 databasesChris Skardon
 
What is spatial sql
What is spatial sqlWhat is spatial sql
What is spatial sqlshawty_ds
 
The Characteristics of a Successful SPA
The Characteristics of a Successful SPAThe Characteristics of a Successful SPA
The Characteristics of a Successful SPAGil Fink
 
5 Common Mistakes You are Making on your Website
 5 Common Mistakes You are Making on your Website 5 Common Mistakes You are Making on your Website
5 Common Mistakes You are Making on your WebsiteAcquia
 
Webpack: What it is, What it does, Whether you need it
Webpack: What it is, What it does, Whether you need itWebpack: What it is, What it does, Whether you need it
Webpack: What it is, What it does, Whether you need itMike Wilcox
 
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 DeveloperOfer Zelig
 
SSIS Monitoring Deep Dive
SSIS Monitoring Deep Dive�SSIS Monitoring Deep Dive�
SSIS Monitoring Deep DiveSolidQIT
 
SSIS Monitoring Deep Dive
SSIS Monitoring Deep DiveSSIS Monitoring Deep Dive
SSIS Monitoring Deep DiveDavide Mauri
 
[DBA]_HiramFleitas_SQL_PASS_Summit_2017_Summary
[DBA]_HiramFleitas_SQL_PASS_Summit_2017_Summary[DBA]_HiramFleitas_SQL_PASS_Summit_2017_Summary
[DBA]_HiramFleitas_SQL_PASS_Summit_2017_SummaryHiram Fleitas León
 
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 2011Brian Ritchie
 
SQL Server 2016 JSON
SQL Server 2016 JSONSQL Server 2016 JSON
SQL Server 2016 JSONDavide Mauri
 

Similar to Untangling spring week9 (20)

Ten query tuning techniques every SQL Server programmer should know
Ten query tuning techniques every SQL Server programmer should knowTen query tuning techniques every SQL Server programmer should know
Ten query tuning techniques every SQL Server programmer should know
 
Untangling the web week1
Untangling the web week1Untangling the web week1
Untangling the web week1
 
Automated Visual Regression Testing by Dave Sadlon
Automated Visual Regression Testing by Dave SadlonAutomated Visual Regression Testing by Dave Sadlon
Automated Visual Regression Testing by Dave Sadlon
 
Lessons PostgreSQL learned from commercial databases, and didn’t
Lessons PostgreSQL learned from commercial databases, and didn’tLessons PostgreSQL learned from commercial databases, and didn’t
Lessons PostgreSQL learned from commercial databases, and didn’t
 
JSLink for ITPros - SharePoint Saturday Jersey
JSLink for ITPros - SharePoint Saturday JerseyJSLink for ITPros - SharePoint Saturday Jersey
JSLink for ITPros - SharePoint Saturday Jersey
 
Performance Benchmarking: Tips, Tricks, and Lessons Learned
Performance Benchmarking: Tips, Tricks, and Lessons LearnedPerformance Benchmarking: Tips, Tricks, and Lessons Learned
Performance Benchmarking: Tips, Tricks, and Lessons Learned
 
Contributing to rails
Contributing to railsContributing to rails
Contributing to rails
 
Laug Mootools And Common Js
Laug   Mootools And Common JsLaug   Mootools And Common Js
Laug Mootools And Common Js
 
A tale of 3 databases
A tale of 3 databasesA tale of 3 databases
A tale of 3 databases
 
What is spatial sql
What is spatial sqlWhat is spatial sql
What is spatial sql
 
The Characteristics of a Successful SPA
The Characteristics of a Successful SPAThe Characteristics of a Successful SPA
The Characteristics of a Successful SPA
 
SharePoint Framework 101 (SPFx)
SharePoint Framework 101 (SPFx)SharePoint Framework 101 (SPFx)
SharePoint Framework 101 (SPFx)
 
5 Common Mistakes You are Making on your Website
 5 Common Mistakes You are Making on your Website 5 Common Mistakes You are Making on your Website
5 Common Mistakes You are Making on your Website
 
Webpack: What it is, What it does, Whether you need it
Webpack: What it is, What it does, Whether you need itWebpack: What it is, What it does, Whether you need it
Webpack: What it is, What it does, Whether you need it
 
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
 
SSIS Monitoring Deep Dive
SSIS Monitoring Deep Dive�SSIS Monitoring Deep Dive�
SSIS Monitoring Deep Dive
 
SSIS Monitoring Deep Dive
SSIS Monitoring Deep DiveSSIS Monitoring Deep Dive
SSIS Monitoring Deep Dive
 
[DBA]_HiramFleitas_SQL_PASS_Summit_2017_Summary
[DBA]_HiramFleitas_SQL_PASS_Summit_2017_Summary[DBA]_HiramFleitas_SQL_PASS_Summit_2017_Summary
[DBA]_HiramFleitas_SQL_PASS_Summit_2017_Summary
 
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
 
SQL Server 2016 JSON
SQL Server 2016 JSONSQL Server 2016 JSON
SQL Server 2016 JSON
 

Recently uploaded

Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 

Recently uploaded (20)

Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 

Untangling spring week9

  • 1. UNTANGLING THE WEB WEEK 9 – ASYNCHRONOUS BEHAVIOR, DATABASES, PROJECT 3
  • 2. AGENDA • Homework 8 discussion • Asynchronous javascript • Databases • JSON introduction • Project 3 discussion • Homework 9
  • 3. HOMEWORK 8 – MAIN POINTS • Can organize a github repository with directories, just like anywhere else on the filesystem • W3schools and MDN are good resources, but far from the only resources. • Who found some good video sites? • Who found some good tutorial sites?
  • 4. ASYNCHRONOUS JAVASCRIPT • What’s a callback? You’ve used them before! In the maps example • What’s a promise? • What’s a promise chain? • Anyone come across async/await?
  • 7. PROMISE CHAINING EXAMPLE • https://jsfiddle.net/8Lf4zof3/ • https://www.youtube.com/watch?v=a1cTkiNuEwM
  • 8. ASYNC/AWAIT • Let’s watch rather than work • It is an ES7 feature, so will have to use babel as a transpiler if we want to use it • https://www.youtube.com/watch?v=COKdtOgopWQ
  • 9. DATABASES • SQL versus noSQL • Flavours of SQL and noSQL • Why use a database at all? • Advanced database topics • Schema design • Replication • Transactions
  • 10. SQL VERSUS NOSQL • SQL – Structured Query Language • Relational database • Use when you need multiple tables and when you need to construct queries that span those tables • More functional than flat databases, but also slower and more complex • Can exist in either client or server flavours  NoSQL databases – anything that isn’t relational!  MongoDB is a popular server-based flavor  Redis is a local memory-mapped flavor  Cloudant, couchDB, etc. there are many, many types  All are good for rapid, flat table access  Avoid the complexities of relational databases while still preserving the benefits
  • 11. LOCAL SQL EXAMPLE – CARS DATABASE • https://jsfiddle.net/m5rh3a83/1/ • (for more details see here: https://www.tutorialspoint.com/html5/html5_web_sql.htm)
  • 12. MORE REALISTIC SQL EXAMPLE • http://sqlfiddle.com/#!9/1d643/23 • (video help here: https://www.youtube.com/watch?v=DDVOMRvyAS4)
  • 13. SQLZOO • http://sqlzoo.net/ • Go do some exercises! • (https://www.sqlteaching.com is an alternative if you want some more exercises)
  • 14. MULTIPLE TABLES • You will usually have more than one table • If you have only one table, it is time to consider a NoSQL database • Look on SQLZoo for the JOINS sections and make sense of that • http://sqlzoo.net/wiki/The_JOIN_operation • If you want more complex examples on a real database you can play here: • http://data.stackexchange.com/stackoverflow/queries • More about joins • https://blog.codinghorror.com/a-visual-explanation-of-sql-joins/
  • 15. WORK ON YOUR PROJECT 3 DATABASE • Draw out your table structure and then enter it into sqlfiddle • Write a couple queries • Did it work?
  • 16. PROJECT 3 • This is the back end, I would suggest all of you do a database connection • If you feel strongly about some other back end component that is possible, but each of your project 2 submissions has a pretty straightforward database connection • At the end of project 3, you will each demo your finished application • Finished in the case, of course, means finished to the point of demo’ing it • I don’t care if there are things that don’t work, but your demo path should work and talk to an actual database •
  • 17. PROJECT 3 GRADING • All project 3 presentation are due on March 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 • 5 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? • 5 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?
  • 18. HOMEWORK 8 – LOCAL CLIENT-SIDE DATABASE • Take the cars webSQL example and modify it to hold place names and latitude/longitude points in a local database • As locations are added, add them to a google map on the page as a marker • Extra special bonus problem (+2 points): • Instead of doing this by means of degrees, use meters, allowing the user to input how far they want the list to populate from campus • (NB. This is rather tricky and you’ll want to use the haversine formula: http://www.movable- type.co.uk/scripts/latlong.html, or use the google maps APIs)