SlideShare a Scribd company logo
1 of 45
Download to read offline
Software Analysis for the Web:
Achievements and Prospects
Ali Mesbah
University of British Columbia
http://ece.ubc.ca/~amesbah/
2
Web Evolution Challenges
Achievements Prospects
STATIC WEBSITES
File ServerBrowser
HTML
HTTP
Request
Response
HTML
HTML
HTML
HTML
Internet
HTML
DYNAMIC WEBSITES
ServerBrowser
HTML
HTTP
Request
Response
Internet
HTML
Generate
HTML
RESTFUL WEBSITES
Stateless ServerBrowser
HTML
HTTP
Request
Response
Internet
HTML
Generate
HTML
“Principled design of the modern Web architecture”, Fielding and Tylor, ICSE 2000
RICH INTERNET APPS
ServerBrowser
Flash
HTTP
Request
Response
Internet
Flash
Generate
Flash
RIA Plugin
MODERN WEB APPS
Stateless ServerBrowser
Async HTTP
Request
Response
Internet
JSON
Generate
JSON
DOMCSS
JS
Web Apps
9
“write	once,	run	
anywhere”
Instantaneous	
software	delivery
Web-based	services	such	as																	and						
																							have	changed	how	people	develop	
software
10
11
Web Evolution Challenges
Achievements Prospects
12
Challenges
Heterogeneous
Async
Dynamic
Interactions
Distributed Stateless
Event-driven
Stateless ServerBrowser
Async HTTP
Request
Response
Internet
JSON
JS, Java,
PHP, Ruby,
etc
DOMCSS
JS
JavaScript:	the	Difficult	Parts
1. Dynamic and weakly-typed
• types can change dynamically
• objects/functions can change
• First-class functions
2. Event-driven
3. Asynchronous callbacks
4. Prototype-based
• objects inherent from objects
• can be redefined at runtime
5. Constructs such as eval
6. Interactions with DOM
7. Interpreted (not compiled)
8. …
Make Software
Analysis Challenging
13
14
Web Evolution Challenges
Achievements Prospects
Industrial Achievements
Mocha
Esprima Rhino
jsHint
jsLint
Qunit
Selenium
Istanbul
Closure Compiler
Flow
Web Code Analysis
• Static Analysis
• Points-to analysis (WALA)
• Approximate call graphs
• Data-flow analysis
• Dynamic Analysis
• Code quality checking
• Tracing and visualization
• Unused code detection
Web Code Analysis
• Static Analysis
• Points-to analysis
• Approximate call graphs
• Data-flow analysis
• Hybrid Analysis
• Taint and blended analysis
• Change impact analysis
• Event-flow analysis
• Dynamic Analysis
• Code quality checking
• Tracing and visualization
• Unused code detection
18
checkPrice()	
XHR	
updateItem()	
suggestItem()	
getUpdatedPrice()	 calculateTax()	
addTaxToPrice()	
Function
XHR object
DOM
element
Directed and
labeled edge
Static analysis
Dynamic analysis
checkPrice()	
XHR	
updateItem()	
suggestItem()	
getUpdatedPrice()	 calculateTax()	
#item231	
#price-ca	
.price	
displaySuggesCon()	
Function
XHR object
DOM
element
Directed and
labeled edge
Hybrid analysis
checkPrice()	
XHR	
updateItem()	
suggestItem()	
getUpdatedPrice()	 calculateTax()	
addTaxToPrice()	
#item231	
#price-ca	
.price	
displaySuggesDon()	
Function
XHR object
DOM
element
Directed and
labeled edge
Web Code Testing
• Different types of testing
• Cross-Browser testing
• Deterministic capture/replay
• Regression testing
• Test Adequecy
• Guided mutation analysis
• State-based coverage
• Code coverage
• Test Generation
• Event-based Crawling
• Feedback-directed execution
• (Dynamic) symbolic execution
22
State Coverage
23
24
Web Evolution Challenges
Achievements Prospects
Cross-Language Analysis
We don’t know how to infer proper
control flow graphs for web code.
Stateless ServerBrowser
Async HTTP
Request
Response
Internet
JSON
JS, Java,
PHP, Ruby,
etc
DOMCSS
JS
Cross-Language Program Slicing
Nguyen et al, FSE’14
Cross-Language Bug Detection
Ocariza et al, ICSE’15
Programmer Support in IDEs
• Code completion
• Refactoring
• Bug alerts
• Smell detection
Web Programmer Support in IDEs
• Code completion
• Refactoring
• Bug alerts
• Smell detection
Callback Hell
Refactoring to Promises
Test Case Maintenance
We need better:
Web element locators
Repair techniques
Benchmarks for Comparison
33
SIR
Defect4J
BugBench
?
DroidBench
Empirical Studies
Web analysis tools mainly built by reading best
practices or through developer intuition and
anecdotal observation
Example: what are the most common cross-project bug
patterns in web code?
Mining Repositories
Largely unexplored gold mines!
modules 250K
repositories 3.4M
developers 26K
MSR’13
Semi-automatic Learning
40
@Test
public void testAddNote(){
get("http://localhost:8080/theorganizer/");
findElement(By.id("logon_username")). sendKeys("user");
findElement(By.id("logon_password")). sendKeys("pswd");
findElement(By. cssSelector("input type ="image"")).click();
assertEquals("Welcome to The Organizer!", closeAlertAndGetItsText());
findElement(By.id("newNote")). click();
findElement(By.id("noteCreateShow_subject")).sendKeys("Running Example");
findElement(By.id("noteCreateShow_text")).sendKeys("Create a simple running example");
findElement(By. cssSelector("input type ="image"")).click();
assertEquals("Note has been created.", findElement(By.id("mainContent")). getText());
findElement(By.id("logoff")).click();
}
@Test
public void testAddNote(){
get("http://localhost:8080/theorganizer/");
findElement(By.id("logon_username")). sendKeys("user");
findElement(By.id("logon_password")). sendKeys("pswd");
findElement(By. cssSelector("input type ="image"")).click();
assertEquals("Welcome to The Organizer!", closeAlertAndGetItsText());
findElement(By.id("newNote")). click();
findElement(By.id("noteCreateShow_subject")).sendKeys("Running Example");
findElement(By.id("noteCreateShow_text")).sendKeys("Create a simple running example");
findElement(By. cssSelector("input type ="image"")).click();
assertEquals("Note has been created.", findElement(By.id("mainContent")). getText());
findElement(By.id("logoff")).click();
}
@Test
public void testAddNote(){
get("http://localhost:8080/theorganizer/");
findElement(By.id("logon_username")). sendKeys("user");
findElement(By.id("logon_password")). sendKeys("pswd");
findElement(By. cssSelector("input type ="image"")).click();
assertEquals("Welcome to The Organizer!", closeAlertAndGetItsText());
findElement(By.id("newNote")). click();
findElement(By.id("noteCreateShow_subject")).sendKeys("Running Example");
findElement(By.id("noteCreateShow_text")).sendKeys("Create a simple running example");
findElement(By. cssSelector("input type ="image"")).click();
assertEquals("Note has been created.", findElement(By.id("mainContent")). getText());
findElement(By.id("logoff")).click();
}
@Test
public void testAddNote(){
get("http://localhost:8080/theorganizer/");
findElement(By.id("logon_username")). sendKeys("user");
findElement(By.id("logon_password")). sendKeys("pswd");
findElement(By. cssSelector("input type ="image"")).click();
assertEquals("Welcome to The Organizer!", closeAlertAndGetItsText());
findElement(By.id("newNote")). click();
findElement(By.id("noteCreateShow_subject")).sendKeys("Running Example");
findElement(By.id("noteCreateShow_text")).sendKeys("Create a simple running example");
findElement(By. cssSelector("input type ="image"")).click();
assertEquals("Note has been created.", findElement(By.id("mainContent")). getText());
findElement(By.id("logoff")).click();
}
@Test
public void testAddNote(){
get("http://localhost:8080/theorganizer/");
findElement(By.id("logon_username")). sendKeys("user");
findElement(By.id("logon_password")). sendKeys("pswd");
findElement(By. cssSelector("input type ="image"")).click();
assertEquals("Welcome to The Organizer!", closeAlertAndGetItsText());
findElement(By.id("newNote")). click();
findElement(By.id("noteCreateShow_subject")).sendKeys("Running Example");
findElement(By.id("noteCreateShow_text")).sendKeys("Create a simple running example");
findElement(By. cssSelector("input type ="image"")).click();
assertEquals("Note has been created.", findElement(By.id("mainContent")). getText());
findElement(By.id("logoff")).click();
}
@Test
public void testAddNote(){
get("http://localhost:8080/theorganizer/");
findElement(By.id("logon_username")). sendKeys("user");
findElement(By.id("logon_password")). sendKeys("pswd");
findElement(By. cssSelector("input type ="image"")).click();
assertEquals("Welcome to The Organizer!", closeAlertAndGetItsText());
findElement(By.id("newNote")). click();
findElement(By.id("noteCreateShow_subject")).sendKeys("Running Example");
findElement(By.id("noteCreateShow_text")).sendKeys("Create a simple running example");
findElement(By. cssSelector("input type ="image"")).click();
assertEquals("Note has been created.", findElement(By.id("mainContent")). getText());
findElement(By.id("logoff")).click();
}
@Test
public void testAddNote(){
get("http://localhost:8080/theorganizer/");
findElement(By.id("logon_username")). sendKeys("user");
findElement(By.id("logon_password")). sendKeys("pswd");
findElement(By. cssSelector("input type ="image"")).click();
assertEquals("Welcome to The Organizer!", closeAlertAndGetItsText());
findElement(By.id("newNote")). click();
findElement(By.id("noteCreateShow_subject")).sendKeys("Running Example");
findElement(By.id("noteCreateShow_text")).sendKeys("Create a simple running example");
findElement(By. cssSelector("input type ="image"")).click();
assertEquals("Note has been created.", findElement(By.id("mainContent")). getText());
findElement(By.id("logoff")).click();
}
@Test
public void testAddNote(){
get("http://localhost:8080/theorganizer/");
findElement(By.id("logon_username")). sendKeys("user");
findElement(By.id("logon_password")). sendKeys("pswd");
findElement(By. cssSelector("input type ="image"")).click();
assertEquals("Welcome to The Organizer!", closeAlertAndGetItsText());
findElement(By.id("newNote")). click();
findElement(By.id("noteCreateShow_subject")).sendKeys("Running Example");
findElement(By.id("noteCreateShow_text")).sendKeys("Create a simple running example");
findElement(By. cssSelector("input type ="image"")).click();
assertEquals("Note has been created.", findElement(By.id("mainContent")). getText());
findElement(By.id("logoff")).click();
}
@Test
public void testAddNote(){
get("http://localhost:8080/theorganizer/");
findElement(By.id("logon_username")). sendKeys("user");
findElement(By.id("logon_password")). sendKeys("pswd");
findElement(By. cssSelector("input type ="image"")).click();
assertEquals("Welcome to The Organizer!", closeAlertAndGetItsText());
findElement(By.id("newNote")). click();
findElement(By.id("noteCreateShow_subject")).sendKeys("Running Example");
findElement(By.id("noteCreateShow_text")).sendKeys("Create a simple running example");
findElement(By. cssSelector("input type ="image"")).click();
assertEquals("Note has been created.", findElement(By.id("mainContent")). getText());
findElement(By.id("logoff")).click();
}
@Test
public void testAddNote(){
get("http://localhost:8080/theorganizer/");
findElement(By.id("logon_username")). sendKeys("user");
findElement(By.id("logon_password")). sendKeys("pswd");
findElement(By. cssSelector("input type ="image"")).click();
assertEquals("Welcome to The Organizer!", closeAlertAndGetItsText());
findElement(By.id("newNote")). click();
findElement(By.id("noteCreateShow_subject")).sendKeys("Running Example");
findElement(By.id("noteCreateShow_text")).sendKeys("Create a simple running example");
findElement(By. cssSelector("input type ="image"")).click();
assertEquals("Note has been created.", findElement(By.id("mainContent")). getText());
findElement(By.id("logoff")).click();
}
@Test
public void testAddNote(){
get("http://localhost:8080/theorganizer/");
findElement(By.id("logon_username")). sendKeys("user");
findElement(By.id("logon_password")). sendKeys("pswd");
findElement(By. cssSelector("input type ="image"")).click();
assertEquals("Welcome to The Organizer!", closeAlertAndGetItsText());
findElement(By.id("newNote")). click();
findElement(By.id("noteCreateShow_subject")).sendKeys("Running Example");
findElement(By.id("noteCreateShow_text")).sendKeys("Create a simple running example");
findElement(By. cssSelector("input type ="image"")).click();
assertEquals("Note has been created.", findElement(By.id("mainContent")). getText());
findElement(By.id("logoff")).click();
}
Learning Assertions
A classification problem:
• Is a web element important to be checked by an assertion?
Apply machine learning to train a classier
• Features: position, size, page-rank, LinkNum, ChildNum, …
FROM MONOLITHIC APPS
Stateless ServerBrowser
Async HTTP
Request
Response
Internet
JSON
Generate
JSON
DOMCSS
JS
42
TO MICRO SERVICES
Micro ServicesBrowser
Restful HTTP
Request
Response
Internet
JSON
DOMCSS
JS
Micro
Service
Micro
Service
Micro
Service
Micro
Service
Micro
Service
Micro
Service
Micro
Service
Micro
Service
Micro
Service
Micro
Service
Micro
Service
Micro
Service
44
On the client Even in hardware!On the server
JavaScript	is	everywhere
45
“write	once,	run	
anywhere”
Instantaneous	
software	delivery
Anything	that	can	be	written	as	a	web	
app,	will	be	written	as	a	web	app	
(eventually)

More Related Content

What's hot

Usability in the GeoWeb
Usability in the GeoWebUsability in the GeoWeb
Usability in the GeoWebDave Bouwman
 
Learning from the Best jQuery Plugins
Learning from the Best jQuery PluginsLearning from the Best jQuery Plugins
Learning from the Best jQuery PluginsMarc Grabanski
 
Developing Java Web Applications
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applicationshchen1
 
Pentesting Modern Web Apps: A Primer
Pentesting Modern Web Apps: A PrimerPentesting Modern Web Apps: A Primer
Pentesting Modern Web Apps: A PrimerBrian Hysell
 
HTML5 Mullet: Forms & Input Validation
HTML5 Mullet: Forms & Input ValidationHTML5 Mullet: Forms & Input Validation
HTML5 Mullet: Forms & Input ValidationTodd Anglin
 
Reliable and fast security audits - The modern and offensive way-Mohan Gandhi
Reliable and fast security audits - The modern and offensive way-Mohan GandhiReliable and fast security audits - The modern and offensive way-Mohan Gandhi
Reliable and fast security audits - The modern and offensive way-Mohan Gandhibhumika2108
 
Engineering the New LinkedIn Profile
Engineering the New LinkedIn ProfileEngineering the New LinkedIn Profile
Engineering the New LinkedIn ProfileJosh Clemm
 
Intro to Pentesting Jenkins
Intro to Pentesting JenkinsIntro to Pentesting Jenkins
Intro to Pentesting JenkinsBrian Hysell
 
OWASP Free Training - SF2014 - Keary and Manico
OWASP Free Training - SF2014 - Keary and ManicoOWASP Free Training - SF2014 - Keary and Manico
OWASP Free Training - SF2014 - Keary and ManicoEoin Keary
 
[CB16] Electron - Build cross platform desktop XSS, it’s easier than you thin...
[CB16] Electron - Build cross platform desktop XSS, it’s easier than you thin...[CB16] Electron - Build cross platform desktop XSS, it’s easier than you thin...
[CB16] Electron - Build cross platform desktop XSS, it’s easier than you thin...CODE BLUE
 
HTML5 Bootcamp: Essential HTML, CSS, & JavaScript
HTML5 Bootcamp: Essential HTML, CSS, & JavaScriptHTML5 Bootcamp: Essential HTML, CSS, & JavaScript
HTML5 Bootcamp: Essential HTML, CSS, & JavaScriptTodd Anglin
 
Lies you have been told about REST
Lies you have been told about RESTLies you have been told about REST
Lies you have been told about RESTdarrelmiller71
 
Owasp web application security trends
Owasp web application security trendsOwasp web application security trends
Owasp web application security trendsbeched
 
EuroPython 2011 - How to build complex web applications having fun?
EuroPython 2011 - How to build complex web applications having fun?EuroPython 2011 - How to build complex web applications having fun?
EuroPython 2011 - How to build complex web applications having fun?Andrew Mleczko
 
Building Desktop RIAs with PHP, HTML & Javascript in AIR
Building Desktop RIAs with PHP, HTML & Javascript in AIRBuilding Desktop RIAs with PHP, HTML & Javascript in AIR
Building Desktop RIAs with PHP, HTML & Javascript in AIRfunkatron
 
JavaScript Libraries: The Big Picture
JavaScript Libraries: The Big PictureJavaScript Libraries: The Big Picture
JavaScript Libraries: The Big PictureSimon Willison
 
DVWA BruCON Workshop
DVWA BruCON WorkshopDVWA BruCON Workshop
DVWA BruCON Workshoptestuser1223
 
DVWA(Damn Vulnerabilities Web Application)
DVWA(Damn Vulnerabilities Web Application)DVWA(Damn Vulnerabilities Web Application)
DVWA(Damn Vulnerabilities Web Application)Soham Kansodaria
 
Malicious file upload attacks - a case study
Malicious file upload attacks - a case studyMalicious file upload attacks - a case study
Malicious file upload attacks - a case studyOktawian Powazka
 

What's hot (20)

Usability in the GeoWeb
Usability in the GeoWebUsability in the GeoWeb
Usability in the GeoWeb
 
Learning from the Best jQuery Plugins
Learning from the Best jQuery PluginsLearning from the Best jQuery Plugins
Learning from the Best jQuery Plugins
 
Developing Java Web Applications
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applications
 
Pentesting Modern Web Apps: A Primer
Pentesting Modern Web Apps: A PrimerPentesting Modern Web Apps: A Primer
Pentesting Modern Web Apps: A Primer
 
HTML5 Mullet: Forms & Input Validation
HTML5 Mullet: Forms & Input ValidationHTML5 Mullet: Forms & Input Validation
HTML5 Mullet: Forms & Input Validation
 
Reliable and fast security audits - The modern and offensive way-Mohan Gandhi
Reliable and fast security audits - The modern and offensive way-Mohan GandhiReliable and fast security audits - The modern and offensive way-Mohan Gandhi
Reliable and fast security audits - The modern and offensive way-Mohan Gandhi
 
Ajax Security
Ajax SecurityAjax Security
Ajax Security
 
Engineering the New LinkedIn Profile
Engineering the New LinkedIn ProfileEngineering the New LinkedIn Profile
Engineering the New LinkedIn Profile
 
Intro to Pentesting Jenkins
Intro to Pentesting JenkinsIntro to Pentesting Jenkins
Intro to Pentesting Jenkins
 
OWASP Free Training - SF2014 - Keary and Manico
OWASP Free Training - SF2014 - Keary and ManicoOWASP Free Training - SF2014 - Keary and Manico
OWASP Free Training - SF2014 - Keary and Manico
 
[CB16] Electron - Build cross platform desktop XSS, it’s easier than you thin...
[CB16] Electron - Build cross platform desktop XSS, it’s easier than you thin...[CB16] Electron - Build cross platform desktop XSS, it’s easier than you thin...
[CB16] Electron - Build cross platform desktop XSS, it’s easier than you thin...
 
HTML5 Bootcamp: Essential HTML, CSS, & JavaScript
HTML5 Bootcamp: Essential HTML, CSS, & JavaScriptHTML5 Bootcamp: Essential HTML, CSS, & JavaScript
HTML5 Bootcamp: Essential HTML, CSS, & JavaScript
 
Lies you have been told about REST
Lies you have been told about RESTLies you have been told about REST
Lies you have been told about REST
 
Owasp web application security trends
Owasp web application security trendsOwasp web application security trends
Owasp web application security trends
 
EuroPython 2011 - How to build complex web applications having fun?
EuroPython 2011 - How to build complex web applications having fun?EuroPython 2011 - How to build complex web applications having fun?
EuroPython 2011 - How to build complex web applications having fun?
 
Building Desktop RIAs with PHP, HTML & Javascript in AIR
Building Desktop RIAs with PHP, HTML & Javascript in AIRBuilding Desktop RIAs with PHP, HTML & Javascript in AIR
Building Desktop RIAs with PHP, HTML & Javascript in AIR
 
JavaScript Libraries: The Big Picture
JavaScript Libraries: The Big PictureJavaScript Libraries: The Big Picture
JavaScript Libraries: The Big Picture
 
DVWA BruCON Workshop
DVWA BruCON WorkshopDVWA BruCON Workshop
DVWA BruCON Workshop
 
DVWA(Damn Vulnerabilities Web Application)
DVWA(Damn Vulnerabilities Web Application)DVWA(Damn Vulnerabilities Web Application)
DVWA(Damn Vulnerabilities Web Application)
 
Malicious file upload attacks - a case study
Malicious file upload attacks - a case studyMalicious file upload attacks - a case study
Malicious file upload attacks - a case study
 

Similar to Software Analysis for the Web: Achievements and Prospects

Web Development Presentation
Web Development PresentationWeb Development Presentation
Web Development PresentationTurnToTech
 
Web development concepts using microsoft technologies
Web development concepts using microsoft technologiesWeb development concepts using microsoft technologies
Web development concepts using microsoft technologiesHosam Kamel
 
ASP.NET AJAX with Visual Studio 2008
ASP.NET AJAX with Visual Studio 2008ASP.NET AJAX with Visual Studio 2008
ASP.NET AJAX with Visual Studio 2008Caleb Jenkins
 
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx France 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx France 2016Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx France 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx France 2016Matt Raible
 
Front-end. Global domination
Front-end. Global dominationFront-end. Global domination
Front-end. Global dominationStfalcon Meetups
 
Introduction To Code Igniter
Introduction To Code IgniterIntroduction To Code Igniter
Introduction To Code IgniterAmzad Hossain
 
Web Development for UX Designers
Web Development for UX DesignersWeb Development for UX Designers
Web Development for UX DesignersAshlimarie
 
Decoding the Web
Decoding the WebDecoding the Web
Decoding the Webnewcircle
 
Node.js introduction
Node.js introductionNode.js introduction
Node.js introductionParth Joshi
 
GDD Japan 2009 - Designing OpenSocial Apps For Speed and Scale
GDD Japan 2009 - Designing OpenSocial Apps For Speed and ScaleGDD Japan 2009 - Designing OpenSocial Apps For Speed and Scale
GDD Japan 2009 - Designing OpenSocial Apps For Speed and ScalePatrick Chanezon
 
Daniel Egan Msdn Tech Days Oc
Daniel Egan Msdn Tech Days OcDaniel Egan Msdn Tech Days Oc
Daniel Egan Msdn Tech Days OcDaniel Egan
 
Web Development Today
Web Development TodayWeb Development Today
Web Development Todaybretticus
 
Making Of PHP Based Web Application
Making Of PHP Based Web ApplicationMaking Of PHP Based Web Application
Making Of PHP Based Web ApplicationSachin Walvekar
 
(In)Security Implication in the JS Universe
(In)Security Implication in the JS Universe(In)Security Implication in the JS Universe
(In)Security Implication in the JS UniverseStefano Di Paola
 

Similar to Software Analysis for the Web: Achievements and Prospects (20)

Web Development Presentation
Web Development PresentationWeb Development Presentation
Web Development Presentation
 
Web development concepts using microsoft technologies
Web development concepts using microsoft technologiesWeb development concepts using microsoft technologies
Web development concepts using microsoft technologies
 
Ui dev@naukri-2011
Ui dev@naukri-2011Ui dev@naukri-2011
Ui dev@naukri-2011
 
Beyond The MVC
Beyond The MVCBeyond The MVC
Beyond The MVC
 
ASP.NET AJAX with Visual Studio 2008
ASP.NET AJAX with Visual Studio 2008ASP.NET AJAX with Visual Studio 2008
ASP.NET AJAX with Visual Studio 2008
 
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx France 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx France 2016Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx France 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx France 2016
 
Introduction To CodeIgniter
Introduction To CodeIgniterIntroduction To CodeIgniter
Introduction To CodeIgniter
 
Front-end. Global domination
Front-end. Global dominationFront-end. Global domination
Front-end. Global domination
 
Frontend. Global domination.
Frontend. Global domination.Frontend. Global domination.
Frontend. Global domination.
 
Introduction To Code Igniter
Introduction To Code IgniterIntroduction To Code Igniter
Introduction To Code Igniter
 
Starwest 2008
Starwest 2008Starwest 2008
Starwest 2008
 
Web Hacking
Web HackingWeb Hacking
Web Hacking
 
Web Development for UX Designers
Web Development for UX DesignersWeb Development for UX Designers
Web Development for UX Designers
 
Decoding the Web
Decoding the WebDecoding the Web
Decoding the Web
 
Node.js introduction
Node.js introductionNode.js introduction
Node.js introduction
 
GDD Japan 2009 - Designing OpenSocial Apps For Speed and Scale
GDD Japan 2009 - Designing OpenSocial Apps For Speed and ScaleGDD Japan 2009 - Designing OpenSocial Apps For Speed and Scale
GDD Japan 2009 - Designing OpenSocial Apps For Speed and Scale
 
Daniel Egan Msdn Tech Days Oc
Daniel Egan Msdn Tech Days OcDaniel Egan Msdn Tech Days Oc
Daniel Egan Msdn Tech Days Oc
 
Web Development Today
Web Development TodayWeb Development Today
Web Development Today
 
Making Of PHP Based Web Application
Making Of PHP Based Web ApplicationMaking Of PHP Based Web Application
Making Of PHP Based Web Application
 
(In)Security Implication in the JS Universe
(In)Security Implication in the JS Universe(In)Security Implication in the JS Universe
(In)Security Implication in the JS Universe
 

Recently uploaded

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.
 
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
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
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
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
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
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
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
 
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
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 

Recently uploaded (20)

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
 
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)
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
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...
 
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
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
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
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
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
 
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...
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 

Software Analysis for the Web: Achievements and Prospects

  • 1. Software Analysis for the Web: Achievements and Prospects Ali Mesbah University of British Columbia http://ece.ubc.ca/~amesbah/
  • 5. RESTFUL WEBSITES Stateless ServerBrowser HTML HTTP Request Response Internet HTML Generate HTML “Principled design of the modern Web architecture”, Fielding and Tylor, ICSE 2000
  • 7. MODERN WEB APPS Stateless ServerBrowser Async HTTP Request Response Internet JSON Generate JSON DOMCSS JS
  • 13. JavaScript: the Difficult Parts 1. Dynamic and weakly-typed • types can change dynamically • objects/functions can change • First-class functions 2. Event-driven 3. Asynchronous callbacks 4. Prototype-based • objects inherent from objects • can be redefined at runtime 5. Constructs such as eval 6. Interactions with DOM 7. Interpreted (not compiled) 8. … Make Software Analysis Challenging 13
  • 16. Web Code Analysis • Static Analysis • Points-to analysis (WALA) • Approximate call graphs • Data-flow analysis • Dynamic Analysis • Code quality checking • Tracing and visualization • Unused code detection
  • 17. Web Code Analysis • Static Analysis • Points-to analysis • Approximate call graphs • Data-flow analysis • Hybrid Analysis • Taint and blended analysis • Change impact analysis • Event-flow analysis • Dynamic Analysis • Code quality checking • Tracing and visualization • Unused code detection
  • 21. Web Code Testing • Different types of testing • Cross-Browser testing • Deterministic capture/replay • Regression testing • Test Adequecy • Guided mutation analysis • State-based coverage • Code coverage • Test Generation • Event-based Crawling • Feedback-directed execution • (Dynamic) symbolic execution
  • 23. 23
  • 25. Cross-Language Analysis We don’t know how to infer proper control flow graphs for web code. Stateless ServerBrowser Async HTTP Request Response Internet JSON JS, Java, PHP, Ruby, etc DOMCSS JS
  • 28. Programmer Support in IDEs • Code completion • Refactoring • Bug alerts • Smell detection
  • 29. Web Programmer Support in IDEs • Code completion • Refactoring • Bug alerts • Smell detection
  • 32. Test Case Maintenance We need better: Web element locators Repair techniques
  • 34. Empirical Studies Web analysis tools mainly built by reading best practices or through developer intuition and anecdotal observation Example: what are the most common cross-project bug patterns in web code?
  • 40. 40 @Test public void testAddNote(){ get("http://localhost:8080/theorganizer/"); findElement(By.id("logon_username")). sendKeys("user"); findElement(By.id("logon_password")). sendKeys("pswd"); findElement(By. cssSelector("input type ="image"")).click(); assertEquals("Welcome to The Organizer!", closeAlertAndGetItsText()); findElement(By.id("newNote")). click(); findElement(By.id("noteCreateShow_subject")).sendKeys("Running Example"); findElement(By.id("noteCreateShow_text")).sendKeys("Create a simple running example"); findElement(By. cssSelector("input type ="image"")).click(); assertEquals("Note has been created.", findElement(By.id("mainContent")). getText()); findElement(By.id("logoff")).click(); } @Test public void testAddNote(){ get("http://localhost:8080/theorganizer/"); findElement(By.id("logon_username")). sendKeys("user"); findElement(By.id("logon_password")). sendKeys("pswd"); findElement(By. cssSelector("input type ="image"")).click(); assertEquals("Welcome to The Organizer!", closeAlertAndGetItsText()); findElement(By.id("newNote")). click(); findElement(By.id("noteCreateShow_subject")).sendKeys("Running Example"); findElement(By.id("noteCreateShow_text")).sendKeys("Create a simple running example"); findElement(By. cssSelector("input type ="image"")).click(); assertEquals("Note has been created.", findElement(By.id("mainContent")). getText()); findElement(By.id("logoff")).click(); } @Test public void testAddNote(){ get("http://localhost:8080/theorganizer/"); findElement(By.id("logon_username")). sendKeys("user"); findElement(By.id("logon_password")). sendKeys("pswd"); findElement(By. cssSelector("input type ="image"")).click(); assertEquals("Welcome to The Organizer!", closeAlertAndGetItsText()); findElement(By.id("newNote")). click(); findElement(By.id("noteCreateShow_subject")).sendKeys("Running Example"); findElement(By.id("noteCreateShow_text")).sendKeys("Create a simple running example"); findElement(By. cssSelector("input type ="image"")).click(); assertEquals("Note has been created.", findElement(By.id("mainContent")). getText()); findElement(By.id("logoff")).click(); } @Test public void testAddNote(){ get("http://localhost:8080/theorganizer/"); findElement(By.id("logon_username")). sendKeys("user"); findElement(By.id("logon_password")). sendKeys("pswd"); findElement(By. cssSelector("input type ="image"")).click(); assertEquals("Welcome to The Organizer!", closeAlertAndGetItsText()); findElement(By.id("newNote")). click(); findElement(By.id("noteCreateShow_subject")).sendKeys("Running Example"); findElement(By.id("noteCreateShow_text")).sendKeys("Create a simple running example"); findElement(By. cssSelector("input type ="image"")).click(); assertEquals("Note has been created.", findElement(By.id("mainContent")). getText()); findElement(By.id("logoff")).click(); } @Test public void testAddNote(){ get("http://localhost:8080/theorganizer/"); findElement(By.id("logon_username")). sendKeys("user"); findElement(By.id("logon_password")). sendKeys("pswd"); findElement(By. cssSelector("input type ="image"")).click(); assertEquals("Welcome to The Organizer!", closeAlertAndGetItsText()); findElement(By.id("newNote")). click(); findElement(By.id("noteCreateShow_subject")).sendKeys("Running Example"); findElement(By.id("noteCreateShow_text")).sendKeys("Create a simple running example"); findElement(By. cssSelector("input type ="image"")).click(); assertEquals("Note has been created.", findElement(By.id("mainContent")). getText()); findElement(By.id("logoff")).click(); } @Test public void testAddNote(){ get("http://localhost:8080/theorganizer/"); findElement(By.id("logon_username")). sendKeys("user"); findElement(By.id("logon_password")). sendKeys("pswd"); findElement(By. cssSelector("input type ="image"")).click(); assertEquals("Welcome to The Organizer!", closeAlertAndGetItsText()); findElement(By.id("newNote")). click(); findElement(By.id("noteCreateShow_subject")).sendKeys("Running Example"); findElement(By.id("noteCreateShow_text")).sendKeys("Create a simple running example"); findElement(By. cssSelector("input type ="image"")).click(); assertEquals("Note has been created.", findElement(By.id("mainContent")). getText()); findElement(By.id("logoff")).click(); } @Test public void testAddNote(){ get("http://localhost:8080/theorganizer/"); findElement(By.id("logon_username")). sendKeys("user"); findElement(By.id("logon_password")). sendKeys("pswd"); findElement(By. cssSelector("input type ="image"")).click(); assertEquals("Welcome to The Organizer!", closeAlertAndGetItsText()); findElement(By.id("newNote")). click(); findElement(By.id("noteCreateShow_subject")).sendKeys("Running Example"); findElement(By.id("noteCreateShow_text")).sendKeys("Create a simple running example"); findElement(By. cssSelector("input type ="image"")).click(); assertEquals("Note has been created.", findElement(By.id("mainContent")). getText()); findElement(By.id("logoff")).click(); } @Test public void testAddNote(){ get("http://localhost:8080/theorganizer/"); findElement(By.id("logon_username")). sendKeys("user"); findElement(By.id("logon_password")). sendKeys("pswd"); findElement(By. cssSelector("input type ="image"")).click(); assertEquals("Welcome to The Organizer!", closeAlertAndGetItsText()); findElement(By.id("newNote")). click(); findElement(By.id("noteCreateShow_subject")).sendKeys("Running Example"); findElement(By.id("noteCreateShow_text")).sendKeys("Create a simple running example"); findElement(By. cssSelector("input type ="image"")).click(); assertEquals("Note has been created.", findElement(By.id("mainContent")). getText()); findElement(By.id("logoff")).click(); } @Test public void testAddNote(){ get("http://localhost:8080/theorganizer/"); findElement(By.id("logon_username")). sendKeys("user"); findElement(By.id("logon_password")). sendKeys("pswd"); findElement(By. cssSelector("input type ="image"")).click(); assertEquals("Welcome to The Organizer!", closeAlertAndGetItsText()); findElement(By.id("newNote")). click(); findElement(By.id("noteCreateShow_subject")).sendKeys("Running Example"); findElement(By.id("noteCreateShow_text")).sendKeys("Create a simple running example"); findElement(By. cssSelector("input type ="image"")).click(); assertEquals("Note has been created.", findElement(By.id("mainContent")). getText()); findElement(By.id("logoff")).click(); } @Test public void testAddNote(){ get("http://localhost:8080/theorganizer/"); findElement(By.id("logon_username")). sendKeys("user"); findElement(By.id("logon_password")). sendKeys("pswd"); findElement(By. cssSelector("input type ="image"")).click(); assertEquals("Welcome to The Organizer!", closeAlertAndGetItsText()); findElement(By.id("newNote")). click(); findElement(By.id("noteCreateShow_subject")).sendKeys("Running Example"); findElement(By.id("noteCreateShow_text")).sendKeys("Create a simple running example"); findElement(By. cssSelector("input type ="image"")).click(); assertEquals("Note has been created.", findElement(By.id("mainContent")). getText()); findElement(By.id("logoff")).click(); } @Test public void testAddNote(){ get("http://localhost:8080/theorganizer/"); findElement(By.id("logon_username")). sendKeys("user"); findElement(By.id("logon_password")). sendKeys("pswd"); findElement(By. cssSelector("input type ="image"")).click(); assertEquals("Welcome to The Organizer!", closeAlertAndGetItsText()); findElement(By.id("newNote")). click(); findElement(By.id("noteCreateShow_subject")).sendKeys("Running Example"); findElement(By.id("noteCreateShow_text")).sendKeys("Create a simple running example"); findElement(By. cssSelector("input type ="image"")).click(); assertEquals("Note has been created.", findElement(By.id("mainContent")). getText()); findElement(By.id("logoff")).click(); }
  • 41. Learning Assertions A classification problem: • Is a web element important to be checked by an assertion? Apply machine learning to train a classier • Features: position, size, page-rank, LinkNum, ChildNum, …
  • 42. FROM MONOLITHIC APPS Stateless ServerBrowser Async HTTP Request Response Internet JSON Generate JSON DOMCSS JS 42
  • 43. TO MICRO SERVICES Micro ServicesBrowser Restful HTTP Request Response Internet JSON DOMCSS JS Micro Service Micro Service Micro Service Micro Service Micro Service Micro Service Micro Service Micro Service Micro Service Micro Service Micro Service Micro Service
  • 44. 44 On the client Even in hardware!On the server JavaScript is everywhere