SlideShare a Scribd company logo
Javascript
DEVELOPER’S LIFE
Who am I?


•   Ramkumar Murugadoss
•   @rampicos
•   facebook.com/raamkumar.m
•   Code
What is JavaScript


• Javascript is the Programming language, first emerged to
  make dynamic scripts for Web pages
• What do you think about Javascript?
Why Javascript




• What we use for: Programming Language for Web Pages
• How it was in current: Programming Language for Server-side too
• In near future: It is most wanted huge Programming Language for all
Best Practices


• All we know Javascript
• Everyone can code in Javascript
• All we want to know, how efficiently we will write JS
About GC


• GC is automatic
• Objects are collected there is no references longer
• Javascript Uses Mark and Sweep GC method
Avoid the global scope


• In the Global scope the Object never null, so never garbage
  collected
• It’s time taking and trivial process to get the reference of
  global scope
• If need to use global scope assign yourself null after the use
Use var


• Don’t forget to use var for all your variables
• The Variables without var may considered to global
• You are making javascript to struggle for finding the scope of
  your variable
Get Use of Self-Calling Functions


• Have any one noticied jQuery using self calling functions
What will be the result?
Make your loops more efficient
Conditional Branching
Creating Arrays and Objects


• Use [] instead of Array
   • Use arrayVariable[length] = value instead of
     arrayVariable.push(value)
• Use {} instead of Object
Closures


• A closure is a special kind of object that combines two
  things: a function, and the environment in which that function
  was created
• The environment consists of any local variables that were in-
  scope at the time that the closure was created
Closures Cond…
Closures Cond…
Namespaces


 • this prevent the global scope pollution
 • this protect your code from colliding with other code or libraries
Building String in Loops
Small Intro to OOPs




• Everything in Javascript is Object based, (note there is no keyword called class in
  JS)
• Now the question is then how can I create the Objects and its functions?
OOPs cond


• Creating functions in JS is considered to the Object, using prototypes you can
  define methods for that
Any Guess




• What is the difference between this two codes
Don’t D.R.Y




• Make the reusability
• Make use of Namespace
Javascript Best Practices and Intro to Titanium
Cross Platform Mobile Applications



• What are Cross Platform Mobile Applications ?

•   Why build Cross Platform ?

•   What are the most popular development framework available ?

•   Which framework should I use?
Why Titanium


• Code Once Build Everywhere
• Native look and feel
• Has more than 5,500+ device level APIs for iOS and Android
• Object based Javascript only
• In build Analytics
• In build Cloud integration support (ACS)
• Much more
What to do to start with Titanium today?



Signup and download http://my.appcelerator.com




Follow the “Quick Start” https://wiki.appcelerator.org/display/guides/home




You’re ready to be a Titanium      developer!
CommonJS



• The Biggest feature introduced from Node.js for reusability is CommonJS
• Make your functions as unique namespaced modules and get to use of that
• We have exports.yourfunction and module.exports as 2 ways to create
  CommonJS modules
• Woow now browsers support CommonJS with some libraries
exports.your function
module.exports
Javascript Best Practices and Intro to Titanium

More Related Content

What's hot (20)

PDF
Metaprogramming JavaScript
danwrong
 
PDF
The Gist of React Native
Darren Cruse
 
PDF
Javascript
Vibhor Grover
 
PDF
Survive JavaScript - Strategies and Tricks
Juho Vepsäläinen
 
PPTX
JavaScript : A trending scripting language
AbhayDhupar
 
PDF
An Intro to Angular 2
Ron Heft
 
PDF
Developing Modern Java Web Applications with Java EE 7 and AngularJS
Shekhar Gulati
 
PDF
JavaScript Good Practices
Jussi Pohjolainen
 
PDF
Integrating React.js Into a PHP Application
Andrew Rota
 
PDF
The Road to Native Web Components
Mike North
 
PPTX
Single Page Applications with AngularJS 2.0
Sumanth Chinthagunta
 
PDF
Type script for_java_dev_jul_2020
Yakov Fain
 
PDF
Dart for Java Developers
Yakov Fain
 
PDF
A tour of React Native
Tadeu Zagallo
 
PDF
Aligning Ember.js with Web Standards
Matthew Beale
 
PDF
AngularJS Introduction
Carlos Morales
 
PDF
AngularJS Basics
Ravi Mone
 
PDF
OSGi and Spring Data for simple (Web) Application Development
Christian Baranowski
 
ODP
Object Oriented Javascript
NexThoughts Technologies
 
ODP
Scal`a`ngular - Scala and Angular
Knoldus Inc.
 
Metaprogramming JavaScript
danwrong
 
The Gist of React Native
Darren Cruse
 
Javascript
Vibhor Grover
 
Survive JavaScript - Strategies and Tricks
Juho Vepsäläinen
 
JavaScript : A trending scripting language
AbhayDhupar
 
An Intro to Angular 2
Ron Heft
 
Developing Modern Java Web Applications with Java EE 7 and AngularJS
Shekhar Gulati
 
JavaScript Good Practices
Jussi Pohjolainen
 
Integrating React.js Into a PHP Application
Andrew Rota
 
The Road to Native Web Components
Mike North
 
Single Page Applications with AngularJS 2.0
Sumanth Chinthagunta
 
Type script for_java_dev_jul_2020
Yakov Fain
 
Dart for Java Developers
Yakov Fain
 
A tour of React Native
Tadeu Zagallo
 
Aligning Ember.js with Web Standards
Matthew Beale
 
AngularJS Introduction
Carlos Morales
 
AngularJS Basics
Ravi Mone
 
OSGi and Spring Data for simple (Web) Application Development
Christian Baranowski
 
Object Oriented Javascript
NexThoughts Technologies
 
Scal`a`ngular - Scala and Angular
Knoldus Inc.
 

Similar to Javascript Best Practices and Intro to Titanium (20)

PPT
JavaScript Misunderstood
Bhavya Siddappa
 
PPTX
Awesomeness of JavaScript…almost
Quinton Sheppard
 
PPTX
Building maintainable javascript applications
equisodie
 
PDF
Kevin Whinnery: Write Better JavaScript
Axway Appcelerator
 
PPTX
All of Javascript
Togakangaroo
 
PPT
Introduction to Javascript
Amit Tyagi
 
PPTX
Javascript fundamentals and not
Salvatore Fazio
 
PPTX
All of javascript
Togakangaroo
 
PPTX
Java scriptforjavadev part2a
Makarand Bhatambarekar
 
PPTX
JS Basics
John Fischer
 
PPTX
Javascripts. pptt
RaviShankarSinghal
 
PPTX
Cordova training : Day 4 - Advanced Javascript
Binu Paul
 
PDF
HTML5 for the Silverlight Guy
David Padbury
 
PDF
JavaScript Getting Started
Hazem Hagrass
 
PDF
High quality Front-End
David Simons
 
PDF
Basics of JavaScript
Bala Narayanan
 
PPTX
JS - Basics
John Fischer
 
PDF
Scalable JavaScript
Ynon Perek
 
PDF
Choosing Javascript Libraries to Adopt for Development
Edward Apostol
 
PDF
Javascript The Definitive Guideactivate Your Web Pages 6th Ed Flanagan
reknesluima
 
JavaScript Misunderstood
Bhavya Siddappa
 
Awesomeness of JavaScript…almost
Quinton Sheppard
 
Building maintainable javascript applications
equisodie
 
Kevin Whinnery: Write Better JavaScript
Axway Appcelerator
 
All of Javascript
Togakangaroo
 
Introduction to Javascript
Amit Tyagi
 
Javascript fundamentals and not
Salvatore Fazio
 
All of javascript
Togakangaroo
 
Java scriptforjavadev part2a
Makarand Bhatambarekar
 
JS Basics
John Fischer
 
Javascripts. pptt
RaviShankarSinghal
 
Cordova training : Day 4 - Advanced Javascript
Binu Paul
 
HTML5 for the Silverlight Guy
David Padbury
 
JavaScript Getting Started
Hazem Hagrass
 
High quality Front-End
David Simons
 
Basics of JavaScript
Bala Narayanan
 
JS - Basics
John Fischer
 
Scalable JavaScript
Ynon Perek
 
Choosing Javascript Libraries to Adopt for Development
Edward Apostol
 
Javascript The Definitive Guideactivate Your Web Pages 6th Ed Flanagan
reknesluima
 
Ad

Recently uploaded (20)

PDF
Vani - The Voice of Excellence - Jul 2025 issue
Savipriya Raghavendra
 
PDF
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
PPTX
Introduction to Indian Writing in English
Trushali Dodiya
 
PDF
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
PPTX
How to Send Email From Odoo 18 Website - Odoo Slides
Celine George
 
PDF
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
PPTX
Difference between write and update in odoo 18
Celine George
 
PDF
Is Assignment Help Legal in Australia_.pdf
thomas19williams83
 
PDF
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 
PDF
Council of Chalcedon Re-Examined
Smiling Lungs
 
PPTX
infertility, types,causes, impact, and management
Ritu480198
 
PDF
Horarios de distribución de agua en julio
pegazohn1978
 
PPTX
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
PPTX
HUMAN RESOURCE MANAGEMENT: RECRUITMENT, SELECTION, PLACEMENT, DEPLOYMENT, TRA...
PRADEEP ABOTHU
 
PPTX
How to Create Odoo JS Dialog_Popup in Odoo 18
Celine George
 
PPTX
PPT-Q1-WK-3-ENGLISH Revised Matatag Grade 3.pptx
reijhongidayawan02
 
PPTX
Identifying elements in the story. Arrange the events in the story
geraldineamahido2
 
PDF
Aprendendo Arquitetura Framework Salesforce - Dia 03
Mauricio Alexandre Silva
 
PPTX
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
PDF
STATEMENT-BY-THE-HON.-MINISTER-FOR-HEALTH-ON-THE-COVID-19-OUTBREAK-AT-UG_revi...
nservice241
 
Vani - The Voice of Excellence - Jul 2025 issue
Savipriya Raghavendra
 
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
Introduction to Indian Writing in English
Trushali Dodiya
 
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
How to Send Email From Odoo 18 Website - Odoo Slides
Celine George
 
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
Difference between write and update in odoo 18
Celine George
 
Is Assignment Help Legal in Australia_.pdf
thomas19williams83
 
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 
Council of Chalcedon Re-Examined
Smiling Lungs
 
infertility, types,causes, impact, and management
Ritu480198
 
Horarios de distribución de agua en julio
pegazohn1978
 
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
HUMAN RESOURCE MANAGEMENT: RECRUITMENT, SELECTION, PLACEMENT, DEPLOYMENT, TRA...
PRADEEP ABOTHU
 
How to Create Odoo JS Dialog_Popup in Odoo 18
Celine George
 
PPT-Q1-WK-3-ENGLISH Revised Matatag Grade 3.pptx
reijhongidayawan02
 
Identifying elements in the story. Arrange the events in the story
geraldineamahido2
 
Aprendendo Arquitetura Framework Salesforce - Dia 03
Mauricio Alexandre Silva
 
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
STATEMENT-BY-THE-HON.-MINISTER-FOR-HEALTH-ON-THE-COVID-19-OUTBREAK-AT-UG_revi...
nservice241
 
Ad

Javascript Best Practices and Intro to Titanium

  • 2. Who am I? • Ramkumar Murugadoss • @rampicos • facebook.com/raamkumar.m • Code
  • 3. What is JavaScript • Javascript is the Programming language, first emerged to make dynamic scripts for Web pages • What do you think about Javascript?
  • 4. Why Javascript • What we use for: Programming Language for Web Pages • How it was in current: Programming Language for Server-side too • In near future: It is most wanted huge Programming Language for all
  • 5. Best Practices • All we know Javascript • Everyone can code in Javascript • All we want to know, how efficiently we will write JS
  • 6. About GC • GC is automatic • Objects are collected there is no references longer • Javascript Uses Mark and Sweep GC method
  • 7. Avoid the global scope • In the Global scope the Object never null, so never garbage collected • It’s time taking and trivial process to get the reference of global scope • If need to use global scope assign yourself null after the use
  • 8. Use var • Don’t forget to use var for all your variables • The Variables without var may considered to global • You are making javascript to struggle for finding the scope of your variable
  • 9. Get Use of Self-Calling Functions • Have any one noticied jQuery using self calling functions
  • 10. What will be the result?
  • 11. Make your loops more efficient
  • 13. Creating Arrays and Objects • Use [] instead of Array • Use arrayVariable[length] = value instead of arrayVariable.push(value) • Use {} instead of Object
  • 14. Closures • A closure is a special kind of object that combines two things: a function, and the environment in which that function was created • The environment consists of any local variables that were in- scope at the time that the closure was created
  • 17. Namespaces • this prevent the global scope pollution • this protect your code from colliding with other code or libraries
  • 19. Small Intro to OOPs • Everything in Javascript is Object based, (note there is no keyword called class in JS) • Now the question is then how can I create the Objects and its functions?
  • 20. OOPs cond • Creating functions in JS is considered to the Object, using prototypes you can define methods for that
  • 21. Any Guess • What is the difference between this two codes
  • 22. Don’t D.R.Y • Make the reusability • Make use of Namespace
  • 24. Cross Platform Mobile Applications • What are Cross Platform Mobile Applications ? • Why build Cross Platform ? • What are the most popular development framework available ? • Which framework should I use?
  • 25. Why Titanium • Code Once Build Everywhere • Native look and feel • Has more than 5,500+ device level APIs for iOS and Android • Object based Javascript only • In build Analytics • In build Cloud integration support (ACS) • Much more
  • 26. What to do to start with Titanium today? Signup and download http://my.appcelerator.com Follow the “Quick Start” https://wiki.appcelerator.org/display/guides/home You’re ready to be a Titanium developer!
  • 27. CommonJS • The Biggest feature introduced from Node.js for reusability is CommonJS • Make your functions as unique namespaced modules and get to use of that • We have exports.yourfunction and module.exports as 2 ways to create CommonJS modules • Woow now browsers support CommonJS with some libraries