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

PDF
Intro to node.js - Ran Mizrahi (28/8/14)
PDF
Seven Versions of One Web Application
PDF
Francesco Strazzullo - Frameworkless Frontend Development - Codemotion Milan ...
PPT
PDF
Intro to JavaScript
PDF
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
PPTX
JavaScript Core fundamentals - Learn JavaScript Here
PDF
Introduction to Javascript programming
Intro to node.js - Ran Mizrahi (28/8/14)
Seven Versions of One Web Application
Francesco Strazzullo - Frameworkless Frontend Development - Codemotion Milan ...
Intro to JavaScript
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
JavaScript Core fundamentals - Learn JavaScript Here
Introduction to Javascript programming

What's hot (20)

PDF
Metaprogramming JavaScript
PDF
The Gist of React Native
PDF
Javascript
PDF
Survive JavaScript - Strategies and Tricks
PPTX
JavaScript : A trending scripting language
PDF
An Intro to Angular 2
PDF
Developing Modern Java Web Applications with Java EE 7 and AngularJS
PDF
JavaScript Good Practices
PDF
Integrating React.js Into a PHP Application
PDF
The Road to Native Web Components
PPTX
Single Page Applications with AngularJS 2.0
PDF
Type script for_java_dev_jul_2020
PDF
Dart for Java Developers
PDF
A tour of React Native
PDF
Aligning Ember.js with Web Standards
PDF
AngularJS Introduction
PDF
AngularJS Basics
PDF
OSGi and Spring Data for simple (Web) Application Development
ODP
Object Oriented Javascript
ODP
Scal`a`ngular - Scala and Angular
Metaprogramming JavaScript
The Gist of React Native
Javascript
Survive JavaScript - Strategies and Tricks
JavaScript : A trending scripting language
An Intro to Angular 2
Developing Modern Java Web Applications with Java EE 7 and AngularJS
JavaScript Good Practices
Integrating React.js Into a PHP Application
The Road to Native Web Components
Single Page Applications with AngularJS 2.0
Type script for_java_dev_jul_2020
Dart for Java Developers
A tour of React Native
Aligning Ember.js with Web Standards
AngularJS Introduction
AngularJS Basics
OSGi and Spring Data for simple (Web) Application Development
Object Oriented Javascript
Scal`a`ngular - Scala and Angular
Ad

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

PPT
JavaScript Misunderstood
PPTX
Awesomeness of JavaScript…almost
PPTX
Building maintainable javascript applications
PDF
Kevin Whinnery: Write Better JavaScript
PPTX
All of Javascript
PPT
Introduction to Javascript
PPTX
Javascript fundamentals and not
PPTX
All of javascript
PPTX
Java scriptforjavadev part2a
PPTX
JS Basics
PPTX
Javascripts. pptt
PPTX
Cordova training : Day 4 - Advanced Javascript
PDF
HTML5 for the Silverlight Guy
PDF
JavaScript Getting Started
PDF
High quality Front-End
PDF
Basics of JavaScript
PPTX
JS - Basics
PDF
Scalable JavaScript
PDF
Choosing Javascript Libraries to Adopt for Development
PDF
Javascript The Definitive Guideactivate Your Web Pages 6th Ed Flanagan
JavaScript Misunderstood
Awesomeness of JavaScript…almost
Building maintainable javascript applications
Kevin Whinnery: Write Better JavaScript
All of Javascript
Introduction to Javascript
Javascript fundamentals and not
All of javascript
Java scriptforjavadev part2a
JS Basics
Javascripts. pptt
Cordova training : Day 4 - Advanced Javascript
HTML5 for the Silverlight Guy
JavaScript Getting Started
High quality Front-End
Basics of JavaScript
JS - Basics
Scalable JavaScript
Choosing Javascript Libraries to Adopt for Development
Javascript The Definitive Guideactivate Your Web Pages 6th Ed Flanagan
Ad

Recently uploaded (20)

PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
Classroom Observation Tools for Teachers
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
Complications of Minimal Access Surgery at WLH
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
Computing-Curriculum for Schools in Ghana
PPTX
GDM (1) (1).pptx small presentation for students
PPTX
Lesson notes of climatology university.
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
Institutional Correction lecture only . . .
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Renaissance Architecture: A Journey from Faith to Humanism
Classroom Observation Tools for Teachers
PPH.pptx obstetrics and gynecology in nursing
Complications of Minimal Access Surgery at WLH
human mycosis Human fungal infections are called human mycosis..pptx
STATICS OF THE RIGID BODIES Hibbelers.pdf
Microbial disease of the cardiovascular and lymphatic systems
Anesthesia in Laparoscopic Surgery in India
Computing-Curriculum for Schools in Ghana
GDM (1) (1).pptx small presentation for students
Lesson notes of climatology university.
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Institutional Correction lecture only . . .
O7-L3 Supply Chain Operations - ICLT Program
Pharmacology of Heart Failure /Pharmacotherapy of CHF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
VCE English Exam - Section C Student Revision Booklet
Module 4: Burden of Disease Tutorial Slides S2 2025

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