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

PPTX
Untangling spring week10
PPTX
Untangling spring week9
PPTX
Untangling spring week5
PPTX
Untangling spring week8
PPTX
Untangling spring week12
PPTX
Untangling fall2017 week1
PPTX
Untangling - fall2017 - week 8
PPTX
Untangling - fall2017 - week 7
Untangling spring week10
Untangling spring week9
Untangling spring week5
Untangling spring week8
Untangling spring week12
Untangling fall2017 week1
Untangling - fall2017 - week 8
Untangling - fall2017 - week 7

What's hot (20)

PPTX
Untangling - fall2017 - week 9
PPTX
Untangling spring week4
PPTX
Untangling the web11
PPTX
Untangling11
PPTX
Untangling - fall2017 - week 10
PPTX
Untangling fall2017 week2
PPTX
Untangling the web - fall2017 - class 4
PPTX
Untangling the web week 2 - SEO
PPTX
Untangling - fall2017 - week6
PPTX
Untangling spring week2
PDF
Why use Go for web development?
PPTX
Untangling the web10
ODP
Cvcc performance tuning
KEY
improving the performance of Rails web Applications
KEY
WordPress APIs
PPTX
Blazor - .NET in the Browser!
KEY
Cloud tools
PPTX
Engage 2019 Software documentation is fun if you have the right tools: Introd...
PPTX
A Personal Journey
PDF
What Multisite can do for You - Anthony Cole - WordCamp Sydney 2012
Untangling - fall2017 - week 9
Untangling spring week4
Untangling the web11
Untangling11
Untangling - fall2017 - week 10
Untangling fall2017 week2
Untangling the web - fall2017 - class 4
Untangling the web week 2 - SEO
Untangling - fall2017 - week6
Untangling spring week2
Why use Go for web development?
Untangling the web10
Cvcc performance tuning
improving the performance of Rails web Applications
WordPress APIs
Blazor - .NET in the Browser!
Cloud tools
Engage 2019 Software documentation is fun if you have the right tools: Introd...
A Personal Journey
What Multisite can do for You - Anthony Cole - WordCamp Sydney 2012
Ad

Viewers also liked (20)

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

Similar to Untangling spring week11 (20)

PPTX
Untangling6
PPTX
Untangling7
PDF
Full Stack Developer Course | Infinite Graphix Technologies
PPTX
Untangling4
DOCX
Web Development Tech Winter Break .docx
PDF
Having Fun Building Web Applications (Day 1 Slides)
KEY
10 Years of JavaScript
PDF
Beginner's Guide to Frontend Development: Comparing Angular, React, Ember, an...
PDF
Download full ebook of Learning Node Shelley Powers instant download pdf
PDF
Javascript Web Applications Otx Alex Maccaw
PDF
React projects for beginners
PPTX
4MW20CS102_Venkatesh_Internship_ppt.pptx
PPTX
Relay: Seamless Syncing for React (VanJS)
PDF
WebDev Crash Course
PDF
The Guide to becoming a full stack developer in 2018
PDF
Node.js #digpen presentation
PDF
react hook and wesite making structure ppt
PDF
React fristy day learn basic NM_Day01.pdf
PDF
GDG-USAR Tech winter break 2024 USAR.pdf
PDF
Front-End Developer's Career Roadmap
Untangling6
Untangling7
Full Stack Developer Course | Infinite Graphix Technologies
Untangling4
Web Development Tech Winter Break .docx
Having Fun Building Web Applications (Day 1 Slides)
10 Years of JavaScript
Beginner's Guide to Frontend Development: Comparing Angular, React, Ember, an...
Download full ebook of Learning Node Shelley Powers instant download pdf
Javascript Web Applications Otx Alex Maccaw
React projects for beginners
4MW20CS102_Venkatesh_Internship_ppt.pptx
Relay: Seamless Syncing for React (VanJS)
WebDev Crash Course
The Guide to becoming a full stack developer in 2018
Node.js #digpen presentation
react hook and wesite making structure ppt
React fristy day learn basic NM_Day01.pdf
GDG-USAR Tech winter break 2024 USAR.pdf
Front-End Developer's Career Roadmap

More from Derek Jacoby (8)

PPTX
Untangling - fall2017 - week5
PPTX
Untangling the web fall2017 class 3
PPTX
Untangling fall2017 week2_try2
PPTX
Untangling spring week7
PPTX
Untangling spring week3
PPTX
Untangling spring week1
PPTX
Untangling the web9
PPTX
Untangling8
Untangling - fall2017 - week5
Untangling the web fall2017 class 3
Untangling fall2017 week2_try2
Untangling spring week7
Untangling spring week3
Untangling spring week1
Untangling the web9
Untangling8

Recently uploaded (20)

PDF
VCE English Exam - Section C Student Revision Booklet
PDF
Business Ethics Teaching Materials for college
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
Cell Structure & Organelles in detailed.
PPTX
Institutional Correction lecture only . . .
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Basic Mud Logging Guide for educational purpose
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Pre independence Education in Inndia.pdf
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
01-Introduction-to-Information-Management.pdf
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
Insiders guide to clinical Medicine.pdf
VCE English Exam - Section C Student Revision Booklet
Business Ethics Teaching Materials for college
Module 4: Burden of Disease Tutorial Slides S2 2025
102 student loan defaulters named and shamed – Is someone you know on the list?
Cell Structure & Organelles in detailed.
Institutional Correction lecture only . . .
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
human mycosis Human fungal infections are called human mycosis..pptx
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Basic Mud Logging Guide for educational purpose
O7-L3 Supply Chain Operations - ICLT Program
Pre independence Education in Inndia.pdf
2.FourierTransform-ShortQuestionswithAnswers.pdf
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
01-Introduction-to-Information-Management.pdf
Microbial disease of the cardiovascular and lymphatic systems
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPH.pptx obstetrics and gynecology in nursing
O5-L3 Freight Transport Ops (International) V1.pdf
Insiders guide to clinical Medicine.pdf

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.