SlideShare ist ein Scribd-Unternehmen logo
1 von 42
JavaScript Wash
Story of a UI Development
M A Hossain Tonu
http://mahtonu.wordpress.com
Tweets @mahtonu
Improsys, Inc
Objective
PhpXperts Seminar 2010
Contents
• JS in Mobile Application Development
• Interactive UI samples
• Open Source JS Libraries
• The High-Performance JS Mantra
• Tools
PhpXperts Seminar 2010
Some Common Issues
• JavaScript != Java
• Client/Server Side JS = YES
• Non-Web-related apps = YES
• OOP Support = YES
• Multi-threading 
PhpXperts Seminar 2010
Only for web browsers? No
Rhino - Open source JS engine for Java.
Aptana Jaxer - Server side JS
Node.js – Client- Server JS
PhpXperts Seminar 2010
Runs within a host environment
Web browser
Adobe Acrobat
Photoshop
Windows Scripting Host
Yahoo! Widget Engine
and more...
PhpXperts Seminar 2010
JS in Mobile Application Development
Titanium RhoMobile
PhoneGap
PhpXperts Seminar 2010
Devices =
Dev. Platform =
Interactive UI using JavaScript
PhpXperts Seminar 2010
Interactive UI using JavaScript
PhpXperts Seminar 2010
Interactive UI using JavaScript
PhpXperts Seminar 2010
Interactive UI using JavaScript
PhpXperts Seminar 2010
Interactive UI using JavaScript
PhpXperts Seminar 2010
PhpXperts Seminar 2010
= Yes
All you need
• JavaScript Libraries
• High Performance JavaScript
Mantra
PhpXperts Seminar 2010
Open Source JS Libraries
• General Purpose:
– Prototype
– jQuery
– Yahoo! UI
– Dojo
– Ext JS
• Task Specific:
– Script.aculo.us (Effects)
– moo.fx (Effects)
– $fx() (Animation)
– Rapheal (Vector Graphics)
– Glimmer (Interaction)PhpXperts Seminar 2010
Why JS Libraries?
• High Performance
• Development -> faster
• cross-browser
PhpXperts Seminar 2010
High-Performance JavaScript Matters
• Fast apps = 
• Slow apps = 
• AJAX = responsiveness!!
• User experience = WOW!
PhpXperts Seminar 2010
The High-Performance JS
Mantra
• Be Lazy
• Be Responsive
• Be Vigilant
PhpXperts Seminar 2010
The High-Performance JS Mantra
• Be Lazy : Nothing is faster than doing nothing
• Be Responsive
• Be Vigilant
PhpXperts Seminar 2010
Be Lazy: Nothing is faster than doing nothing
• Write less code
• Frequent code releases 
Frequently re-download
• More code = more to
download, execute, maintain,
etc
PhpXperts Seminar 2010
Be Lazy: Nothing is faster than doing nothing
• Before:
• After:
PhpXperts Seminar 2010
/**
* The dom module provides helper methods for
* manipulating Dom elements.
* @module dom
*
*/
(function() {
var Y = YAHOO.util, // internal shorthand
getStyle, // for load time browser branching
setStyle, // ditto
propertyCache = {}, // for faster hyphen converts
reClassNameCache = {}, // cache regexes for className
document = window.document; // cache for faster lookups
YAHOO.env._id_counter = YAHOO.env._id_counter || 0;
(function(){var
B=YAHOO.util,K,I,J={},F={},M=window.document;YAHOO.env._id_counter=YAHOO.en
v._id_counter||0;
MINIFY = Good
Be Lazy: Nothing is faster than doing nothing
• Load JS on-demand
• Less HTTP Requests
Before:
After:
PhpXperts Seminar 2010
<script src="all.js“ type="text/javascript“></script>
<script src="jquery.js"></script>
<script src="jquery.twitter.js"></script>
<script src="jquery.cookie.js"></script>
<script src="myapp.js"></script>
Be Lazy: Nothing is faster than doing nothing
• Draw UI as late as possible
Draw less DOM = faster
Pre-draw hidden UI = No
Cache = Yes
Hidden UI updating = No
PhpXperts Seminar 2010
PhpXperts Seminar 2010
Never pre-draw hidden UI
PhpXperts Seminar 2010
Never pre-draw hidden UI
PhpXperts Seminar 2010
Never pre-draw hidden UI
PhpXperts Seminar 2010
Never pre-draw hidden UI
PhpXperts Seminar 2010
Never pre-draw hidden UI
The High-Performance JS Mantra
• Be Lazy
• Be Responsive: Jump when the user says
jump
• Be Vigilant
PhpXperts Seminar 2010
Be Responsive: Jump when the user says jump
• Minimize initial load time
CSS at top
JS at bottom
UI placeholder > “loading”
Load in stages
• Yield early and often
do min. work, use setTimeout() to yield
PhpXperts Seminar 2010
Be Responsive: Jump when the user says jump
PhpXperts Seminar 2010
Load your app in stages
Be Responsive: Jump when the user says jump
PhpXperts Seminar 2010
Load your app in stages
Be Responsive: Jump when the user says jump
PhpXperts Seminar 2010
Load your app in stages
Be Responsive: Jump when the user says jump
PhpXperts Seminar 2010
Load your app in stages
Be Responsive: Jump when the user says jump
PhpXperts Seminar 2010
Load your app in stages
Be Responsive: Jump when the user says jump
PhpXperts Seminar 2010
Load your app in stages
Be Responsive: Jump when the user says jump
PhpXperts Seminar 2010
Load your app in stages
The High-Performance JS Mantra
• Be Lazy
• Be Responsive
• Be Vigilant: Only you can prevent slow web apps
PhpXperts Seminar 2010
Be Vigilant: Only you can prevent slow web apps
• Profile like crazy
Use firebug’s profiler (Joe Hewitt, you rule! )
Use timestamp diffs and alerts
PhpXperts Seminar 2010
Tools
PhpXperts Seminar 2010
Questions
PhpXperts Seminar 2010
References
JavaScript: The World's Most Misunderstood Programming Language
Private Members in JavaScript
Books:
JavaScript: The Good Part by Douglus Crockford
JavaScript: The Definitive Guide (5th Edition) by David Flanagan
jQuery Cheat sheet
Server side JS
PhpXperts Seminar 2010

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction to PowerShell and getting started
Introduction to PowerShell and getting startedIntroduction to PowerShell and getting started
Introduction to PowerShell and getting startedRavikanth Chaganti
 
AD105 - OneUI.. really? Is that because you don't know about Twitter Bootstrap?
AD105 - OneUI.. really? Is that because you don't know about Twitter Bootstrap?AD105 - OneUI.. really? Is that because you don't know about Twitter Bootstrap?
AD105 - OneUI.. really? Is that because you don't know about Twitter Bootstrap?Andrew Barickman
 
wp cli- don’t fear the command line
wp cli- don’t fear the command linewp cli- don’t fear the command line
wp cli- don’t fear the command lineDwayne McDaniel
 
JS Meetup Webapp/Software communication
JS Meetup Webapp/Software communicationJS Meetup Webapp/Software communication
JS Meetup Webapp/Software communicationnarcvs
 
WordPress Security
WordPress SecurityWordPress Security
WordPress SecurityIvan Storck
 
Web technologies practical guide
Web technologies practical guideWeb technologies practical guide
Web technologies practical guidesamir azazy
 
Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011Timothy Fisher
 

Was ist angesagt? (12)

Introduction to PowerShell and getting started
Introduction to PowerShell and getting startedIntroduction to PowerShell and getting started
Introduction to PowerShell and getting started
 
Making a living
Making a livingMaking a living
Making a living
 
AD105 - OneUI.. really? Is that because you don't know about Twitter Bootstrap?
AD105 - OneUI.. really? Is that because you don't know about Twitter Bootstrap?AD105 - OneUI.. really? Is that because you don't know about Twitter Bootstrap?
AD105 - OneUI.. really? Is that because you don't know about Twitter Bootstrap?
 
TPR4
TPR4TPR4
TPR4
 
wp cli- don’t fear the command line
wp cli- don’t fear the command linewp cli- don’t fear the command line
wp cli- don’t fear the command line
 
Yeoman
YeomanYeoman
Yeoman
 
JS Meetup Webapp/Software communication
JS Meetup Webapp/Software communicationJS Meetup Webapp/Software communication
JS Meetup Webapp/Software communication
 
WordPress Security
WordPress SecurityWordPress Security
WordPress Security
 
Web technologies practical guide
Web technologies practical guideWeb technologies practical guide
Web technologies practical guide
 
AS
ASAS
AS
 
Learning to code
Learning to codeLearning to code
Learning to code
 
Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011
 

Andere mochten auch

Andere mochten auch (12)

Google Maps API
Google Maps APIGoogle Maps API
Google Maps API
 
Google Map API
Google Map APIGoogle Map API
Google Map API
 
Google Maps API
Google Maps APIGoogle Maps API
Google Maps API
 
Software Engineering in PHP
Software Engineering in PHPSoftware Engineering in PHP
Software Engineering in PHP
 
Understanding Microservices
Understanding Microservices Understanding Microservices
Understanding Microservices
 
Developing WordPress Plugins : For Begineers
Developing WordPress Plugins :  For BegineersDeveloping WordPress Plugins :  For Begineers
Developing WordPress Plugins : For Begineers
 
Before you jump into Angular
Before you jump into AngularBefore you jump into Angular
Before you jump into Angular
 
Build social apps for Facebook
Build social apps for FacebookBuild social apps for Facebook
Build social apps for Facebook
 
Introduction to Meteor - Worldwide Meteor Day
Introduction to Meteor - Worldwide Meteor DayIntroduction to Meteor - Worldwide Meteor Day
Introduction to Meteor - Worldwide Meteor Day
 
Secure my ng-app
Secure my ng-appSecure my ng-app
Secure my ng-app
 
Succeeding with FOSS!
Succeeding with FOSS!Succeeding with FOSS!
Succeeding with FOSS!
 
Understanding meteor
Understanding meteorUnderstanding meteor
Understanding meteor
 

Ähnlich wie JavaScript Wash - Story of UI Development

Federico Feroldi: PHP in Yahoo!
Federico Feroldi: PHP in Yahoo!Federico Feroldi: PHP in Yahoo!
Federico Feroldi: PHP in Yahoo!Francesco Fullone
 
Federico Feroldi Php In Yahoo
Federico Feroldi Php In YahooFederico Feroldi Php In Yahoo
Federico Feroldi Php In YahooFederico Feroldi
 
Building and deploying PHP applications with Phing
Building and deploying PHP applications with PhingBuilding and deploying PHP applications with Phing
Building and deploying PHP applications with PhingMichiel Rook
 
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.WO Community
 
Behavior & Specification Driven Development in PHP - #OpenWest
Behavior & Specification Driven Development in PHP - #OpenWestBehavior & Specification Driven Development in PHP - #OpenWest
Behavior & Specification Driven Development in PHP - #OpenWestJoshua Warren
 
Introduction to PHP - SDPHP
Introduction to PHP - SDPHPIntroduction to PHP - SDPHP
Introduction to PHP - SDPHPEric Johnson
 
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
 
CONTENT MANAGEMENT SYSTEM
CONTENT MANAGEMENT SYSTEMCONTENT MANAGEMENT SYSTEM
CONTENT MANAGEMENT SYSTEMANAND PRAKASH
 
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
 
Phpworks enterprise-php-1227605806710884-9
Phpworks enterprise-php-1227605806710884-9Phpworks enterprise-php-1227605806710884-9
Phpworks enterprise-php-1227605806710884-9PrinceGuru MS
 
High Performance JavaScript - Fronteers 2010
High Performance JavaScript - Fronteers 2010High Performance JavaScript - Fronteers 2010
High Performance JavaScript - Fronteers 2010Nicholas Zakas
 
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Michael Lihs
 
Simplify your professional web development with symfony
Simplify your professional web development with symfonySimplify your professional web development with symfony
Simplify your professional web development with symfonyFrancois Zaninotto
 
CodeIgniter - PHP MVC Framework by silicongulf.com
CodeIgniter - PHP MVC Framework by silicongulf.comCodeIgniter - PHP MVC Framework by silicongulf.com
CodeIgniter - PHP MVC Framework by silicongulf.comChristopher Cubos
 
Max Voloshin - "Organization of frontend development for products with micros...
Max Voloshin - "Organization of frontend development for products with micros...Max Voloshin - "Organization of frontend development for products with micros...
Max Voloshin - "Organization of frontend development for products with micros...IT Event
 
Apache Flex and the imperfect Web
Apache Flex and the imperfect WebApache Flex and the imperfect Web
Apache Flex and the imperfect Webmasuland
 

Ähnlich wie JavaScript Wash - Story of UI Development (20)

Federico Feroldi: PHP in Yahoo!
Federico Feroldi: PHP in Yahoo!Federico Feroldi: PHP in Yahoo!
Federico Feroldi: PHP in Yahoo!
 
Federico Feroldi Php In Yahoo
Federico Feroldi Php In YahooFederico Feroldi Php In Yahoo
Federico Feroldi Php In Yahoo
 
Building and deploying PHP applications with Phing
Building and deploying PHP applications with PhingBuilding and deploying PHP applications with Phing
Building and deploying PHP applications with Phing
 
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.
 
Behavior & Specification Driven Development in PHP - #OpenWest
Behavior & Specification Driven Development in PHP - #OpenWestBehavior & Specification Driven Development in PHP - #OpenWest
Behavior & Specification Driven Development in PHP - #OpenWest
 
Introduction to PHP - SDPHP
Introduction to PHP - SDPHPIntroduction to PHP - SDPHP
Introduction to PHP - SDPHP
 
Enterprise PHP (PHP London Conference 2008)
Enterprise PHP (PHP London Conference 2008)Enterprise PHP (PHP London Conference 2008)
Enterprise PHP (PHP London Conference 2008)
 
Chp 08 php (shared)
Chp 08   php  (shared) Chp 08   php  (shared)
Chp 08 php (shared)
 
CONTENT MANAGEMENT SYSTEM
CONTENT MANAGEMENT SYSTEMCONTENT MANAGEMENT SYSTEM
CONTENT MANAGEMENT SYSTEM
 
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
 
JavaScript Toolkit
JavaScript ToolkitJavaScript Toolkit
JavaScript Toolkit
 
Phpworks enterprise-php-1227605806710884-9
Phpworks enterprise-php-1227605806710884-9Phpworks enterprise-php-1227605806710884-9
Phpworks enterprise-php-1227605806710884-9
 
TPR4
TPR4TPR4
TPR4
 
High Performance JavaScript - Fronteers 2010
High Performance JavaScript - Fronteers 2010High Performance JavaScript - Fronteers 2010
High Performance JavaScript - Fronteers 2010
 
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
 
Simplify your professional web development with symfony
Simplify your professional web development with symfonySimplify your professional web development with symfony
Simplify your professional web development with symfony
 
CodeIgniter - PHP MVC Framework by silicongulf.com
CodeIgniter - PHP MVC Framework by silicongulf.comCodeIgniter - PHP MVC Framework by silicongulf.com
CodeIgniter - PHP MVC Framework by silicongulf.com
 
Max Voloshin - "Organization of frontend development for products with micros...
Max Voloshin - "Organization of frontend development for products with micros...Max Voloshin - "Organization of frontend development for products with micros...
Max Voloshin - "Organization of frontend development for products with micros...
 
Apache Flex and the imperfect Web
Apache Flex and the imperfect WebApache Flex and the imperfect Web
Apache Flex and the imperfect Web
 

Kürzlich hochgeladen

Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 

Kürzlich hochgeladen (20)

Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 

JavaScript Wash - Story of UI Development

  • 1. JavaScript Wash Story of a UI Development M A Hossain Tonu http://mahtonu.wordpress.com Tweets @mahtonu Improsys, Inc
  • 3. Contents • JS in Mobile Application Development • Interactive UI samples • Open Source JS Libraries • The High-Performance JS Mantra • Tools PhpXperts Seminar 2010
  • 4. Some Common Issues • JavaScript != Java • Client/Server Side JS = YES • Non-Web-related apps = YES • OOP Support = YES • Multi-threading  PhpXperts Seminar 2010
  • 5. Only for web browsers? No Rhino - Open source JS engine for Java. Aptana Jaxer - Server side JS Node.js – Client- Server JS PhpXperts Seminar 2010
  • 6. Runs within a host environment Web browser Adobe Acrobat Photoshop Windows Scripting Host Yahoo! Widget Engine and more... PhpXperts Seminar 2010
  • 7. JS in Mobile Application Development Titanium RhoMobile PhoneGap PhpXperts Seminar 2010 Devices = Dev. Platform =
  • 8. Interactive UI using JavaScript PhpXperts Seminar 2010
  • 9. Interactive UI using JavaScript PhpXperts Seminar 2010
  • 10. Interactive UI using JavaScript PhpXperts Seminar 2010
  • 11. Interactive UI using JavaScript PhpXperts Seminar 2010
  • 12. Interactive UI using JavaScript PhpXperts Seminar 2010
  • 14. All you need • JavaScript Libraries • High Performance JavaScript Mantra PhpXperts Seminar 2010
  • 15. Open Source JS Libraries • General Purpose: – Prototype – jQuery – Yahoo! UI – Dojo – Ext JS • Task Specific: – Script.aculo.us (Effects) – moo.fx (Effects) – $fx() (Animation) – Rapheal (Vector Graphics) – Glimmer (Interaction)PhpXperts Seminar 2010
  • 16. Why JS Libraries? • High Performance • Development -> faster • cross-browser PhpXperts Seminar 2010
  • 17. High-Performance JavaScript Matters • Fast apps =  • Slow apps =  • AJAX = responsiveness!! • User experience = WOW! PhpXperts Seminar 2010
  • 18. The High-Performance JS Mantra • Be Lazy • Be Responsive • Be Vigilant PhpXperts Seminar 2010
  • 19. The High-Performance JS Mantra • Be Lazy : Nothing is faster than doing nothing • Be Responsive • Be Vigilant PhpXperts Seminar 2010
  • 20. Be Lazy: Nothing is faster than doing nothing • Write less code • Frequent code releases  Frequently re-download • More code = more to download, execute, maintain, etc PhpXperts Seminar 2010
  • 21. Be Lazy: Nothing is faster than doing nothing • Before: • After: PhpXperts Seminar 2010 /** * The dom module provides helper methods for * manipulating Dom elements. * @module dom * */ (function() { var Y = YAHOO.util, // internal shorthand getStyle, // for load time browser branching setStyle, // ditto propertyCache = {}, // for faster hyphen converts reClassNameCache = {}, // cache regexes for className document = window.document; // cache for faster lookups YAHOO.env._id_counter = YAHOO.env._id_counter || 0; (function(){var B=YAHOO.util,K,I,J={},F={},M=window.document;YAHOO.env._id_counter=YAHOO.en v._id_counter||0; MINIFY = Good
  • 22. Be Lazy: Nothing is faster than doing nothing • Load JS on-demand • Less HTTP Requests Before: After: PhpXperts Seminar 2010 <script src="all.js“ type="text/javascript“></script> <script src="jquery.js"></script> <script src="jquery.twitter.js"></script> <script src="jquery.cookie.js"></script> <script src="myapp.js"></script>
  • 23. Be Lazy: Nothing is faster than doing nothing • Draw UI as late as possible Draw less DOM = faster Pre-draw hidden UI = No Cache = Yes Hidden UI updating = No PhpXperts Seminar 2010
  • 24. PhpXperts Seminar 2010 Never pre-draw hidden UI
  • 25. PhpXperts Seminar 2010 Never pre-draw hidden UI
  • 26. PhpXperts Seminar 2010 Never pre-draw hidden UI
  • 27. PhpXperts Seminar 2010 Never pre-draw hidden UI
  • 28. PhpXperts Seminar 2010 Never pre-draw hidden UI
  • 29. The High-Performance JS Mantra • Be Lazy • Be Responsive: Jump when the user says jump • Be Vigilant PhpXperts Seminar 2010
  • 30. Be Responsive: Jump when the user says jump • Minimize initial load time CSS at top JS at bottom UI placeholder > “loading” Load in stages • Yield early and often do min. work, use setTimeout() to yield PhpXperts Seminar 2010
  • 31. Be Responsive: Jump when the user says jump PhpXperts Seminar 2010 Load your app in stages
  • 32. Be Responsive: Jump when the user says jump PhpXperts Seminar 2010 Load your app in stages
  • 33. Be Responsive: Jump when the user says jump PhpXperts Seminar 2010 Load your app in stages
  • 34. Be Responsive: Jump when the user says jump PhpXperts Seminar 2010 Load your app in stages
  • 35. Be Responsive: Jump when the user says jump PhpXperts Seminar 2010 Load your app in stages
  • 36. Be Responsive: Jump when the user says jump PhpXperts Seminar 2010 Load your app in stages
  • 37. Be Responsive: Jump when the user says jump PhpXperts Seminar 2010 Load your app in stages
  • 38. The High-Performance JS Mantra • Be Lazy • Be Responsive • Be Vigilant: Only you can prevent slow web apps PhpXperts Seminar 2010
  • 39. Be Vigilant: Only you can prevent slow web apps • Profile like crazy Use firebug’s profiler (Joe Hewitt, you rule! ) Use timestamp diffs and alerts PhpXperts Seminar 2010
  • 42. References JavaScript: The World's Most Misunderstood Programming Language Private Members in JavaScript Books: JavaScript: The Good Part by Douglus Crockford JavaScript: The Definitive Guide (5th Edition) by David Flanagan jQuery Cheat sheet Server side JS PhpXperts Seminar 2010

Hinweis der Redaktion

  1. When it comes to Object Oriented issue: it does have constructors which do what classes do, including acting as containers for class variables and methods. It does not have class-oriented inheritance, but it does have prototype-oriented inheritance. The two main ways of building up object systems are by inheritance (is-a) and by aggregation (has-a). JavaScript does both Capable of information hiding JavaScript objects can have private variables and private methods JavaScript supports not only classical inheritance, but other code reuse patterns as well.
  2. While JavaScript is most widely used for client side scripting in a browser, it is a fully fledged language and can be used anywhere.
  3. Cross platform mobile apps development for JavaScript developers
  4. A JavaScript library is like a toolbox You can build any number of things using the tools
  5. Write less code Each line costs parsing time Can’t rely on browser caching to excuse large code size Yahoo study: surprising number of hits with empty cache Frequent code releases  frequently need to re-download
  6. You just saved 3 HTTP requests 
  7. Draw UI as late as possible Draw less DOM = faster to draw, browser less saturated Never pre-draw hidden UI if you can avoid it Cache previously drawn HTML when appropriate But have to know when to invalidate the cache Don’t keep hidden UI up-to-date behind the scenes Just re-draw next time you show it (simpler, one-time cost)
  8. Put CSS at the top of your page and JS at the bottom Draw major placeholder UI with “loading…” first Load / draw your app in stages (lazy, on-demand)