SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances

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
 

Tendances (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
 

En vedette

En vedette (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
 

Similaire à 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
 

Similaire à 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
 

Dernier

Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 

Dernier (20)

Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

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

Notes de l'éditeur

  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)