SlideShare a Scribd company logo
NativeScript Best Coding Practices
A free and open source framework for building
truly native mobile apps with JavaScript. Use
web skills, like TypeScript, Angular, Vue and
CSS, and get native UI and performance on iOS
and Android.
NativeScript is…
5 Reasons to use NativeScript
• 1) Rich, animated native UI
• 2) Maximum code and skill reusability
• 3) Ease of doing native-y things
• 4) Vibrant and growing community
• 5) Supported by a major software company
Maximum
code and skill
reusability 🌮
2
or or
Architecture Choices 🔧
NativeScript modules for UIs
Reuse existing native Android and iOS libraries
NativeScript community forum
(forum.nativescript.org)
NativeScript community Slack channel
How we can improve the performance of the NS Apps
Architecting your application
correctly can have a
significant impact on
navigation time, on-page
render performance and
application maintenance
Web Mentality in Native Applications Does Not Work
Code For a Showing a simple dropdown with date and Alphabet
<StackLayout borderColor="#D6D6E4" borderWidth="1"
borderRadius="5" backgroundColor="white">
<StackLayout orientation="horizontal">
<Label class="accent" text="Date"></Label>
<!-- Custom Icon Directive -->
<Label horizontalAlignment="right" icon=“sort"></Label>
</StackLayout>
<StackLayout orientation="horizontal"
<Label text="Alphabetical"></Label>
</StackLayout>
</StackLayout>
When this code renders natively you create 3 view containers.Assume you
follow this mentality for the navigation, the card design, the search bar and every
other micro component in your application…. You start to end up with huge
rendering burden for your native application.
NativeScript is Single Threaded
• All the UI and interactions are ran on the main UI thread
• This means you are taxing your application for each container it has to render. The
number of containers also affect the performance of the underlying native frameworks
and their rendering and layout times
NativeScript does allow you to use background workers, but these are not meant for UI
and are instead used for services such as http calls, large data manipulations, etc.
Before Optimizations
<GridLayout>
<StackLayout>
<dropdown></dropdown>
</StackLayout>
</GridLayout>
After Optimizations
<GridLayout>
<StackLayout borderWidth=”1” borderColor=”#D6D6E4”
dropdown></StackLayout>
</GridLayout>
UI OPTIMIZATION TECHNIQUES
1. Avoid nested layouts
2. Use the least possible UI elements to build a
component
3. Avoid inline styles as much as possible
4. Try to reuse the most of NativeScript Theme
5. Use only lowercase and dashes for selectors
6. Prefer HEX over RGB color codes
7. Define global / local SCSS variables as
needed
Angular Optimisation Techniques
• Webpack, AOT and Uglify
Application will bootstrap faster - eliminating a lot of the “white screen” effects you may be
experiencing and the size of the application will be reduced.
• Lazy Loaded Modules
By breaking up your modules, they will be built into separate “chunks”. This means your
application will only request that chunk when it actually needs it. This avoids a lot of overhead
with fetching more information than your application needs per view.
• Wrapping Complex Views
By delaying the rendering of complex views, it allows your navigation event to complete soon
on the main thread, giving your user the illusion that the app isn’t lagging
• Reduce View Complexity
Some designs just do not make sense for a native application, especially a NativeScript application.
NativeScript is prestigious for its ability to access native APIs - not rendering complex UI
• Use Local Database
Using database like couch db or sqlite for storing data instead of saving it in cache for large applications
Thanks!
Suralal.S
Sr. Software Developer, Neoito

More Related Content

What's hot

Delivering Rich Content Applications at Scale with Nuxeo & MongoDB Atlas
Delivering Rich Content Applications at Scale with Nuxeo & MongoDB AtlasDelivering Rich Content Applications at Scale with Nuxeo & MongoDB Atlas
Delivering Rich Content Applications at Scale with Nuxeo & MongoDB Atlas
Nuxeo
 
Web App Security
Web App SecurityWeb App Security
Web App Security
Shahed Chowdhuri
 
Modern web technologies
Modern web technologiesModern web technologies
Modern web technologies
Oday Alqarra
 
Goldark Presentation at Qualcomm QPrize 2014
Goldark Presentation at Qualcomm QPrize 2014Goldark Presentation at Qualcomm QPrize 2014
Goldark Presentation at Qualcomm QPrize 2014
Leonardo Rossetti
 
Prototyping Mobile Apps with NativeScript and Angular
Prototyping Mobile Apps with NativeScript and AngularPrototyping Mobile Apps with NativeScript and Angular
Prototyping Mobile Apps with NativeScript and Angular
Mike Branstein
 
How to Win #BestMicrosoftHack with Azure
How to Win #BestMicrosoftHack with AzureHow to Win #BestMicrosoftHack with Azure
How to Win #BestMicrosoftHack with Azure
Shahed Chowdhuri
 
Connecting Your In-Premise Database To Mobile Apps
Connecting Your In-Premise Database To Mobile AppsConnecting Your In-Premise Database To Mobile Apps
Connecting Your In-Premise Database To Mobile Apps
Lohith Goudagere Nagaraj
 
Windows Azure Overview
Windows Azure OverviewWindows Azure Overview
Windows Azure Overview
akgiraud
 
Typescript 102 angular and type script
Typescript 102   angular and type scriptTypescript 102   angular and type script
Typescript 102 angular and type script
Bob German
 
Basics of Backbone.js
Basics of Backbone.jsBasics of Backbone.js
Basics of Backbone.js
Avishekh Bharati
 
Office 365 Intranet
Office 365 IntranetOffice 365 Intranet
Office 365 Intranet
Alan Eardley
 
Few Tips for asp.net developers 2014 and beyond
Few Tips for asp.net developers 2014 and beyondFew Tips for asp.net developers 2014 and beyond
Few Tips for asp.net developers 2014 and beyond
Sreejesh Madonandy
 
Cross platform app dev with xamarin forms
Cross platform app dev with xamarin formsCross platform app dev with xamarin forms
Cross platform app dev with xamarin forms
Shahriar Hossain
 
Capture the Cloud with Azure
Capture the Cloud with AzureCapture the Cloud with Azure
Capture the Cloud with Azure
Shahed Chowdhuri
 
Intro to modern web technology
Intro to modern web technologyIntro to modern web technology
Intro to modern web technologyChris Love
 
Welcome to the microsoft madness
Welcome to the microsoft madnessWelcome to the microsoft madness
Welcome to the microsoft madness
명신 김
 
Build HTML5 Sites/Apps with Kendo UI Core
Build HTML5 Sites/Apps with Kendo UI CoreBuild HTML5 Sites/Apps with Kendo UI Core
Build HTML5 Sites/Apps with Kendo UI Core
Lohith Goudagere Nagaraj
 
NativeScript + Push Notifications
NativeScript + Push NotificationsNativeScript + Push Notifications
NativeScript + Push Notifications
Lohith Goudagere Nagaraj
 
WebVR with Babylon.JS
WebVR with Babylon.JSWebVR with Babylon.JS
WebVR with Babylon.JS
Timmy Kokke
 
«The Grail: React based Isomorph apps framework»​
«The Grail: React based Isomorph apps framework»​«The Grail: React based Isomorph apps framework»​
«The Grail: React based Isomorph apps framework»​
FDConf
 

What's hot (20)

Delivering Rich Content Applications at Scale with Nuxeo & MongoDB Atlas
Delivering Rich Content Applications at Scale with Nuxeo & MongoDB AtlasDelivering Rich Content Applications at Scale with Nuxeo & MongoDB Atlas
Delivering Rich Content Applications at Scale with Nuxeo & MongoDB Atlas
 
Web App Security
Web App SecurityWeb App Security
Web App Security
 
Modern web technologies
Modern web technologiesModern web technologies
Modern web technologies
 
Goldark Presentation at Qualcomm QPrize 2014
Goldark Presentation at Qualcomm QPrize 2014Goldark Presentation at Qualcomm QPrize 2014
Goldark Presentation at Qualcomm QPrize 2014
 
Prototyping Mobile Apps with NativeScript and Angular
Prototyping Mobile Apps with NativeScript and AngularPrototyping Mobile Apps with NativeScript and Angular
Prototyping Mobile Apps with NativeScript and Angular
 
How to Win #BestMicrosoftHack with Azure
How to Win #BestMicrosoftHack with AzureHow to Win #BestMicrosoftHack with Azure
How to Win #BestMicrosoftHack with Azure
 
Connecting Your In-Premise Database To Mobile Apps
Connecting Your In-Premise Database To Mobile AppsConnecting Your In-Premise Database To Mobile Apps
Connecting Your In-Premise Database To Mobile Apps
 
Windows Azure Overview
Windows Azure OverviewWindows Azure Overview
Windows Azure Overview
 
Typescript 102 angular and type script
Typescript 102   angular and type scriptTypescript 102   angular and type script
Typescript 102 angular and type script
 
Basics of Backbone.js
Basics of Backbone.jsBasics of Backbone.js
Basics of Backbone.js
 
Office 365 Intranet
Office 365 IntranetOffice 365 Intranet
Office 365 Intranet
 
Few Tips for asp.net developers 2014 and beyond
Few Tips for asp.net developers 2014 and beyondFew Tips for asp.net developers 2014 and beyond
Few Tips for asp.net developers 2014 and beyond
 
Cross platform app dev with xamarin forms
Cross platform app dev with xamarin formsCross platform app dev with xamarin forms
Cross platform app dev with xamarin forms
 
Capture the Cloud with Azure
Capture the Cloud with AzureCapture the Cloud with Azure
Capture the Cloud with Azure
 
Intro to modern web technology
Intro to modern web technologyIntro to modern web technology
Intro to modern web technology
 
Welcome to the microsoft madness
Welcome to the microsoft madnessWelcome to the microsoft madness
Welcome to the microsoft madness
 
Build HTML5 Sites/Apps with Kendo UI Core
Build HTML5 Sites/Apps with Kendo UI CoreBuild HTML5 Sites/Apps with Kendo UI Core
Build HTML5 Sites/Apps with Kendo UI Core
 
NativeScript + Push Notifications
NativeScript + Push NotificationsNativeScript + Push Notifications
NativeScript + Push Notifications
 
WebVR with Babylon.JS
WebVR with Babylon.JSWebVR with Babylon.JS
WebVR with Babylon.JS
 
«The Grail: React based Isomorph apps framework»​
«The Grail: React based Isomorph apps framework»​«The Grail: React based Isomorph apps framework»​
«The Grail: React based Isomorph apps framework»​
 

Similar to Neoito — NativeScript Best Coding Practices

Meetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech PeopleMeetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech People
IT Arena
 
LATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptx
LATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptxLATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptx
LATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptx
chitrachauhan21
 
Great Responsive-ability Web Design
Great Responsive-ability Web DesignGreat Responsive-ability Web Design
Great Responsive-ability Web Design
Mike Wilcox
 
Service worker API
Service worker APIService worker API
Service worker API
Giorgio Natili
 
Mobile Best Practices
Mobile Best PracticesMobile Best Practices
Mobile Best Practices
mintersam
 
Training presentation.pptx
Training presentation.pptxTraining presentation.pptx
Training presentation.pptx
NishchaiyaBayla1
 
Coding the UI
Coding the UICoding the UI
Coding the UI
Mark Meeker
 
Responsive web design with various grids and frameworks comparison
Responsive web design with various grids and frameworks comparisonResponsive web design with various grids and frameworks comparison
Responsive web design with various grids and frameworks comparison
DhrubaJyoti Dey
 
Asp.NETZERO - A Workshop Presentation by Citytech Software
Asp.NETZERO - A Workshop Presentation by Citytech SoftwareAsp.NETZERO - A Workshop Presentation by Citytech Software
Asp.NETZERO - A Workshop Presentation by Citytech Software
Ritwik Das
 
Drupal performance and scalability
Drupal performance and scalabilityDrupal performance and scalability
Drupal performance and scalability
Twinbit
 
Mobile web development
Mobile web development Mobile web development
Mobile web development
Moumie Soulemane
 
Workshop About Software Engineering Skills 2019
Workshop About Software Engineering Skills 2019Workshop About Software Engineering Skills 2019
Workshop About Software Engineering Skills 2019
PhuocNT (Fresher.VN)
 
Lesson learned from 3 years with hybrid apps
Lesson learned from 3 years with hybrid appsLesson learned from 3 years with hybrid apps
Lesson learned from 3 years with hybrid apps
Patrik Malmquist
 
Real-world Dojo Mobile
Real-world Dojo MobileReal-world Dojo Mobile
Real-world Dojo MobileAndrew Ferrier
 
Bruce Lawson Opera Indonesia
Bruce Lawson Opera IndonesiaBruce Lawson Opera Indonesia
Bruce Lawson Opera Indonesia
brucelawson
 
The Mobile Development Landscape
The Mobile Development LandscapeThe Mobile Development Landscape
The Mobile Development Landscape
Ambert Ho
 
Creating a Comprehensive Social Media App Using Ionic and Phone Gap
Creating a Comprehensive Social Media App Using Ionic and Phone GapCreating a Comprehensive Social Media App Using Ionic and Phone Gap
Creating a Comprehensive Social Media App Using Ionic and Phone Gap
FITC
 

Similar to Neoito — NativeScript Best Coding Practices (20)

Meetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech PeopleMeetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech People
 
LATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptx
LATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptxLATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptx
LATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptx
 
Great Responsive-ability Web Design
Great Responsive-ability Web DesignGreat Responsive-ability Web Design
Great Responsive-ability Web Design
 
Service worker API
Service worker APIService worker API
Service worker API
 
Mobile Best Practices
Mobile Best PracticesMobile Best Practices
Mobile Best Practices
 
Training presentation.pptx
Training presentation.pptxTraining presentation.pptx
Training presentation.pptx
 
Coding the UI
Coding the UICoding the UI
Coding the UI
 
Coding Ui
Coding UiCoding Ui
Coding Ui
 
Responsive web design with various grids and frameworks comparison
Responsive web design with various grids and frameworks comparisonResponsive web design with various grids and frameworks comparison
Responsive web design with various grids and frameworks comparison
 
Asp.NETZERO - A Workshop Presentation by Citytech Software
Asp.NETZERO - A Workshop Presentation by Citytech SoftwareAsp.NETZERO - A Workshop Presentation by Citytech Software
Asp.NETZERO - A Workshop Presentation by Citytech Software
 
Drupal performance and scalability
Drupal performance and scalabilityDrupal performance and scalability
Drupal performance and scalability
 
Sai Sharan_UI_Resume
Sai Sharan_UI_ResumeSai Sharan_UI_Resume
Sai Sharan_UI_Resume
 
Mobile web development
Mobile web development Mobile web development
Mobile web development
 
Workshop About Software Engineering Skills 2019
Workshop About Software Engineering Skills 2019Workshop About Software Engineering Skills 2019
Workshop About Software Engineering Skills 2019
 
Lesson learned from 3 years with hybrid apps
Lesson learned from 3 years with hybrid appsLesson learned from 3 years with hybrid apps
Lesson learned from 3 years with hybrid apps
 
KhajavaliShaik
KhajavaliShaikKhajavaliShaik
KhajavaliShaik
 
Real-world Dojo Mobile
Real-world Dojo MobileReal-world Dojo Mobile
Real-world Dojo Mobile
 
Bruce Lawson Opera Indonesia
Bruce Lawson Opera IndonesiaBruce Lawson Opera Indonesia
Bruce Lawson Opera Indonesia
 
The Mobile Development Landscape
The Mobile Development LandscapeThe Mobile Development Landscape
The Mobile Development Landscape
 
Creating a Comprehensive Social Media App Using Ionic and Phone Gap
Creating a Comprehensive Social Media App Using Ionic and Phone GapCreating a Comprehensive Social Media App Using Ionic and Phone Gap
Creating a Comprehensive Social Media App Using Ionic and Phone Gap
 

More from Neoito

Neoito — *NIX kungfu for web devs
Neoito — *NIX kungfu for web devsNeoito — *NIX kungfu for web devs
Neoito — *NIX kungfu for web devs
Neoito
 
Neoito — Secure coding practices
Neoito — Secure coding practicesNeoito — Secure coding practices
Neoito — Secure coding practices
Neoito
 
Neoito — How modern browsers work
Neoito — How modern browsers workNeoito — How modern browsers work
Neoito — How modern browsers work
Neoito
 
Neoito — React 101
Neoito — React 101Neoito — React 101
Neoito — React 101
Neoito
 
Neoito — Scaling node.js
Neoito — Scaling node.jsNeoito — Scaling node.js
Neoito — Scaling node.js
Neoito
 
Neoito — Grid layout
Neoito — Grid layoutNeoito — Grid layout
Neoito — Grid layout
Neoito
 
Neoito — Software licensing
Neoito — Software licensingNeoito — Software licensing
Neoito — Software licensing
Neoito
 
Neoito — GitLab for project management
Neoito — GitLab for project managementNeoito — GitLab for project management
Neoito — GitLab for project management
Neoito
 
Neoito — Routing and navigation in Angular
Neoito — Routing and navigation in AngularNeoito — Routing and navigation in Angular
Neoito — Routing and navigation in Angular
Neoito
 
Neoito — Animations in Angular 5
Neoito — Animations in Angular 5Neoito — Animations in Angular 5
Neoito — Animations in Angular 5
Neoito
 
Neoito — A roadmap to Angular
Neoito — A roadmap to AngularNeoito — A roadmap to Angular
Neoito — A roadmap to Angular
Neoito
 
Neoito — Intro to WebSockets
Neoito — Intro to WebSocketsNeoito — Intro to WebSockets
Neoito — Intro to WebSockets
Neoito
 
Neoito — Typography for the web
Neoito — Typography for the webNeoito — Typography for the web
Neoito — Typography for the web
Neoito
 
Neoito — Design patterns and depenedency injection
Neoito — Design patterns and depenedency injectionNeoito — Design patterns and depenedency injection
Neoito — Design patterns and depenedency injection
Neoito
 

More from Neoito (14)

Neoito — *NIX kungfu for web devs
Neoito — *NIX kungfu for web devsNeoito — *NIX kungfu for web devs
Neoito — *NIX kungfu for web devs
 
Neoito — Secure coding practices
Neoito — Secure coding practicesNeoito — Secure coding practices
Neoito — Secure coding practices
 
Neoito — How modern browsers work
Neoito — How modern browsers workNeoito — How modern browsers work
Neoito — How modern browsers work
 
Neoito — React 101
Neoito — React 101Neoito — React 101
Neoito — React 101
 
Neoito — Scaling node.js
Neoito — Scaling node.jsNeoito — Scaling node.js
Neoito — Scaling node.js
 
Neoito — Grid layout
Neoito — Grid layoutNeoito — Grid layout
Neoito — Grid layout
 
Neoito — Software licensing
Neoito — Software licensingNeoito — Software licensing
Neoito — Software licensing
 
Neoito — GitLab for project management
Neoito — GitLab for project managementNeoito — GitLab for project management
Neoito — GitLab for project management
 
Neoito — Routing and navigation in Angular
Neoito — Routing and navigation in AngularNeoito — Routing and navigation in Angular
Neoito — Routing and navigation in Angular
 
Neoito — Animations in Angular 5
Neoito — Animations in Angular 5Neoito — Animations in Angular 5
Neoito — Animations in Angular 5
 
Neoito — A roadmap to Angular
Neoito — A roadmap to AngularNeoito — A roadmap to Angular
Neoito — A roadmap to Angular
 
Neoito — Intro to WebSockets
Neoito — Intro to WebSocketsNeoito — Intro to WebSockets
Neoito — Intro to WebSockets
 
Neoito — Typography for the web
Neoito — Typography for the webNeoito — Typography for the web
Neoito — Typography for the web
 
Neoito — Design patterns and depenedency injection
Neoito — Design patterns and depenedency injectionNeoito — Design patterns and depenedency injection
Neoito — Design patterns and depenedency injection
 

Recently uploaded

Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
Srikant77
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Jay Das
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
WSO2
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 

Recently uploaded (20)

Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 

Neoito — NativeScript Best Coding Practices

  • 2. A free and open source framework for building truly native mobile apps with JavaScript. Use web skills, like TypeScript, Angular, Vue and CSS, and get native UI and performance on iOS and Android. NativeScript is…
  • 3. 5 Reasons to use NativeScript • 1) Rich, animated native UI • 2) Maximum code and skill reusability • 3) Ease of doing native-y things • 4) Vibrant and growing community • 5) Supported by a major software company
  • 7. Reuse existing native Android and iOS libraries
  • 10. How we can improve the performance of the NS Apps
  • 11. Architecting your application correctly can have a significant impact on navigation time, on-page render performance and application maintenance
  • 12. Web Mentality in Native Applications Does Not Work Code For a Showing a simple dropdown with date and Alphabet <StackLayout borderColor="#D6D6E4" borderWidth="1" borderRadius="5" backgroundColor="white"> <StackLayout orientation="horizontal"> <Label class="accent" text="Date"></Label> <!-- Custom Icon Directive --> <Label horizontalAlignment="right" icon=“sort"></Label> </StackLayout> <StackLayout orientation="horizontal" <Label text="Alphabetical"></Label> </StackLayout> </StackLayout> When this code renders natively you create 3 view containers.Assume you follow this mentality for the navigation, the card design, the search bar and every other micro component in your application…. You start to end up with huge rendering burden for your native application.
  • 13. NativeScript is Single Threaded • All the UI and interactions are ran on the main UI thread • This means you are taxing your application for each container it has to render. The number of containers also affect the performance of the underlying native frameworks and their rendering and layout times NativeScript does allow you to use background workers, but these are not meant for UI and are instead used for services such as http calls, large data manipulations, etc.
  • 15. UI OPTIMIZATION TECHNIQUES 1. Avoid nested layouts 2. Use the least possible UI elements to build a component 3. Avoid inline styles as much as possible 4. Try to reuse the most of NativeScript Theme 5. Use only lowercase and dashes for selectors 6. Prefer HEX over RGB color codes 7. Define global / local SCSS variables as needed
  • 16. Angular Optimisation Techniques • Webpack, AOT and Uglify Application will bootstrap faster - eliminating a lot of the “white screen” effects you may be experiencing and the size of the application will be reduced. • Lazy Loaded Modules By breaking up your modules, they will be built into separate “chunks”. This means your application will only request that chunk when it actually needs it. This avoids a lot of overhead with fetching more information than your application needs per view. • Wrapping Complex Views By delaying the rendering of complex views, it allows your navigation event to complete soon on the main thread, giving your user the illusion that the app isn’t lagging
  • 17. • Reduce View Complexity Some designs just do not make sense for a native application, especially a NativeScript application. NativeScript is prestigious for its ability to access native APIs - not rendering complex UI • Use Local Database Using database like couch db or sqlite for storing data instead of saving it in cache for large applications