SlideShare a Scribd company logo
1 of 12
S
UI Components
Development Guidelines
Create life cycle
S Initiate
S Render
S Loading Meta
S Loading Template
S Loading Data
S Actual Render
S Create sub views/components
S Bind Internal events
S Bind External events
Remove life cycle
S Stop any running animations
S Unbind/stop listening external Events
S Unbind/stop listening internal Events
S Unbind loading complete/failure handlers (meta, template ,data)
S Abort any loading calls
S Clear timeouts, intervals, debounced/deferred executions
S Remove trails (popups)
S Remove Sub views / child components
S Remove element from DOM
Dependencies
S Meta (country list, options list)
S Template
S Data (user selection)
S Other components
Create States
S Initiated
S Waiting for other components to render
S Loading (meta, template, data)
S Rendered
S Custom States (edit, summary etc)
Error States
S Network/Time out (meta, template, data)
S No Records
S Invalid Input / Other service errors
S Wrong Selection
Selection States
S No Selection
S Default Selection
S All Selection
S Some Selection
View Model DOM sync
User
Interaction
updateModel Change
Change updateDOM
Update
Elements
Plan for
S Meta Refresh
S External Model manipulation
S Deep-linking widget state
S Widget defaults
Dos
S JSHINT code from day one, it saves a lot of errors and
debugging
S Use deferred for any async operation (loading, rendering)
S Handle success and failure case for each deferred
S Defer creating DOM elements more than 20
S Debounce function calls if needed
S Keep functions short, this increases re-usability
Dos ctnd..
S Cleanup all event handlers, setTimeouts and deferreds, they
are the main source of memory leaks
S Go defensive, start with error case then code for success case
S Provide user feedback about all waiting/loading to user, it
makes your app look snappy.
S Validate every user input, every input should have upper limit
S Sanitize user input if needed before posting it to server
Donts
S Don’t do DOM query for reading Widget state – should always be
read from model
S Don’t change elements outside given view, using $.closest,
$.parent $(‘selector’) is possible use cases
S Don’t update DOM without updating model, they are easy, but
creates problems in future
S Don’t use $.html(value) unless you know what you are doing,
prefer rendering model values through template engine
(handlebars etc)
S Don’t write JavaScript files bigger than 200 lines, smaller the
better.

More Related Content

Viewers also liked

Meta Model Parts
Meta Model PartsMeta Model Parts
Meta Model Partshenkharms
 
Meta data migration
Meta data migrationMeta data migration
Meta data migrationMahesh Varde
 
CMA-ES with local meta-models
CMA-ES with local meta-modelsCMA-ES with local meta-models
CMA-ES with local meta-modelszyedb
 
MR^3: Meta-Model Management based on RDFs Revision Reflection
MR^3: Meta-Model Management based on RDFs Revision ReflectionMR^3: Meta-Model Management based on RDFs Revision Reflection
MR^3: Meta-Model Management based on RDFs Revision ReflectionTakeshi Morita
 
Quality, and the 7Loci Meta-Model as one of my 2016-2017 lectures at the Univ...
Quality, and the 7Loci Meta-Model as one of my 2016-2017 lectures at the Univ...Quality, and the 7Loci Meta-Model as one of my 2016-2017 lectures at the Univ...
Quality, and the 7Loci Meta-Model as one of my 2016-2017 lectures at the Univ...Roberto Peretta
 
COBI 2014 - An Empirical Evaluation of Capability Modelling using Design Rati...
COBI 2014 - An Empirical Evaluation of Capability Modelling using Design Rati...COBI 2014 - An Empirical Evaluation of Capability Modelling using Design Rati...
COBI 2014 - An Empirical Evaluation of Capability Modelling using Design Rati...CaaS EU FP7 Project
 
COBI 2014 - Designing a Meta Model as the Foundation for Compliance Capability
COBI 2014 - Designing a Meta Model as the Foundation for Compliance CapabilityCOBI 2014 - Designing a Meta Model as the Foundation for Compliance Capability
COBI 2014 - Designing a Meta Model as the Foundation for Compliance CapabilityCaaS EU FP7 Project
 
Applying Quality Function Deployment method for business architecture alignment
Applying Quality Function Deployment method for business architecture alignmentApplying Quality Function Deployment method for business architecture alignment
Applying Quality Function Deployment method for business architecture alignmentDmitry Kudryavtsev
 
Practical meta-model extension for modeling language profiles An enterprise ar...
Practical meta-model extension for modeling language profiles An enterprise ar...Practical meta-model extension for modeling language profiles An enterprise ar...
Practical meta-model extension for modeling language profiles An enterprise ar...Vanea Chiprianov
 
Semantic Web Services Meta-model
Semantic Web Services Meta-modelSemantic Web Services Meta-model
Semantic Web Services Meta-modelAbdalmassih Yakeen
 
Web Service Capability Meta Model
Web Service Capability Meta ModelWeb Service Capability Meta Model
Web Service Capability Meta ModelWassim Derguech
 
Pbmr Ea Meta Model Poster V01.03
Pbmr Ea Meta Model Poster V01.03Pbmr Ea Meta Model Poster V01.03
Pbmr Ea Meta Model Poster V01.03Sean Manyaapelo
 
Modeling Business Strategy: A meta-model of Strategy Maps and Balance Scorecards
Modeling Business Strategy: A meta-model of Strategy Maps and Balance ScorecardsModeling Business Strategy: A meta-model of Strategy Maps and Balance Scorecards
Modeling Business Strategy: A meta-model of Strategy Maps and Balance ScorecardsCωνσtantίnoς Giannoulis
 
A common meta model for data analysis based on DSM
A common meta model for data analysis based on DSMA common meta model for data analysis based on DSM
A common meta model for data analysis based on DSMYvette Teiken
 
Introducing the Enterprise Transformation Meta Model
Introducing the Enterprise Transformation Meta ModelIntroducing the Enterprise Transformation Meta Model
Introducing the Enterprise Transformation Meta ModelRenee Troughton
 
The Cha-Q Meta-Model: A Comprehensive, Change-Centric Software Representation
The Cha-Q Meta-Model: A Comprehensive, Change-Centric Software RepresentationThe Cha-Q Meta-Model: A Comprehensive, Change-Centric Software Representation
The Cha-Q Meta-Model: A Comprehensive, Change-Centric Software RepresentationCoen De Roover
 
An intro to building an architecture repository meta model and modeling frame...
An intro to building an architecture repository meta model and modeling frame...An intro to building an architecture repository meta model and modeling frame...
An intro to building an architecture repository meta model and modeling frame...wweinmeyer79
 
Introduction to the NLP Meta Model - NLP Business Coaching Series
Introduction to the NLP Meta Model - NLP Business Coaching SeriesIntroduction to the NLP Meta Model - NLP Business Coaching Series
Introduction to the NLP Meta Model - NLP Business Coaching SeriesFiona Campbell
 

Viewers also liked (20)

Meta Model Parts
Meta Model PartsMeta Model Parts
Meta Model Parts
 
Meta data migration
Meta data migrationMeta data migration
Meta data migration
 
CMA-ES with local meta-models
CMA-ES with local meta-modelsCMA-ES with local meta-models
CMA-ES with local meta-models
 
Cloud meta model
Cloud meta modelCloud meta model
Cloud meta model
 
MR^3: Meta-Model Management based on RDFs Revision Reflection
MR^3: Meta-Model Management based on RDFs Revision ReflectionMR^3: Meta-Model Management based on RDFs Revision Reflection
MR^3: Meta-Model Management based on RDFs Revision Reflection
 
Quality, and the 7Loci Meta-Model as one of my 2016-2017 lectures at the Univ...
Quality, and the 7Loci Meta-Model as one of my 2016-2017 lectures at the Univ...Quality, and the 7Loci Meta-Model as one of my 2016-2017 lectures at the Univ...
Quality, and the 7Loci Meta-Model as one of my 2016-2017 lectures at the Univ...
 
COBI 2014 - An Empirical Evaluation of Capability Modelling using Design Rati...
COBI 2014 - An Empirical Evaluation of Capability Modelling using Design Rati...COBI 2014 - An Empirical Evaluation of Capability Modelling using Design Rati...
COBI 2014 - An Empirical Evaluation of Capability Modelling using Design Rati...
 
COBI 2014 - Designing a Meta Model as the Foundation for Compliance Capability
COBI 2014 - Designing a Meta Model as the Foundation for Compliance CapabilityCOBI 2014 - Designing a Meta Model as the Foundation for Compliance Capability
COBI 2014 - Designing a Meta Model as the Foundation for Compliance Capability
 
Applying Quality Function Deployment method for business architecture alignment
Applying Quality Function Deployment method for business architecture alignmentApplying Quality Function Deployment method for business architecture alignment
Applying Quality Function Deployment method for business architecture alignment
 
Practical meta-model extension for modeling language profiles An enterprise ar...
Practical meta-model extension for modeling language profiles An enterprise ar...Practical meta-model extension for modeling language profiles An enterprise ar...
Practical meta-model extension for modeling language profiles An enterprise ar...
 
Semantic Web Services Meta-model
Semantic Web Services Meta-modelSemantic Web Services Meta-model
Semantic Web Services Meta-model
 
Web Service Capability Meta Model
Web Service Capability Meta ModelWeb Service Capability Meta Model
Web Service Capability Meta Model
 
Pbmr Ea Meta Model Poster V01.03
Pbmr Ea Meta Model Poster V01.03Pbmr Ea Meta Model Poster V01.03
Pbmr Ea Meta Model Poster V01.03
 
Modeling Business Strategy: A meta-model of Strategy Maps and Balance Scorecards
Modeling Business Strategy: A meta-model of Strategy Maps and Balance ScorecardsModeling Business Strategy: A meta-model of Strategy Maps and Balance Scorecards
Modeling Business Strategy: A meta-model of Strategy Maps and Balance Scorecards
 
A common meta model for data analysis based on DSM
A common meta model for data analysis based on DSMA common meta model for data analysis based on DSM
A common meta model for data analysis based on DSM
 
Archimate Meta Model
Archimate   Meta ModelArchimate   Meta Model
Archimate Meta Model
 
Introducing the Enterprise Transformation Meta Model
Introducing the Enterprise Transformation Meta ModelIntroducing the Enterprise Transformation Meta Model
Introducing the Enterprise Transformation Meta Model
 
The Cha-Q Meta-Model: A Comprehensive, Change-Centric Software Representation
The Cha-Q Meta-Model: A Comprehensive, Change-Centric Software RepresentationThe Cha-Q Meta-Model: A Comprehensive, Change-Centric Software Representation
The Cha-Q Meta-Model: A Comprehensive, Change-Centric Software Representation
 
An intro to building an architecture repository meta model and modeling frame...
An intro to building an architecture repository meta model and modeling frame...An intro to building an architecture repository meta model and modeling frame...
An intro to building an architecture repository meta model and modeling frame...
 
Introduction to the NLP Meta Model - NLP Business Coaching Series
Introduction to the NLP Meta Model - NLP Business Coaching SeriesIntroduction to the NLP Meta Model - NLP Business Coaching Series
Introduction to the NLP Meta Model - NLP Business Coaching Series
 

Similar to Ui components development

Moore Advanced Calculations in Calc Manager OW 20151015
Moore Advanced Calculations in Calc Manager  OW 20151015Moore Advanced Calculations in Calc Manager  OW 20151015
Moore Advanced Calculations in Calc Manager OW 20151015Ron Moore
 
Yahoo Mobile Widgets
Yahoo Mobile WidgetsYahoo Mobile Widgets
Yahoo Mobile WidgetsJose Palazon
 
How Concur Technologies (a SAP company) Leverages Visual Testing for Localiza...
How Concur Technologies (a SAP company) Leverages Visual Testing for Localiza...How Concur Technologies (a SAP company) Leverages Visual Testing for Localiza...
How Concur Technologies (a SAP company) Leverages Visual Testing for Localiza...Applitools
 
F12 debugging in Ms edge
F12 debugging in Ms edgeF12 debugging in Ms edge
F12 debugging in Ms edgeAbhishek Sur
 
English_Resume_KexiongSong
English_Resume_KexiongSongEnglish_Resume_KexiongSong
English_Resume_KexiongSongKexiong Song
 
WebSphere Portlet Factory: Davalen’s Practical Advice from the Field
WebSphere Portlet Factory: Davalen’s Practical Advice from the Field WebSphere Portlet Factory: Davalen’s Practical Advice from the Field
WebSphere Portlet Factory: Davalen’s Practical Advice from the Field Davalen LLC
 
Getting Started with Iron Speed Designer
Getting Started with Iron Speed DesignerGetting Started with Iron Speed Designer
Getting Started with Iron Speed DesignerIron Speed
 
Get a Little Help with Your Help Desk Application
Get a Little Help with Your Help Desk ApplicationGet a Little Help with Your Help Desk Application
Get a Little Help with Your Help Desk ApplicationIron Speed
 
JavaScript and DOM Pattern Implementation
JavaScript and DOM Pattern ImplementationJavaScript and DOM Pattern Implementation
JavaScript and DOM Pattern Implementationdavejohnson
 
Reduxing UI: Borrowing the Best of Web to Make Android Better
Reduxing UI: Borrowing the Best of Web to Make Android BetterReduxing UI: Borrowing the Best of Web to Make Android Better
Reduxing UI: Borrowing the Best of Web to Make Android BetterChristina Lee
 
Practical Dynamic Actions - Intro
Practical Dynamic Actions - IntroPractical Dynamic Actions - Intro
Practical Dynamic Actions - IntroJorge Rimblas
 
Tulsa TechFest 2015 Awesomely Simple SharePoint Solutions
Tulsa TechFest 2015 Awesomely Simple SharePoint SolutionsTulsa TechFest 2015 Awesomely Simple SharePoint Solutions
Tulsa TechFest 2015 Awesomely Simple SharePoint SolutionsApril Dunnam
 
JSF (ADF) Case Studies Presentation
JSF (ADF) Case Studies PresentationJSF (ADF) Case Studies Presentation
JSF (ADF) Case Studies PresentationMichael Fons
 
Advisor Jumpstart: JavaScript
Advisor Jumpstart: JavaScriptAdvisor Jumpstart: JavaScript
Advisor Jumpstart: JavaScriptdominion
 
MVC and IBM XPages - from #DanNotes in Korsør (DK) 28 November 2013
MVC and IBM XPages - from #DanNotes in Korsør (DK) 28 November 2013MVC and IBM XPages - from #DanNotes in Korsør (DK) 28 November 2013
MVC and IBM XPages - from #DanNotes in Korsør (DK) 28 November 2013John Dalsgaard
 
RailsConf 2010: From 1 to 30 - How to refactor one monolithic application int...
RailsConf 2010: From 1 to 30 - How to refactor one monolithic application int...RailsConf 2010: From 1 to 30 - How to refactor one monolithic application int...
RailsConf 2010: From 1 to 30 - How to refactor one monolithic application int...jpalley
 

Similar to Ui components development (20)

CRUD with Dojo
CRUD with DojoCRUD with Dojo
CRUD with Dojo
 
Moore Advanced Calculations in Calc Manager OW 20151015
Moore Advanced Calculations in Calc Manager  OW 20151015Moore Advanced Calculations in Calc Manager  OW 20151015
Moore Advanced Calculations in Calc Manager OW 20151015
 
BluePrint Mobile Framework
BluePrint Mobile FrameworkBluePrint Mobile Framework
BluePrint Mobile Framework
 
Yahoo Mobile Widgets
Yahoo Mobile WidgetsYahoo Mobile Widgets
Yahoo Mobile Widgets
 
How Concur Technologies (a SAP company) Leverages Visual Testing for Localiza...
How Concur Technologies (a SAP company) Leverages Visual Testing for Localiza...How Concur Technologies (a SAP company) Leverages Visual Testing for Localiza...
How Concur Technologies (a SAP company) Leverages Visual Testing for Localiza...
 
F12 debugging in Ms edge
F12 debugging in Ms edgeF12 debugging in Ms edge
F12 debugging in Ms edge
 
SAP Smart forms
SAP Smart formsSAP Smart forms
SAP Smart forms
 
English_Resume_KexiongSong
English_Resume_KexiongSongEnglish_Resume_KexiongSong
English_Resume_KexiongSong
 
WebSphere Portlet Factory: Davalen’s Practical Advice from the Field
WebSphere Portlet Factory: Davalen’s Practical Advice from the Field WebSphere Portlet Factory: Davalen’s Practical Advice from the Field
WebSphere Portlet Factory: Davalen’s Practical Advice from the Field
 
Nilesh umaretiya CV 2016
Nilesh umaretiya CV 2016Nilesh umaretiya CV 2016
Nilesh umaretiya CV 2016
 
Getting Started with Iron Speed Designer
Getting Started with Iron Speed DesignerGetting Started with Iron Speed Designer
Getting Started with Iron Speed Designer
 
Get a Little Help with Your Help Desk Application
Get a Little Help with Your Help Desk ApplicationGet a Little Help with Your Help Desk Application
Get a Little Help with Your Help Desk Application
 
JavaScript and DOM Pattern Implementation
JavaScript and DOM Pattern ImplementationJavaScript and DOM Pattern Implementation
JavaScript and DOM Pattern Implementation
 
Reduxing UI: Borrowing the Best of Web to Make Android Better
Reduxing UI: Borrowing the Best of Web to Make Android BetterReduxing UI: Borrowing the Best of Web to Make Android Better
Reduxing UI: Borrowing the Best of Web to Make Android Better
 
Practical Dynamic Actions - Intro
Practical Dynamic Actions - IntroPractical Dynamic Actions - Intro
Practical Dynamic Actions - Intro
 
Tulsa TechFest 2015 Awesomely Simple SharePoint Solutions
Tulsa TechFest 2015 Awesomely Simple SharePoint SolutionsTulsa TechFest 2015 Awesomely Simple SharePoint Solutions
Tulsa TechFest 2015 Awesomely Simple SharePoint Solutions
 
JSF (ADF) Case Studies Presentation
JSF (ADF) Case Studies PresentationJSF (ADF) Case Studies Presentation
JSF (ADF) Case Studies Presentation
 
Advisor Jumpstart: JavaScript
Advisor Jumpstart: JavaScriptAdvisor Jumpstart: JavaScript
Advisor Jumpstart: JavaScript
 
MVC and IBM XPages - from #DanNotes in Korsør (DK) 28 November 2013
MVC and IBM XPages - from #DanNotes in Korsør (DK) 28 November 2013MVC and IBM XPages - from #DanNotes in Korsør (DK) 28 November 2013
MVC and IBM XPages - from #DanNotes in Korsør (DK) 28 November 2013
 
RailsConf 2010: From 1 to 30 - How to refactor one monolithic application int...
RailsConf 2010: From 1 to 30 - How to refactor one monolithic application int...RailsConf 2010: From 1 to 30 - How to refactor one monolithic application int...
RailsConf 2010: From 1 to 30 - How to refactor one monolithic application int...
 

Recently uploaded

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
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
 
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
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 

Recently uploaded (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
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
 
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
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 

Ui components development

  • 2. Create life cycle S Initiate S Render S Loading Meta S Loading Template S Loading Data S Actual Render S Create sub views/components S Bind Internal events S Bind External events
  • 3. Remove life cycle S Stop any running animations S Unbind/stop listening external Events S Unbind/stop listening internal Events S Unbind loading complete/failure handlers (meta, template ,data) S Abort any loading calls S Clear timeouts, intervals, debounced/deferred executions S Remove trails (popups) S Remove Sub views / child components S Remove element from DOM
  • 4. Dependencies S Meta (country list, options list) S Template S Data (user selection) S Other components
  • 5. Create States S Initiated S Waiting for other components to render S Loading (meta, template, data) S Rendered S Custom States (edit, summary etc)
  • 6. Error States S Network/Time out (meta, template, data) S No Records S Invalid Input / Other service errors S Wrong Selection
  • 7. Selection States S No Selection S Default Selection S All Selection S Some Selection
  • 8. View Model DOM sync User Interaction updateModel Change Change updateDOM Update Elements
  • 9. Plan for S Meta Refresh S External Model manipulation S Deep-linking widget state S Widget defaults
  • 10. Dos S JSHINT code from day one, it saves a lot of errors and debugging S Use deferred for any async operation (loading, rendering) S Handle success and failure case for each deferred S Defer creating DOM elements more than 20 S Debounce function calls if needed S Keep functions short, this increases re-usability
  • 11. Dos ctnd.. S Cleanup all event handlers, setTimeouts and deferreds, they are the main source of memory leaks S Go defensive, start with error case then code for success case S Provide user feedback about all waiting/loading to user, it makes your app look snappy. S Validate every user input, every input should have upper limit S Sanitize user input if needed before posting it to server
  • 12. Donts S Don’t do DOM query for reading Widget state – should always be read from model S Don’t change elements outside given view, using $.closest, $.parent $(‘selector’) is possible use cases S Don’t update DOM without updating model, they are easy, but creates problems in future S Don’t use $.html(value) unless you know what you are doing, prefer rendering model values through template engine (handlebars etc) S Don’t write JavaScript files bigger than 200 lines, smaller the better.