SlideShare a Scribd company logo
UNTANGLING THE WEB
WEEK 11 – MORE FUN WITH DATABASES, DEBUGGING, PUTTING IT ALL
TOGETHER
AGENDA
• More about debugging and build environments
• HTTP get and post messages, forms
• Pulling responses out of post messages
• Look back to asynchronous js
• Callbacks and promises, async library
• JSON and restful APIs
• Project 3 presentations
• Homework 11
HW10 QUESTIONS
• Has each group managed to get a database of their own up and
listing on a web page?
• What parts were hard?
DEBUGGERS
• We’ve used chrome developer tools, this is a rudimentary
debugger
• Better is the one built into VS Code because it can also debug
on the server side
• Need to do just a little bit of setup to enable it
VS CODE SETUP
• Nice tutorial on
https://code.visualstudio.com/docs/nodejs/nodejs-tutorial
• More debugging details at
https://code.visualstudio.com/docs/editor/debugging
• Let’s go through the tutorial together, just for more practice in
starting projects
GENERATORS
• This is something that gives you a framework from which to
start your application
• Boilerplate projects are similar
• Use them, but make sure you know what they are doing!
BUNDLING AND BUILD ENVIRONMENTS
• Good video here:
https://www.youtube.com/watch?v=PcqYhSH44Ow
• (this just came across my feed today and I thought it was
interesting. You don’t need most of it for this class, though.)
EXERCISE 1
• Make sure you have nodejs installed
• Follow the tutorial we just went through on
https://code.visualstudio.com/docs/nodejs/nodejs-tutorial
• We’ll take 10-15 minutes on it (hopefully, I still suspect there
may be local development environment setup issues lurking
around…)
FORMS
• We haven’t used forms in our HTML much yet.
• They primarily provide benefit when using AJAX or other
server-side round-trips
• In this case we are using express.js routes as our server side
• We will use a form primarily as a tool to submit data
HTTP GET AND POST MESSAGES
• All of our routes have been get routes so far
• We will use our first post route today
• Need to set up an express route using app.post rather than
app.get
BODY-PARSER
• We will use a new npm module to be able to easily access the
body of the request object
• Look at the entire object and what it contains, being able to
just access the body is a great simplification
• (review npm install, the require statement)
GRABBING VARIABLES OFF THE REQUEST
OBJECT
• Best use is to grab the variables that we have named in our
html
• Can be any number of these, but just one is used in the current
example
ASYNCHRONOUS JAVASCRIPT
• Remember callbacks?
• How about promises?
• We’re going to use an NPM module called async to make this
easier
• (once more through npm install and setting up the require
statements)
EXERCISE 2
• Create a branch in your fork of the simpleNode project and
checkout that branch (can be done all in one step with “git
checkout –b branchname”
• Create your own example page (feel free to copy some of what
you need from the files in the project, but you’ll want to create
new files)
• Using the testDB database and the employees table, create a
page that allows you to query by salary (or one of the other
fields)
JSON AND RESTFUL API STANDARDS
• JSON – javascript object notation
• You’ve used this a bunch already but haven’t used this name for it.
Basically anytime you are using the object.property notation you are
using JSON
• RESTful APIs - Representational State Transfer
• Really complete discussion here:
http://stackoverflow.com/questions/671118/what-exactly-is-restful-
programming
• Basic thing you have to know is that it is stateless, so the call carries
everything that you need to complete the request. Our GET and POST
actions today are prime examples.
PROJECT 3 PRESENTATIONS
• This is next week!
• Each group will have a maximum of 10 minutes to present.
• 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?
PROJECT 3 PRESENTATIONS
• I’m not looking for the whole design story like in project 1
• Instead I want your quick run-through of your functionality,
wrapped in the story of why it is interesting. Pretend you get 3-
5 minutes in front of an investor and want to convince them
that you have something cool
• Rest of the time should be spent talking about your database
design and any development issues you ran into
• 10 minutes max!
HOMEWORK 11
• You can use your database structure from hw10 for this
• Create a web page with a list for results, a text field, and a button
• When the button is pressed, execute the query based on the text
field and populate the results list with it
• The page should be styled with CSS in a separate CSS file
• Turn in by class on 3/29 with a list of who worked on it and the
github link. You do not need to have a running server this time
because you will be using that for your project 3, but when I clone
and pull your project it should work properly.

More Related Content

What's hot

Untangling - fall2017 - week 9
Untangling - fall2017 - week 9Untangling - fall2017 - week 9
Untangling - fall2017 - week 9
Derek Jacoby
 
Untangling spring week4
Untangling spring week4Untangling spring week4
Untangling spring week4
Derek Jacoby
 
Untangling the web11
Untangling the web11Untangling the web11
Untangling the web11
Derek Jacoby
 
Untangling11
Untangling11Untangling11
Untangling11
Derek Jacoby
 
Untangling - fall2017 - week 10
Untangling - fall2017 - week 10Untangling - fall2017 - week 10
Untangling - fall2017 - week 10
Derek Jacoby
 
Untangling fall2017 week2
Untangling fall2017 week2Untangling fall2017 week2
Untangling fall2017 week2
Derek Jacoby
 
Untangling the web - fall2017 - class 4
Untangling the web - fall2017 - class 4Untangling the web - fall2017 - class 4
Untangling the web - fall2017 - class 4
Derek Jacoby
 
Untangling the web week 2 - SEO
Untangling the web week 2 - SEOUntangling the web week 2 - SEO
Untangling the web week 2 - SEO
Derek Jacoby
 
Untangling - fall2017 - week6
Untangling - fall2017 - week6Untangling - fall2017 - week6
Untangling - fall2017 - week6
Derek Jacoby
 
Untangling spring week2
Untangling spring week2Untangling spring week2
Untangling spring week2
Derek 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 the web10
Untangling the web10Untangling the web10
Untangling the web10
Derek Jacoby
 
Cvcc performance tuning
Cvcc performance tuningCvcc performance tuning
Cvcc performance tuning
John McCaffrey
 
improving the performance of Rails web Applications
improving the performance of Rails web Applicationsimproving the performance of Rails web Applications
improving the performance of Rails web Applications
John McCaffrey
 
WordPress APIs
WordPress APIsWordPress APIs
WordPress APIs
mdawaffe
 
Blazor - .NET in the Browser!
Blazor - .NET in the Browser!Blazor - .NET in the Browser!
Blazor - .NET in the Browser!
David Paquette
 
Engage 2019 Software documentation is fun if you have the right tools: Introd...
Engage 2019 Software documentation is fun if you have the right tools: Introd...Engage 2019 Software documentation is fun if you have the right tools: Introd...
Engage 2019 Software documentation is fun if you have the right tools: Introd...
AndrewMagerman
 
A Personal Journey
A Personal JourneyA Personal Journey
A Personal Journey
Michael Lihs
 
What Multisite can do for You - Anthony Cole - WordCamp Sydney 2012
What Multisite can do for You - Anthony Cole - WordCamp Sydney 2012What Multisite can do for You - Anthony Cole - WordCamp Sydney 2012
What Multisite can do for You - Anthony Cole - WordCamp Sydney 2012
WordCamp Sydney
 

What's hot (20)

Untangling - fall2017 - week 9
Untangling - fall2017 - week 9Untangling - fall2017 - week 9
Untangling - fall2017 - week 9
 
Untangling spring week4
Untangling spring week4Untangling spring week4
Untangling spring week4
 
Untangling the web11
Untangling the web11Untangling the web11
Untangling the web11
 
Untangling11
Untangling11Untangling11
Untangling11
 
Untangling - fall2017 - week 10
Untangling - fall2017 - week 10Untangling - fall2017 - week 10
Untangling - fall2017 - week 10
 
Untangling fall2017 week2
Untangling fall2017 week2Untangling fall2017 week2
Untangling fall2017 week2
 
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 week 2 - SEO
Untangling the web week 2 - SEOUntangling the web week 2 - SEO
Untangling the web week 2 - SEO
 
Untangling - fall2017 - week6
Untangling - fall2017 - week6Untangling - fall2017 - week6
Untangling - fall2017 - week6
 
Untangling spring week2
Untangling spring week2Untangling spring week2
Untangling spring 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?
 
Untangling the web10
Untangling the web10Untangling the web10
Untangling the web10
 
Cvcc performance tuning
Cvcc performance tuningCvcc performance tuning
Cvcc performance tuning
 
improving the performance of Rails web Applications
improving the performance of Rails web Applicationsimproving the performance of Rails web Applications
improving the performance of Rails web Applications
 
WordPress APIs
WordPress APIsWordPress APIs
WordPress APIs
 
Blazor - .NET in the Browser!
Blazor - .NET in the Browser!Blazor - .NET in the Browser!
Blazor - .NET in the Browser!
 
Cloud tools
Cloud toolsCloud tools
Cloud tools
 
Engage 2019 Software documentation is fun if you have the right tools: Introd...
Engage 2019 Software documentation is fun if you have the right tools: Introd...Engage 2019 Software documentation is fun if you have the right tools: Introd...
Engage 2019 Software documentation is fun if you have the right tools: Introd...
 
A Personal Journey
A Personal JourneyA Personal Journey
A Personal Journey
 
What Multisite can do for You - Anthony Cole - WordCamp Sydney 2012
What Multisite can do for You - Anthony Cole - WordCamp Sydney 2012What Multisite can do for You - Anthony Cole - WordCamp Sydney 2012
What Multisite can do for You - Anthony Cole - WordCamp Sydney 2012
 

Viewers also liked

Definiciones claves que sustentan el perfil del egreso
Definiciones claves que sustentan el perfil del egresoDefiniciones claves que sustentan el perfil del egreso
Definiciones claves que sustentan el perfil del egreso
Paola Morales
 
F8 aus information about sugar 2009
F8 aus information about sugar 2009F8 aus information about sugar 2009
F8 aus information about sugar 2009
Diabetes for all
 
F8 aus reading food labels
F8 aus reading food labelsF8 aus reading food labels
F8 aus reading food labels
Diabetes for all
 
Scientific and Technical Translation in English - Week 3
Scientific and Technical Translation in English - Week 3Scientific and Technical Translation in English - Week 3
Scientific and Technical Translation in English - Week 3
Ron Martinez
 
Literal g informe de cédula prespuestaria de gastos-marzo_2016
Literal g informe de cédula prespuestaria de gastos-marzo_2016Literal g informe de cédula prespuestaria de gastos-marzo_2016
Literal g informe de cédula prespuestaria de gastos-marzo_2016
Gobierno Autónomo Descentralizado de la Parroquia Rural de Puembo
 
Dibujos animados rocio
Dibujos  animados   rocioDibujos  animados   rocio
Dibujos animados rocio
jinneth22
 
Motivacion
MotivacionMotivacion
Motivacion
lisethlopez24
 
Transistores
TransistoresTransistores
Transistores
joseatejedor
 
Ambush marketing
Ambush marketing Ambush marketing
Ambush marketing
Sreelekshmi Mohan
 
Gaudi
Gaudi Gaudi
Gaudi
jaionetxu
 
Desarrollo sindical
Desarrollo sindicalDesarrollo sindical
Desarrollo sindical
Derecho Colectivo
 
F8 aus alternative sweeteners
F8 aus alternative sweetenersF8 aus alternative sweeteners
F8 aus alternative sweeteners
Diabetes for all
 
C15 niddk eating diabetes
C15 niddk eating diabetesC15 niddk eating diabetes
C15 niddk eating diabetes
Diabetes for all
 
Revolutionizing lending in today's digital world
Revolutionizing lending in today's digital worldRevolutionizing lending in today's digital world
Revolutionizing lending in today's digital world
Experian
 
The power of animation
The power of animationThe power of animation
The power of animation
Peter Brooks
 
Health equity-latinos-nys-english
Health equity-latinos-nys-englishHealth equity-latinos-nys-english
Health equity-latinos-nys-english
Gabriela Betancourt
 
Accidentes de trabajo causas, efectos y prevención
Accidentes de trabajo causas, efectos y prevenciónAccidentes de trabajo causas, efectos y prevención
Accidentes de trabajo causas, efectos y prevención
felipe970405
 
Critical Information Literacy and Service-Learning for Management Students
Critical Information Literacy and Service-Learning for Management StudentsCritical Information Literacy and Service-Learning for Management Students
Critical Information Literacy and Service-Learning for Management Students
Ilana Stonebraker
 
Untangling spring week6
Untangling spring week6Untangling spring week6
Untangling spring week6
Derek Jacoby
 

Viewers also liked (20)

Definiciones claves que sustentan el perfil del egreso
Definiciones claves que sustentan el perfil del egresoDefiniciones claves que sustentan el perfil del egreso
Definiciones claves que sustentan el perfil del egreso
 
F8 aus information about sugar 2009
F8 aus information about sugar 2009F8 aus information about sugar 2009
F8 aus information about sugar 2009
 
F8 aus reading food labels
F8 aus reading food labelsF8 aus reading food labels
F8 aus reading food labels
 
Scientific and Technical Translation in English - Week 3
Scientific and Technical Translation in English - Week 3Scientific and Technical Translation in English - Week 3
Scientific and Technical Translation in English - Week 3
 
Literal g informe de cédula prespuestaria de gastos-marzo_2016
Literal g informe de cédula prespuestaria de gastos-marzo_2016Literal g informe de cédula prespuestaria de gastos-marzo_2016
Literal g informe de cédula prespuestaria de gastos-marzo_2016
 
Dibujos animados rocio
Dibujos  animados   rocioDibujos  animados   rocio
Dibujos animados rocio
 
Motivacion
MotivacionMotivacion
Motivacion
 
Transistores
TransistoresTransistores
Transistores
 
Ambush marketing
Ambush marketing Ambush marketing
Ambush marketing
 
Gaudi
Gaudi Gaudi
Gaudi
 
Desarrollo sindical
Desarrollo sindicalDesarrollo sindical
Desarrollo sindical
 
F8 aus alternative sweeteners
F8 aus alternative sweetenersF8 aus alternative sweeteners
F8 aus alternative sweeteners
 
C15 niddk eating diabetes
C15 niddk eating diabetesC15 niddk eating diabetes
C15 niddk eating diabetes
 
Revolutionizing lending in today's digital world
Revolutionizing lending in today's digital worldRevolutionizing lending in today's digital world
Revolutionizing lending in today's digital world
 
The power of animation
The power of animationThe power of animation
The power of animation
 
Health equity-latinos-nys-english
Health equity-latinos-nys-englishHealth equity-latinos-nys-english
Health equity-latinos-nys-english
 
Power reunión marzo
Power reunión  marzoPower reunión  marzo
Power reunión marzo
 
Accidentes de trabajo causas, efectos y prevención
Accidentes de trabajo causas, efectos y prevenciónAccidentes de trabajo causas, efectos y prevención
Accidentes de trabajo causas, efectos y prevención
 
Critical Information Literacy and Service-Learning for Management Students
Critical Information Literacy and Service-Learning for Management StudentsCritical Information Literacy and Service-Learning for Management Students
Critical Information Literacy and Service-Learning for Management Students
 
Untangling spring week6
Untangling spring week6Untangling spring week6
Untangling spring week6
 

Similar to Untangling spring week11

MEAN Stack WeNode Barcelona Workshop
MEAN Stack WeNode Barcelona WorkshopMEAN Stack WeNode Barcelona Workshop
MEAN Stack WeNode Barcelona WorkshopValeri Karpov
 
Learn from my Mistakes - Building Better Solutions in SPFx
Learn from my  Mistakes - Building Better Solutions in SPFxLearn from my  Mistakes - Building Better Solutions in SPFx
Learn from my Mistakes - Building Better Solutions in SPFx
Thomas Daly
 
Relay: Seamless Syncing for React (VanJS)
Relay: Seamless Syncing for React (VanJS)Relay: Seamless Syncing for React (VanJS)
Relay: Seamless Syncing for React (VanJS)
Brooklyn Zelenka
 
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
Ofer Zelig
 
Untangling spring week1
Untangling spring week1Untangling spring week1
Untangling spring week1
Derek Jacoby
 
Progressive Enhancement using WSGI
Progressive Enhancement using WSGIProgressive Enhancement using WSGI
Progressive Enhancement using WSGIMatthew Wilkes
 
Cross Site Collection Navigation with SPFX, PowerShell PnP, PnP-JS, Office UI
Cross Site Collection Navigation with SPFX, PowerShell PnP, PnP-JS, Office UICross Site Collection Navigation with SPFX, PowerShell PnP, PnP-JS, Office UI
Cross Site Collection Navigation with SPFX, PowerShell PnP, PnP-JS, Office UI
Thomas Daly
 
Advanced Web Technology.pptx
Advanced Web Technology.pptxAdvanced Web Technology.pptx
Advanced Web Technology.pptx
ssuser35fdf2
 
OpenShift with Eclipse Tooling - EclipseCon 2012
OpenShift with Eclipse Tooling - EclipseCon 2012OpenShift with Eclipse Tooling - EclipseCon 2012
OpenShift with Eclipse Tooling - EclipseCon 2012
Steven Pousty
 
O365: Attack of the Clones
O365: Attack of the ClonesO365: Attack of the Clones
O365: Attack of the Clones
Christopher Johnson
 
Drew madelung sp designer workflows - sp-biz
Drew madelung   sp designer workflows - sp-bizDrew madelung   sp designer workflows - sp-biz
Drew madelung sp designer workflows - sp-biz
Drew Madelung
 
SharePoint Framework 101 (SPFx)
SharePoint Framework 101 (SPFx)SharePoint Framework 101 (SPFx)
SharePoint Framework 101 (SPFx)
Matthew J. Bailey , MCT
 
Escaping the yellow bubble - rewriting Domino using MongoDb and Angular
Escaping the yellow bubble - rewriting Domino using MongoDb and AngularEscaping the yellow bubble - rewriting Domino using MongoDb and Angular
Escaping the yellow bubble - rewriting Domino using MongoDb and Angular
Mark Leusink
 
Profiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty DetailsProfiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty Details
Achievers Tech
 
Intro to CakePHP
Intro to CakePHPIntro to CakePHP
Intro to CakePHP
Walther Lalk
 
Custom coded projects
Custom coded projectsCustom coded projects
Custom coded projects
Marko Heijnen
 
Designing your API Server for mobile apps
Designing your API Server for mobile appsDesigning your API Server for mobile apps
Designing your API Server for mobile appsMugunth Kumar
 
Cypress report
Cypress reportCypress report
Cypress report
Adarsh
 
Creating a Documentation Portal
Creating a Documentation PortalCreating a Documentation Portal
Creating a Documentation Portal
Steve Anderson
 

Similar to Untangling spring week11 (20)

MEAN Stack WeNode Barcelona Workshop
MEAN Stack WeNode Barcelona WorkshopMEAN Stack WeNode Barcelona Workshop
MEAN Stack WeNode Barcelona Workshop
 
Learn from my Mistakes - Building Better Solutions in SPFx
Learn from my  Mistakes - Building Better Solutions in SPFxLearn from my  Mistakes - Building Better Solutions in SPFx
Learn from my Mistakes - Building Better Solutions in SPFx
 
Relay: Seamless Syncing for React (VanJS)
Relay: Seamless Syncing for React (VanJS)Relay: Seamless Syncing for React (VanJS)
Relay: Seamless Syncing for React (VanJS)
 
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 spring week1
Untangling spring week1Untangling spring week1
Untangling spring week1
 
Progressive Enhancement using WSGI
Progressive Enhancement using WSGIProgressive Enhancement using WSGI
Progressive Enhancement using WSGI
 
Cross Site Collection Navigation with SPFX, PowerShell PnP, PnP-JS, Office UI
Cross Site Collection Navigation with SPFX, PowerShell PnP, PnP-JS, Office UICross Site Collection Navigation with SPFX, PowerShell PnP, PnP-JS, Office UI
Cross Site Collection Navigation with SPFX, PowerShell PnP, PnP-JS, Office UI
 
Advanced Web Technology.pptx
Advanced Web Technology.pptxAdvanced Web Technology.pptx
Advanced Web Technology.pptx
 
OpenShift with Eclipse Tooling - EclipseCon 2012
OpenShift with Eclipse Tooling - EclipseCon 2012OpenShift with Eclipse Tooling - EclipseCon 2012
OpenShift with Eclipse Tooling - EclipseCon 2012
 
O365: Attack of the Clones
O365: Attack of the ClonesO365: Attack of the Clones
O365: Attack of the Clones
 
Do you queue
Do you queueDo you queue
Do you queue
 
Drew madelung sp designer workflows - sp-biz
Drew madelung   sp designer workflows - sp-bizDrew madelung   sp designer workflows - sp-biz
Drew madelung sp designer workflows - sp-biz
 
SharePoint Framework 101 (SPFx)
SharePoint Framework 101 (SPFx)SharePoint Framework 101 (SPFx)
SharePoint Framework 101 (SPFx)
 
Escaping the yellow bubble - rewriting Domino using MongoDb and Angular
Escaping the yellow bubble - rewriting Domino using MongoDb and AngularEscaping the yellow bubble - rewriting Domino using MongoDb and Angular
Escaping the yellow bubble - rewriting Domino using MongoDb and Angular
 
Profiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty DetailsProfiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty Details
 
Intro to CakePHP
Intro to CakePHPIntro to CakePHP
Intro to CakePHP
 
Custom coded projects
Custom coded projectsCustom coded projects
Custom coded projects
 
Designing your API Server for mobile apps
Designing your API Server for mobile appsDesigning your API Server for mobile apps
Designing your API Server for mobile apps
 
Cypress report
Cypress reportCypress report
Cypress report
 
Creating a Documentation Portal
Creating a Documentation PortalCreating a Documentation Portal
Creating a Documentation Portal
 

More from Derek Jacoby

Untangling - fall2017 - week5
Untangling - fall2017 - week5Untangling - fall2017 - week5
Untangling - fall2017 - week5
Derek Jacoby
 
Untangling the web fall2017 class 3
Untangling the web fall2017 class 3Untangling the web fall2017 class 3
Untangling the web fall2017 class 3
Derek Jacoby
 
Untangling fall2017 week2_try2
Untangling fall2017 week2_try2Untangling fall2017 week2_try2
Untangling fall2017 week2_try2
Derek Jacoby
 
Untangling spring week7
Untangling spring week7Untangling spring week7
Untangling spring week7
Derek Jacoby
 
Untangling spring week3
Untangling spring week3Untangling spring week3
Untangling spring week3
Derek Jacoby
 
Untangling the web9
Untangling the web9Untangling the web9
Untangling the web9
Derek Jacoby
 
Untangling8
Untangling8Untangling8
Untangling8
Derek Jacoby
 
Untangling7
Untangling7Untangling7
Untangling7
Derek Jacoby
 
Untangling6
Untangling6Untangling6
Untangling6
Derek Jacoby
 
Untangling4
Untangling4Untangling4
Untangling4
Derek Jacoby
 

More from Derek Jacoby (10)

Untangling - fall2017 - week5
Untangling - fall2017 - week5Untangling - fall2017 - week5
Untangling - fall2017 - week5
 
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 week3
Untangling spring week3Untangling spring week3
Untangling spring week3
 
Untangling the web9
Untangling the web9Untangling the web9
Untangling the web9
 
Untangling8
Untangling8Untangling8
Untangling8
 
Untangling7
Untangling7Untangling7
Untangling7
 
Untangling6
Untangling6Untangling6
Untangling6
 
Untangling4
Untangling4Untangling4
Untangling4
 

Recently uploaded

PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
Wasim Ak
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
Krisztián Száraz
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
ak6969907
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
RitikBhardwaj56
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 

Recently uploaded (20)

PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 

Untangling spring week11

  • 1. UNTANGLING THE WEB WEEK 11 – MORE FUN WITH DATABASES, DEBUGGING, PUTTING IT ALL TOGETHER
  • 2. AGENDA • More about debugging and build environments • HTTP get and post messages, forms • Pulling responses out of post messages • Look back to asynchronous js • Callbacks and promises, async library • JSON and restful APIs • Project 3 presentations • Homework 11
  • 3. HW10 QUESTIONS • Has each group managed to get a database of their own up and listing on a web page? • What parts were hard?
  • 4. DEBUGGERS • We’ve used chrome developer tools, this is a rudimentary debugger • Better is the one built into VS Code because it can also debug on the server side • Need to do just a little bit of setup to enable it
  • 5. VS CODE SETUP • Nice tutorial on https://code.visualstudio.com/docs/nodejs/nodejs-tutorial • More debugging details at https://code.visualstudio.com/docs/editor/debugging • Let’s go through the tutorial together, just for more practice in starting projects
  • 6. GENERATORS • This is something that gives you a framework from which to start your application • Boilerplate projects are similar • Use them, but make sure you know what they are doing!
  • 7. BUNDLING AND BUILD ENVIRONMENTS • Good video here: https://www.youtube.com/watch?v=PcqYhSH44Ow • (this just came across my feed today and I thought it was interesting. You don’t need most of it for this class, though.)
  • 8. EXERCISE 1 • Make sure you have nodejs installed • Follow the tutorial we just went through on https://code.visualstudio.com/docs/nodejs/nodejs-tutorial • We’ll take 10-15 minutes on it (hopefully, I still suspect there may be local development environment setup issues lurking around…)
  • 9. FORMS • We haven’t used forms in our HTML much yet. • They primarily provide benefit when using AJAX or other server-side round-trips • In this case we are using express.js routes as our server side • We will use a form primarily as a tool to submit data
  • 10. HTTP GET AND POST MESSAGES • All of our routes have been get routes so far • We will use our first post route today • Need to set up an express route using app.post rather than app.get
  • 11. BODY-PARSER • We will use a new npm module to be able to easily access the body of the request object • Look at the entire object and what it contains, being able to just access the body is a great simplification • (review npm install, the require statement)
  • 12. GRABBING VARIABLES OFF THE REQUEST OBJECT • Best use is to grab the variables that we have named in our html • Can be any number of these, but just one is used in the current example
  • 13. ASYNCHRONOUS JAVASCRIPT • Remember callbacks? • How about promises? • We’re going to use an NPM module called async to make this easier • (once more through npm install and setting up the require statements)
  • 14. EXERCISE 2 • Create a branch in your fork of the simpleNode project and checkout that branch (can be done all in one step with “git checkout –b branchname” • Create your own example page (feel free to copy some of what you need from the files in the project, but you’ll want to create new files) • Using the testDB database and the employees table, create a page that allows you to query by salary (or one of the other fields)
  • 15. JSON AND RESTFUL API STANDARDS • JSON – javascript object notation • You’ve used this a bunch already but haven’t used this name for it. Basically anytime you are using the object.property notation you are using JSON • RESTful APIs - Representational State Transfer • Really complete discussion here: http://stackoverflow.com/questions/671118/what-exactly-is-restful- programming • Basic thing you have to know is that it is stateless, so the call carries everything that you need to complete the request. Our GET and POST actions today are prime examples.
  • 16. PROJECT 3 PRESENTATIONS • This is next week! • Each group will have a maximum of 10 minutes to present. • 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?
  • 17. PROJECT 3 PRESENTATIONS • I’m not looking for the whole design story like in project 1 • Instead I want your quick run-through of your functionality, wrapped in the story of why it is interesting. Pretend you get 3- 5 minutes in front of an investor and want to convince them that you have something cool • Rest of the time should be spent talking about your database design and any development issues you ran into • 10 minutes max!
  • 18. HOMEWORK 11 • You can use your database structure from hw10 for this • Create a web page with a list for results, a text field, and a button • When the button is pressed, execute the query based on the text field and populate the results list with it • The page should be styled with CSS in a separate CSS file • Turn in by class on 3/29 with a list of who worked on it and the github link. You do not need to have a running server this time because you will be using that for your project 3, but when I clone and pull your project it should work properly.