SlideShare una empresa de Scribd logo
1 de 30
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
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

Más contenido relacionado

La actualidad más candente

Metaprogramming JavaScript
Metaprogramming  JavaScriptMetaprogramming  JavaScript
Metaprogramming JavaScriptdanwrong
 
The Gist of React Native
The Gist of React NativeThe Gist of React Native
The Gist of React NativeDarren Cruse
 
Survive JavaScript - Strategies and Tricks
Survive JavaScript - Strategies and TricksSurvive JavaScript - Strategies and Tricks
Survive JavaScript - Strategies and TricksJuho Vepsäläinen
 
JavaScript : A trending scripting language
JavaScript : A trending scripting languageJavaScript : A trending scripting language
JavaScript : A trending scripting languageAbhayDhupar
 
An Intro to Angular 2
An Intro to Angular 2An Intro to Angular 2
An Intro to Angular 2Ron Heft
 
Developing Modern Java Web Applications with Java EE 7 and AngularJS
Developing Modern Java Web Applications with Java EE 7 and AngularJSDeveloping Modern Java Web Applications with Java EE 7 and AngularJS
Developing Modern Java Web Applications with Java EE 7 and AngularJSShekhar Gulati
 
Integrating React.js Into a PHP Application
Integrating React.js Into a PHP ApplicationIntegrating React.js Into a PHP Application
Integrating React.js Into a PHP ApplicationAndrew Rota
 
The Road to Native Web Components
The Road to Native Web ComponentsThe Road to Native Web Components
The Road to Native Web ComponentsMike North
 
Single Page Applications with AngularJS 2.0
Single Page Applications with AngularJS 2.0 Single Page Applications with AngularJS 2.0
Single Page Applications with AngularJS 2.0 Sumanth Chinthagunta
 
Type script for_java_dev_jul_2020
Type script for_java_dev_jul_2020Type script for_java_dev_jul_2020
Type script for_java_dev_jul_2020Yakov Fain
 
Dart for Java Developers
Dart for Java DevelopersDart for Java Developers
Dart for Java DevelopersYakov Fain
 
A tour of React Native
A tour of React NativeA tour of React Native
A tour of React NativeTadeu Zagallo
 
Aligning Ember.js with Web Standards
Aligning Ember.js with Web StandardsAligning Ember.js with Web Standards
Aligning Ember.js with Web StandardsMatthew Beale
 
AngularJS Introduction
AngularJS IntroductionAngularJS Introduction
AngularJS IntroductionCarlos Morales
 
AngularJS Basics
AngularJS BasicsAngularJS Basics
AngularJS BasicsRavi Mone
 
OSGi and Spring Data for simple (Web) Application Development
OSGi and Spring Data  for simple (Web) Application DevelopmentOSGi and Spring Data  for simple (Web) Application Development
OSGi and Spring Data for simple (Web) Application DevelopmentChristian Baranowski
 
Scal`a`ngular - Scala and Angular
Scal`a`ngular - Scala and AngularScal`a`ngular - Scala and Angular
Scal`a`ngular - Scala and AngularKnoldus Inc.
 

La actualidad más candente (20)

Metaprogramming JavaScript
Metaprogramming  JavaScriptMetaprogramming  JavaScript
Metaprogramming JavaScript
 
The Gist of React Native
The Gist of React NativeThe Gist of React Native
The Gist of React Native
 
Javascript
JavascriptJavascript
Javascript
 
Survive JavaScript - Strategies and Tricks
Survive JavaScript - Strategies and TricksSurvive JavaScript - Strategies and Tricks
Survive JavaScript - Strategies and Tricks
 
JavaScript : A trending scripting language
JavaScript : A trending scripting languageJavaScript : A trending scripting language
JavaScript : A trending scripting language
 
An Intro to Angular 2
An Intro to Angular 2An Intro to Angular 2
An Intro to Angular 2
 
Developing Modern Java Web Applications with Java EE 7 and AngularJS
Developing Modern Java Web Applications with Java EE 7 and AngularJSDeveloping Modern Java Web Applications with Java EE 7 and AngularJS
Developing Modern Java Web Applications with Java EE 7 and AngularJS
 
JavaScript Good Practices
JavaScript Good PracticesJavaScript Good Practices
JavaScript Good Practices
 
Integrating React.js Into a PHP Application
Integrating React.js Into a PHP ApplicationIntegrating React.js Into a PHP Application
Integrating React.js Into a PHP Application
 
The Road to Native Web Components
The Road to Native Web ComponentsThe Road to Native Web Components
The Road to Native Web Components
 
Single Page Applications with AngularJS 2.0
Single Page Applications with AngularJS 2.0 Single Page Applications with AngularJS 2.0
Single Page Applications with AngularJS 2.0
 
Type script for_java_dev_jul_2020
Type script for_java_dev_jul_2020Type script for_java_dev_jul_2020
Type script for_java_dev_jul_2020
 
Dart for Java Developers
Dart for Java DevelopersDart for Java Developers
Dart for Java Developers
 
A tour of React Native
A tour of React NativeA tour of React Native
A tour of React Native
 
Aligning Ember.js with Web Standards
Aligning Ember.js with Web StandardsAligning Ember.js with Web Standards
Aligning Ember.js with Web Standards
 
AngularJS Introduction
AngularJS IntroductionAngularJS Introduction
AngularJS Introduction
 
AngularJS Basics
AngularJS BasicsAngularJS Basics
AngularJS Basics
 
OSGi and Spring Data for simple (Web) Application Development
OSGi and Spring Data  for simple (Web) Application DevelopmentOSGi and Spring Data  for simple (Web) Application Development
OSGi and Spring Data for simple (Web) Application Development
 
Object Oriented Javascript
Object Oriented JavascriptObject Oriented Javascript
Object Oriented Javascript
 
Scal`a`ngular - Scala and Angular
Scal`a`ngular - Scala and AngularScal`a`ngular - Scala and Angular
Scal`a`ngular - Scala and Angular
 

Similar a Javascript Best Practices and Intro to Titanium

Using Javascript in today's world
Using Javascript in today's worldUsing Javascript in today's world
Using Javascript in today's worldSudar Muthu
 
Clojurescript slides
Clojurescript slidesClojurescript slides
Clojurescript slideselliando dias
 
Swagger - Making REST APIs friendlier
Swagger - Making REST APIs friendlierSwagger - Making REST APIs friendlier
Swagger - Making REST APIs friendlierMiroslav Resetar
 
An introduction to Node.js
An introduction to Node.jsAn introduction to Node.js
An introduction to Node.jsKasey McCurdy
 
Building mobile apps with PhoneGap and Backbone
Building mobile apps with PhoneGap and BackboneBuilding mobile apps with PhoneGap and Backbone
Building mobile apps with PhoneGap and BackboneTroy Miles
 
Enterprise Strength Mobile JavaScript
Enterprise Strength Mobile JavaScriptEnterprise Strength Mobile JavaScript
Enterprise Strength Mobile JavaScriptTroy Miles
 
Java script nirvana in netbeans [con5679]
Java script nirvana in netbeans [con5679]Java script nirvana in netbeans [con5679]
Java script nirvana in netbeans [con5679]Ryan Cuprak
 
Mvvm knockout vs angular
Mvvm knockout vs angularMvvm knockout vs angular
Mvvm knockout vs angularBasarat Syed
 
Using type script to build better apps
Using type script to build better appsUsing type script to build better apps
Using type script to build better appsColdFusionConference
 
Using type script to build better apps
Using type script to build better appsUsing type script to build better apps
Using type script to build better appsdevObjective
 
Kevin Whinnery: Write Better JavaScript
Kevin Whinnery: Write Better JavaScriptKevin Whinnery: Write Better JavaScript
Kevin Whinnery: Write Better JavaScriptAxway Appcelerator
 
Edy Dawson Notes on SF HTML5 Dev Conf
Edy Dawson Notes on SF HTML5 Dev ConfEdy Dawson Notes on SF HTML5 Dev Conf
Edy Dawson Notes on SF HTML5 Dev ConfEdy Dawson
 
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript FrameworksBuilding Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript FrameworksFITC
 
MEAN Stack Warm-up
MEAN Stack Warm-upMEAN Stack Warm-up
MEAN Stack Warm-upTroy Miles
 
Introduction to React native
Introduction to React nativeIntroduction to React native
Introduction to React nativeDhaval Barot
 
Mastering react with redux
Mastering react with reduxMastering react with redux
Mastering react with reduxGaurav Singh
 
Google App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and GaelykGoogle App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and GaelykGuillaume Laforge
 
End to End Testing with nightwatchjs
End to End  Testing with nightwatchjsEnd to End  Testing with nightwatchjs
End to End Testing with nightwatchjsSrikanth Madduri
 

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

Using Javascript in today's world
Using Javascript in today's worldUsing Javascript in today's world
Using Javascript in today's world
 
Clojurescript slides
Clojurescript slidesClojurescript slides
Clojurescript slides
 
Swagger - Making REST APIs friendlier
Swagger - Making REST APIs friendlierSwagger - Making REST APIs friendlier
Swagger - Making REST APIs friendlier
 
An introduction to Node.js
An introduction to Node.jsAn introduction to Node.js
An introduction to Node.js
 
Building mobile apps with PhoneGap and Backbone
Building mobile apps with PhoneGap and BackboneBuilding mobile apps with PhoneGap and Backbone
Building mobile apps with PhoneGap and Backbone
 
Enterprise Strength Mobile JavaScript
Enterprise Strength Mobile JavaScriptEnterprise Strength Mobile JavaScript
Enterprise Strength Mobile JavaScript
 
Java script nirvana in netbeans [con5679]
Java script nirvana in netbeans [con5679]Java script nirvana in netbeans [con5679]
Java script nirvana in netbeans [con5679]
 
Mvvm knockout vs angular
Mvvm knockout vs angularMvvm knockout vs angular
Mvvm knockout vs angular
 
Presentation
PresentationPresentation
Presentation
 
Using type script to build better apps
Using type script to build better appsUsing type script to build better apps
Using type script to build better apps
 
Using type script to build better apps
Using type script to build better appsUsing type script to build better apps
Using type script to build better apps
 
Kevin Whinnery: Write Better JavaScript
Kevin Whinnery: Write Better JavaScriptKevin Whinnery: Write Better JavaScript
Kevin Whinnery: Write Better JavaScript
 
Edy Dawson Notes on SF HTML5 Dev Conf
Edy Dawson Notes on SF HTML5 Dev ConfEdy Dawson Notes on SF HTML5 Dev Conf
Edy Dawson Notes on SF HTML5 Dev Conf
 
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript FrameworksBuilding Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
 
MEAN Stack Warm-up
MEAN Stack Warm-upMEAN Stack Warm-up
MEAN Stack Warm-up
 
Introduction to React native
Introduction to React nativeIntroduction to React native
Introduction to React native
 
Mastering react with redux
Mastering react with reduxMastering react with redux
Mastering react with redux
 
Google App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and GaelykGoogle App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and Gaelyk
 
Javascript best practices
Javascript best practicesJavascript best practices
Javascript best practices
 
End to End Testing with nightwatchjs
End to End  Testing with nightwatchjsEnd to End  Testing with nightwatchjs
End to End Testing with nightwatchjs
 

Último

Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...Pooja Nehwal
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...anjaliyadav012327
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 

Último (20)

Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 

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
  • 23.
  • 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