SlideShare a Scribd company logo
1 of 32
Download to read offline
Introduction to 
Javascript and jQuery 
Kathy Zhou 
Tech Talk 
PennApps Fall 2014
Javascript 
programming language that runs in web browsers 
jQuery 
Javascript library for animations, effects, and making Javascript 
easy to use 
Kathy Zhou, PennApps Fall 2014 Tech Talk
What this talk WON’T do: 
- make you a Javascript expert in an hour (let’s be real, guys) 
- best to take CIS 197 or read Javascript: the Good Parts 
- explain all the weird nuances of the language 
- ‘null’ vs. ‘undefined’, ‘falsey’ values, you can look up 
- teach you functional programming 
- very important, I recommend studying 
Kathy Zhou, PennApps Fall 2014 Tech Talk
actual picture of you after this talk 
I promise 
What this talk WILL do: 
- make you a happy hacker 
- this is PennApps, after all 
- teach you the process of building a UI feature on your web app 
^ most important!! 
- point you in the right direction for learning more advanced 
features of Javascript and jQuery 
Kathy Zhou, PennApps Fall 2014 Tech Talk
This talk assumes you know: 
- basic HTML + CSS 
- basic programming (CIS110 or CIS120) 
Kathy Zhou, PennApps Fall 2014 Tech Talk
Basics of Javascript 
Kathy Zhou, PennApps Fall 2014 Tech Talk
‘running’ a Javascript program 
- a Javascript program is a script file 
- include it as a link in your HTML document, before the </body> tag 
Kathy Zhou, PennApps Fall 2014 Tech Talk
What you can do in Javascript 
- integers, floats, strings 
- lists 
- hash tables/dictionaries 
- for-loops 
Kathy Zhou, PennApps Fall 2014 Tech Talk
What you can do in Javascript 
- creating a function: line 21 
- calling a function: line 26 
Kathy Zhou, PennApps Fall 2014 Tech Talk
What is the DOM? 
Kathy Zhou, PennApps Fall 2014 Tech Talk
DOM: Document Object Model 
- every web page is represented 
as a tree structure 
- the root node is the <html> 
tag 
- child nodes are the nested 
tags in the document (<body>, 
<div>, <p>, etc.) 
Kathy Zhou, PennApps Fall 2014 Tech Talk
Javascript can manipulate the DOM 
- Javascript can dynamically 
remove or append tags 
- can modify text on the page 
Kathy Zhou, PennApps Fall 2014 Tech Talk
ex. adding an element to the page 
Kathy Zhou, PennApps Fall 2014 Tech Talk
Event handlers 
Kathy Zhou, PennApps Fall 2014 Tech Talk
What is an event handler? 
- the user interacts with the web page in different ways 
- clicking, typing, mouse-ing over elements, etc. 
- event handlers are functions that execute during particular user events 
on certain elements 
Kathy Zhou, PennApps Fall 2014 Tech Talk
ex. event handler for clicking on the <body> 
Kathy Zhou, PennApps Fall 2014 Tech Talk
Basics of jQuery 
Kathy Zhou, PennApps Fall 2014 Tech Talk
linking to the jQuery script file 
- lines 30-31: the proper way to link to jQuery 
- protip: remember to include it as the first link, and then include 
other javascript files after it 
Kathy Zhou, PennApps Fall 2014 Tech Talk
most important feature of jQuery 
(to you): easier manipulation of 
Kathy Zhou, PennApps Fall 2014 Tech Talk 
the DOM
ex. creating a pointer to an element on the page 
Kathy Zhou, PennApps Fall 2014 Tech Talk 
note the CSS notation 
“.” to access classes 
“#” to access IDs
ex. creating an event handler 
Kathy Zhou, PennApps Fall 2014 Tech Talk
protip: anything you want immediately executed, wrap in the jQuery 
document-ready construct 
Kathy Zhou, PennApps Fall 2014 Tech Talk
protip: the method ensures the page loads completely before the scripts 
execute 
you can also do $(document).ready(function () {...}); 
Kathy Zhou, PennApps Fall 2014 Tech Talk
protip: don’t do 
anonymous function 
handlers! 
always name your 
functions because it’s 
better for clarity and 
debugging 
Kathy Zhou, PennApps Fall 2014 Tech Talk
Kathy Zhou, PennApps Fall 2014 Tech Talk 
demo time!
autocomplete search bar 
Google → 
our demo → 
Kathy Zhou, PennApps Fall 2014 Tech Talk
download and extract files: 
https://github.com/KathyZ/talks/archive/master.zip 
Kathy Zhou, PennApps Fall 2014 Tech Talk
go into “pennappsf214Javascript” folder 
double-click on ‘index.html’ 
Kathy Zhou, PennApps Fall 2014 Tech Talk
Kathy Zhou, PennApps Fall 2014 Tech Talk 
*demo-ing*
workflow: steps to a UI feature 
1. identify the user actions 
- does something happen when the user 
clicks? when the user presses the ‘enter’ button? 
2. identify what visual aspects need to be 
there 
- consider which elements are added or 
removed, how they are modified, etc 
- also consider what CSS changes need to 
be made 
3. implementation 
Kathy Zhou, PennApps Fall 2014 Tech Talk
more learning 
for PennApps weekend: 
jQuery UI: http://jqueryui.com/ 
Foundation by ZURB: http://foundation.zurb.com/ 
Mozilla’s Javascript Guide: 
https://developer.mozilla.org/en-US/docs/Web/JavaScript 
jQuery documentation: 
http://api.jquery.com/ 
Airbnb’s Javascript style guide (best practices): 
https://github.com/airbnb/javascript 
Stack Overflow 
Kathy Zhou, PennApps Fall 2014 Tech Talk
thank you and happy hacking! 
@kaffkaff ← hit me up 
Kathy Zhou, PennApps Fall 2014 Tech Talk

More Related Content

What's hot

Leveraging Continuous Integration For Fun And Profit!
Leveraging Continuous Integration For Fun And Profit!Leveraging Continuous Integration For Fun And Profit!
Leveraging Continuous Integration For Fun And Profit!Jess Chadwick
 
WordCamp Sheffield 2014 Theme Workflow Presentation
WordCamp Sheffield 2014 Theme Workflow PresentationWordCamp Sheffield 2014 Theme Workflow Presentation
WordCamp Sheffield 2014 Theme Workflow PresentationJonny Allbut
 
Web Components in Action: building reusable components for web development
Web Components in Action: building reusable components for web developmentWeb Components in Action: building reusable components for web development
Web Components in Action: building reusable components for web developmentManning Publications
 
Managing a Project the Drupal Way - Drupal Open Days Ireland
Managing a Project the Drupal Way - Drupal Open Days IrelandManaging a Project the Drupal Way - Drupal Open Days Ireland
Managing a Project the Drupal Way - Drupal Open Days IrelandEmma Jane Hogbin Westby
 
Introduction to VueJS & The WordPress REST API
Introduction to VueJS & The WordPress REST APIIntroduction to VueJS & The WordPress REST API
Introduction to VueJS & The WordPress REST APICaldera Labs
 
WordCamp Bournemouth 2014 - Designing with data in WordPress
WordCamp Bournemouth 2014 - Designing with data in WordPressWordCamp Bournemouth 2014 - Designing with data in WordPress
WordCamp Bournemouth 2014 - Designing with data in WordPressJonny Allbut
 
Theming in WordPress - Where do I Start?
Theming in WordPress - Where do I Start?Theming in WordPress - Where do I Start?
Theming in WordPress - Where do I Start?Edmund Turbin
 
On Selecting JavaScript Frameworks (Women Who Code 10/15)
On Selecting JavaScript Frameworks (Women Who Code 10/15)On Selecting JavaScript Frameworks (Women Who Code 10/15)
On Selecting JavaScript Frameworks (Women Who Code 10/15)Zoe Landon
 
Getting Started with Test Automation: Introduction to Cucumber with Lapis Lazuli
Getting Started with Test Automation: Introduction to Cucumber with Lapis LazuliGetting Started with Test Automation: Introduction to Cucumber with Lapis Lazuli
Getting Started with Test Automation: Introduction to Cucumber with Lapis LazuliRebecca Eloise Hogg
 
Web, Native iOS and Native Android with One Ember.js App
Web, Native iOS and Native Android with One Ember.js AppWeb, Native iOS and Native Android with One Ember.js App
Web, Native iOS and Native Android with One Ember.js AppFITC
 
What have you learnt about technologies from the
What have you learnt about technologies from theWhat have you learnt about technologies from the
What have you learnt about technologies from thesarah123ashcroft
 
JavaScript All The Things
JavaScript All The ThingsJavaScript All The Things
JavaScript All The ThingsJordan Yaker
 
Writing Software not Code with Cucumber
Writing Software not Code with CucumberWriting Software not Code with Cucumber
Writing Software not Code with CucumberBen Mabey
 
Parse Apps with Ember.js
Parse Apps with Ember.jsParse Apps with Ember.js
Parse Apps with Ember.jsMatthew Beale
 
JavaScript Power Tools
JavaScript Power ToolsJavaScript Power Tools
JavaScript Power ToolsCodemotion
 
Rapid WordPress theme development
Rapid WordPress theme developmentRapid WordPress theme development
Rapid WordPress theme developmentJonny Allbut
 

What's hot (20)

Denver topical homepages
Denver topical homepagesDenver topical homepages
Denver topical homepages
 
Leveraging Continuous Integration For Fun And Profit!
Leveraging Continuous Integration For Fun And Profit!Leveraging Continuous Integration For Fun And Profit!
Leveraging Continuous Integration For Fun And Profit!
 
WordCamp Sheffield 2014 Theme Workflow Presentation
WordCamp Sheffield 2014 Theme Workflow PresentationWordCamp Sheffield 2014 Theme Workflow Presentation
WordCamp Sheffield 2014 Theme Workflow Presentation
 
Web Components in Action: building reusable components for web development
Web Components in Action: building reusable components for web developmentWeb Components in Action: building reusable components for web development
Web Components in Action: building reusable components for web development
 
Managing a Project the Drupal Way - Drupal Open Days Ireland
Managing a Project the Drupal Way - Drupal Open Days IrelandManaging a Project the Drupal Way - Drupal Open Days Ireland
Managing a Project the Drupal Way - Drupal Open Days Ireland
 
Introduction to VueJS & The WordPress REST API
Introduction to VueJS & The WordPress REST APIIntroduction to VueJS & The WordPress REST API
Introduction to VueJS & The WordPress REST API
 
WordCamp Bournemouth 2014 - Designing with data in WordPress
WordCamp Bournemouth 2014 - Designing with data in WordPressWordCamp Bournemouth 2014 - Designing with data in WordPress
WordCamp Bournemouth 2014 - Designing with data in WordPress
 
Theming in WordPress - Where do I Start?
Theming in WordPress - Where do I Start?Theming in WordPress - Where do I Start?
Theming in WordPress - Where do I Start?
 
On Selecting JavaScript Frameworks (Women Who Code 10/15)
On Selecting JavaScript Frameworks (Women Who Code 10/15)On Selecting JavaScript Frameworks (Women Who Code 10/15)
On Selecting JavaScript Frameworks (Women Who Code 10/15)
 
Getting Started with Test Automation: Introduction to Cucumber with Lapis Lazuli
Getting Started with Test Automation: Introduction to Cucumber with Lapis LazuliGetting Started with Test Automation: Introduction to Cucumber with Lapis Lazuli
Getting Started with Test Automation: Introduction to Cucumber with Lapis Lazuli
 
Getting a CLUE at the Command Line
Getting a CLUE at the Command LineGetting a CLUE at the Command Line
Getting a CLUE at the Command Line
 
Web, Native iOS and Native Android with One Ember.js App
Web, Native iOS and Native Android with One Ember.js AppWeb, Native iOS and Native Android with One Ember.js App
Web, Native iOS and Native Android with One Ember.js App
 
What have you learnt about technologies from the
What have you learnt about technologies from theWhat have you learnt about technologies from the
What have you learnt about technologies from the
 
JavaScript All The Things
JavaScript All The ThingsJavaScript All The Things
JavaScript All The Things
 
Evaluation of project website
Evaluation of project websiteEvaluation of project website
Evaluation of project website
 
Writing Software not Code with Cucumber
Writing Software not Code with CucumberWriting Software not Code with Cucumber
Writing Software not Code with Cucumber
 
Parse Apps with Ember.js
Parse Apps with Ember.jsParse Apps with Ember.js
Parse Apps with Ember.js
 
JavaScript Power Tools
JavaScript Power ToolsJavaScript Power Tools
JavaScript Power Tools
 
Q4
Q4Q4
Q4
 
Rapid WordPress theme development
Rapid WordPress theme developmentRapid WordPress theme development
Rapid WordPress theme development
 

Viewers also liked

Viewers also liked (7)

Lesson 203 18 sep13-1500-ay
Lesson 203 18 sep13-1500-ayLesson 203 18 sep13-1500-ay
Lesson 203 18 sep13-1500-ay
 
Cmp
CmpCmp
Cmp
 
Object Oriented Programming
Object Oriented ProgrammingObject Oriented Programming
Object Oriented Programming
 
03. oop concepts
03. oop concepts03. oop concepts
03. oop concepts
 
Basics of Object Oriented Programming
Basics of Object Oriented ProgrammingBasics of Object Oriented Programming
Basics of Object Oriented Programming
 
Java is an Object-Oriented Language
Java is an Object-Oriented LanguageJava is an Object-Oriented Language
Java is an Object-Oriented Language
 
Introduction to Object Oriented Concepts
Introduction to Object Oriented Concepts Introduction to Object Oriented Concepts
Introduction to Object Oriented Concepts
 

Similar to Javascript and jQuery PennApps Tech Talk, Fall 2014

User Experience Bootcamp for Developers
User Experience Bootcamp for DevelopersUser Experience Bootcamp for Developers
User Experience Bootcamp for DevelopersCatherine Robson
 
Practical Accessibility
Practical AccessibilityPractical Accessibility
Practical AccessibilityEli Cochran
 
Php mysql-training online-by_php2ranjan
Php mysql-training online-by_php2ranjanPhp mysql-training online-by_php2ranjan
Php mysql-training online-by_php2ranjanphp2ranjan
 
php training in hyderabad
php training in hyderabadphp training in hyderabad
php training in hyderabadphp2ranjan
 
Building Shiny Application Series - Layout and HTML
Building Shiny Application Series - Layout and HTMLBuilding Shiny Application Series - Layout and HTML
Building Shiny Application Series - Layout and HTMLOlga Scrivner
 
Rapidly prototyping web applications using BackPress
Rapidly prototyping web applications using BackPressRapidly prototyping web applications using BackPress
Rapidly prototyping web applications using BackPressNathaniel Taintor
 
2014 11 20 Drupal 7 -> 8 test migratie
2014 11 20 Drupal 7 -> 8 test migratie2014 11 20 Drupal 7 -> 8 test migratie
2014 11 20 Drupal 7 -> 8 test migratiehcderaad
 
Full stack-web-design
Full stack-web-designFull stack-web-design
Full stack-web-designKevin Conboy
 
Introjs10.5.17SD
Introjs10.5.17SDIntrojs10.5.17SD
Introjs10.5.17SDThinkful
 
Enterprise PHP (PHP London Conference 2008)
Enterprise PHP (PHP London Conference 2008)Enterprise PHP (PHP London Conference 2008)
Enterprise PHP (PHP London Conference 2008)Ivo Jansch
 
JBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
JBUG 11 - Django-The Web Framework For Perfectionists With DeadlinesJBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
JBUG 11 - Django-The Web Framework For Perfectionists With DeadlinesTikal Knowledge
 
PCC2 - How do I incorporate Apple-like design into my products?
PCC2 - How do I incorporate Apple-like design into my products?PCC2 - How do I incorporate Apple-like design into my products?
PCC2 - How do I incorporate Apple-like design into my products?ProductCamp Chicago
 
Behaviour driven infrastructure
Behaviour driven infrastructureBehaviour driven infrastructure
Behaviour driven infrastructureLindsay Holmwood
 
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to DevelopmentWordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to DevelopmentEvan Mullins
 
Simple Social Networking with Ruby on Rails
Simple Social Networking with Ruby on RailsSimple Social Networking with Ruby on Rails
Simple Social Networking with Ruby on Railsjhenry
 
Simplicity - develop modern web apps with tiny frameworks and tools
Simplicity - develop modern web apps with tiny frameworks and toolsSimplicity - develop modern web apps with tiny frameworks and tools
Simplicity - develop modern web apps with tiny frameworks and toolsRui Carvalho
 
Presentations4 Session9
Presentations4 Session9Presentations4 Session9
Presentations4 Session9lalapoon
 
Progressive Web Application by Citytech
Progressive Web Application by CitytechProgressive Web Application by Citytech
Progressive Web Application by CitytechRitwik Das
 
Driven Development - Closing the Loop on Scrum
Driven Development - Closing the Loop on ScrumDriven Development - Closing the Loop on Scrum
Driven Development - Closing the Loop on ScrumAdam Englander
 

Similar to Javascript and jQuery PennApps Tech Talk, Fall 2014 (20)

User Experience Bootcamp for Developers
User Experience Bootcamp for DevelopersUser Experience Bootcamp for Developers
User Experience Bootcamp for Developers
 
Practical Accessibility
Practical AccessibilityPractical Accessibility
Practical Accessibility
 
Php mysql-training online-by_php2ranjan
Php mysql-training online-by_php2ranjanPhp mysql-training online-by_php2ranjan
Php mysql-training online-by_php2ranjan
 
php training in hyderabad
php training in hyderabadphp training in hyderabad
php training in hyderabad
 
Building Shiny Application Series - Layout and HTML
Building Shiny Application Series - Layout and HTMLBuilding Shiny Application Series - Layout and HTML
Building Shiny Application Series - Layout and HTML
 
Rapidly prototyping web applications using BackPress
Rapidly prototyping web applications using BackPressRapidly prototyping web applications using BackPress
Rapidly prototyping web applications using BackPress
 
2014 11 20 Drupal 7 -> 8 test migratie
2014 11 20 Drupal 7 -> 8 test migratie2014 11 20 Drupal 7 -> 8 test migratie
2014 11 20 Drupal 7 -> 8 test migratie
 
Full stack-web-design
Full stack-web-designFull stack-web-design
Full stack-web-design
 
Introjs10.5.17SD
Introjs10.5.17SDIntrojs10.5.17SD
Introjs10.5.17SD
 
Enterprise PHP (PHP London Conference 2008)
Enterprise PHP (PHP London Conference 2008)Enterprise PHP (PHP London Conference 2008)
Enterprise PHP (PHP London Conference 2008)
 
JBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
JBUG 11 - Django-The Web Framework For Perfectionists With DeadlinesJBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
JBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
 
End-to-end testing with geb
End-to-end testing with gebEnd-to-end testing with geb
End-to-end testing with geb
 
PCC2 - How do I incorporate Apple-like design into my products?
PCC2 - How do I incorporate Apple-like design into my products?PCC2 - How do I incorporate Apple-like design into my products?
PCC2 - How do I incorporate Apple-like design into my products?
 
Behaviour driven infrastructure
Behaviour driven infrastructureBehaviour driven infrastructure
Behaviour driven infrastructure
 
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to DevelopmentWordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
 
Simple Social Networking with Ruby on Rails
Simple Social Networking with Ruby on RailsSimple Social Networking with Ruby on Rails
Simple Social Networking with Ruby on Rails
 
Simplicity - develop modern web apps with tiny frameworks and tools
Simplicity - develop modern web apps with tiny frameworks and toolsSimplicity - develop modern web apps with tiny frameworks and tools
Simplicity - develop modern web apps with tiny frameworks and tools
 
Presentations4 Session9
Presentations4 Session9Presentations4 Session9
Presentations4 Session9
 
Progressive Web Application by Citytech
Progressive Web Application by CitytechProgressive Web Application by Citytech
Progressive Web Application by Citytech
 
Driven Development - Closing the Loop on Scrum
Driven Development - Closing the Loop on ScrumDriven Development - Closing the Loop on Scrum
Driven Development - Closing the Loop on Scrum
 

Recently uploaded

The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 

Recently uploaded (20)

The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 

Javascript and jQuery PennApps Tech Talk, Fall 2014

  • 1. Introduction to Javascript and jQuery Kathy Zhou Tech Talk PennApps Fall 2014
  • 2. Javascript programming language that runs in web browsers jQuery Javascript library for animations, effects, and making Javascript easy to use Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 3. What this talk WON’T do: - make you a Javascript expert in an hour (let’s be real, guys) - best to take CIS 197 or read Javascript: the Good Parts - explain all the weird nuances of the language - ‘null’ vs. ‘undefined’, ‘falsey’ values, you can look up - teach you functional programming - very important, I recommend studying Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 4. actual picture of you after this talk I promise What this talk WILL do: - make you a happy hacker - this is PennApps, after all - teach you the process of building a UI feature on your web app ^ most important!! - point you in the right direction for learning more advanced features of Javascript and jQuery Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 5. This talk assumes you know: - basic HTML + CSS - basic programming (CIS110 or CIS120) Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 6. Basics of Javascript Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 7. ‘running’ a Javascript program - a Javascript program is a script file - include it as a link in your HTML document, before the </body> tag Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 8. What you can do in Javascript - integers, floats, strings - lists - hash tables/dictionaries - for-loops Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 9. What you can do in Javascript - creating a function: line 21 - calling a function: line 26 Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 10. What is the DOM? Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 11. DOM: Document Object Model - every web page is represented as a tree structure - the root node is the <html> tag - child nodes are the nested tags in the document (<body>, <div>, <p>, etc.) Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 12. Javascript can manipulate the DOM - Javascript can dynamically remove or append tags - can modify text on the page Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 13. ex. adding an element to the page Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 14. Event handlers Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 15. What is an event handler? - the user interacts with the web page in different ways - clicking, typing, mouse-ing over elements, etc. - event handlers are functions that execute during particular user events on certain elements Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 16. ex. event handler for clicking on the <body> Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 17. Basics of jQuery Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 18. linking to the jQuery script file - lines 30-31: the proper way to link to jQuery - protip: remember to include it as the first link, and then include other javascript files after it Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 19. most important feature of jQuery (to you): easier manipulation of Kathy Zhou, PennApps Fall 2014 Tech Talk the DOM
  • 20. ex. creating a pointer to an element on the page Kathy Zhou, PennApps Fall 2014 Tech Talk note the CSS notation “.” to access classes “#” to access IDs
  • 21. ex. creating an event handler Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 22. protip: anything you want immediately executed, wrap in the jQuery document-ready construct Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 23. protip: the method ensures the page loads completely before the scripts execute you can also do $(document).ready(function () {...}); Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 24. protip: don’t do anonymous function handlers! always name your functions because it’s better for clarity and debugging Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 25. Kathy Zhou, PennApps Fall 2014 Tech Talk demo time!
  • 26. autocomplete search bar Google → our demo → Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 27. download and extract files: https://github.com/KathyZ/talks/archive/master.zip Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 28. go into “pennappsf214Javascript” folder double-click on ‘index.html’ Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 29. Kathy Zhou, PennApps Fall 2014 Tech Talk *demo-ing*
  • 30. workflow: steps to a UI feature 1. identify the user actions - does something happen when the user clicks? when the user presses the ‘enter’ button? 2. identify what visual aspects need to be there - consider which elements are added or removed, how they are modified, etc - also consider what CSS changes need to be made 3. implementation Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 31. more learning for PennApps weekend: jQuery UI: http://jqueryui.com/ Foundation by ZURB: http://foundation.zurb.com/ Mozilla’s Javascript Guide: https://developer.mozilla.org/en-US/docs/Web/JavaScript jQuery documentation: http://api.jquery.com/ Airbnb’s Javascript style guide (best practices): https://github.com/airbnb/javascript Stack Overflow Kathy Zhou, PennApps Fall 2014 Tech Talk
  • 32. thank you and happy hacking! @kaffkaff ← hit me up Kathy Zhou, PennApps Fall 2014 Tech Talk