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

Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
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
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
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
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
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
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
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...
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 

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.