SlideShare une entreprise Scribd logo
1  sur  17
Télécharger pour lire hors ligne
JAVASCRIPT DOJO
Lessons and thoughts
from DevWeek
TALKS ATTENDED
• “Modern JavaScript” - K. Scott Allen
• “Just because it’s JavaScript doesn’t give you
the right to write rubbish!” – Hadi Hariri
• Mobile development with MVC4 and jQuery
Mobile – Brock Allen
Nobody
knows
JavaScript!
DOUBLE AND TRIPLE EQUALS
a)1 == “1”
a)1 == true
a)“1” == true
a)1 == “ 1 “
a)1 == [1]
f) null == undefined
f) 1 == 1
f) “ “ == false
f) NaN == NaN
f) 1 == “true”
Prefer strict equals === to ==
QUNIT
SCOPE
A/
(function () {
if (true) {
var functionScope = "functionScope";
}
return functionScope;
})();
B/
var functionScope = "functionScope";
(function () {
return functionScope;
})();
C/
(function () {
var test = function () {
var functionScope = "functionScope";
}
return functionScope;
})();
D/
(function () {
var functionScope = 0;
var functionScope = “functionScope”;
return function
}
HOISTING
http://elegantcode.com/2010/12/24/basic-javascript-part-5-hoisting/
Function scope means that all
variables and parameters
declared inside a function are
visible everywhere within the
function.
FUNCTION DECLARATIONS
VS FUNCTION EXPRESSIONS
Function Declaration
function functionDeclaration() {
return “I’m a function declaration”;
}
Function Expression
var functionExpression = function() {
return “I’m a function expression”;
};
AUTOMATIC SEMICOLON
INSERTION
Using semicolons in JavaScript is optional BUT
JavaScript inserts them automatically.
Don't forget to use new on constructor functions.
New and This
TECHNIQUES
• Constructor protection
• Encapsulation
• Placing methods on the prototype
• Self executing functions
• Namespaces
• Module Pattern / Revealing module pattern
CONSTRUCTOR PROTECTION
STORE FUNCTIONS ON THE
PROTOTYPE
HADI HARIRI
• “It’s just JavaScript!”
• “JavaScript is write once code – you never want to go back to
it and change it”
• “People think that JavaScript is not maintainable.”
• “People think SRP doesn’t exist in JavaScript – how can a class
have a single responsibility if there isn’t a class”
• “We care in C#, we care in Java....why not JavaScript?”
NEXT STEPS
• Know JavaScript better.
• Be able to write and run tests easily in Visual
Studio.
• Write real world JavaScript tests with
mocking.
• Get intellisense in Visual Studio
• Be able to run tests as part of Team City build
• Have tools which will help me improve the
USEFUL LINKS
• K Scott Allen’s blog - www.odetocode.com/blogs/all
• Hadi Hariri , same talk in Norway – http://vimeo.com/43536490
• Basic JavaScript blog posts – http://elegantcode.com/2011/03/24/basic-
javascript-part-12-function-hoisting
• JavaScript sketch pad – http://jsfiddle.net
• Free Book (now published by O’Reilly) based on ECMAScript version 3
http://javascriptenlightment.com/JavaScript_Enlightenment.pdf
• JavaScript performance test bed – http://jsperf.com

Contenu connexe

Tendances

Event In JavaScript
Event In JavaScriptEvent In JavaScript
Event In JavaScriptShahDhruv21
 
ReactJS presentation
ReactJS presentationReactJS presentation
ReactJS presentationThanh Tuong
 
Fundamental JavaScript [UTC, March 2014]
Fundamental JavaScript [UTC, March 2014]Fundamental JavaScript [UTC, March 2014]
Fundamental JavaScript [UTC, March 2014]Aaron Gustafson
 
Introduction to Javascript
Introduction to JavascriptIntroduction to Javascript
Introduction to JavascriptAmit Tyagi
 
Introduction to React JS for beginners
Introduction to React JS for beginners Introduction to React JS for beginners
Introduction to React JS for beginners Varun Raj
 
JavaScript Programming
JavaScript ProgrammingJavaScript Programming
JavaScript ProgrammingSehwan Noh
 
Introduction to ajax
Introduction to ajaxIntroduction to ajax
Introduction to ajaxNir Elbaz
 
JavaScript - Chapter 12 - Document Object Model
  JavaScript - Chapter 12 - Document Object Model  JavaScript - Chapter 12 - Document Object Model
JavaScript - Chapter 12 - Document Object ModelWebStackAcademy
 
JavaScript - Chapter 11 - Events
 JavaScript - Chapter 11 - Events  JavaScript - Chapter 11 - Events
JavaScript - Chapter 11 - Events WebStackAcademy
 

Tendances (20)

Event In JavaScript
Event In JavaScriptEvent In JavaScript
Event In JavaScript
 
ReactJS presentation
ReactJS presentationReactJS presentation
ReactJS presentation
 
jQuery
jQueryjQuery
jQuery
 
Reactjs
Reactjs Reactjs
Reactjs
 
Java Script ppt
Java Script pptJava Script ppt
Java Script ppt
 
Javascript
JavascriptJavascript
Javascript
 
jQuery
jQueryjQuery
jQuery
 
Js ppt
Js pptJs ppt
Js ppt
 
Fundamental JavaScript [UTC, March 2014]
Fundamental JavaScript [UTC, March 2014]Fundamental JavaScript [UTC, March 2014]
Fundamental JavaScript [UTC, March 2014]
 
Introduction to Javascript
Introduction to JavascriptIntroduction to Javascript
Introduction to Javascript
 
Javascript essentials
Javascript essentialsJavascript essentials
Javascript essentials
 
Introduction to React JS for beginners
Introduction to React JS for beginners Introduction to React JS for beginners
Introduction to React JS for beginners
 
JavaScript Programming
JavaScript ProgrammingJavaScript Programming
JavaScript Programming
 
JavaScript: Events Handling
JavaScript: Events HandlingJavaScript: Events Handling
JavaScript: Events Handling
 
Introduction to ajax
Introduction to ajaxIntroduction to ajax
Introduction to ajax
 
jQuery
jQueryjQuery
jQuery
 
Javascript
JavascriptJavascript
Javascript
 
JavaScript - Chapter 12 - Document Object Model
  JavaScript - Chapter 12 - Document Object Model  JavaScript - Chapter 12 - Document Object Model
JavaScript - Chapter 12 - Document Object Model
 
JavaScript - Chapter 11 - Events
 JavaScript - Chapter 11 - Events  JavaScript - Chapter 11 - Events
JavaScript - Chapter 11 - Events
 
jQuery for beginners
jQuery for beginnersjQuery for beginners
jQuery for beginners
 

En vedette (14)

Presentation on C++ Programming Language
Presentation on C++ Programming LanguagePresentation on C++ Programming Language
Presentation on C++ Programming Language
 
Js coding standards
Js coding standardsJs coding standards
Js coding standards
 
Software development best practices & coding guidelines
Software development best practices & coding guidelinesSoftware development best practices & coding guidelines
Software development best practices & coding guidelines
 
JavaScript - An Introduction
JavaScript - An IntroductionJavaScript - An Introduction
JavaScript - An Introduction
 
Dhtml
DhtmlDhtml
Dhtml
 
Xhtml
XhtmlXhtml
Xhtml
 
XHTML
XHTMLXHTML
XHTML
 
Introduction to XHTML
Introduction to XHTMLIntroduction to XHTML
Introduction to XHTML
 
Dhtml
DhtmlDhtml
Dhtml
 
Dynamic HTML
Dynamic HTMLDynamic HTML
Dynamic HTML
 
JSON: The Basics
JSON: The BasicsJSON: The Basics
JSON: The Basics
 
Dynamic HTML (DHTML)
Dynamic HTML (DHTML)Dynamic HTML (DHTML)
Dynamic HTML (DHTML)
 
C++ ppt
C++ pptC++ ppt
C++ ppt
 
Json
JsonJson
Json
 

Similaire à Java script ppt

Let’s learn how to use JavaScript responsibly and stay up-to-date.
Let’s learn how to use JavaScript responsibly and stay up-to-date. Let’s learn how to use JavaScript responsibly and stay up-to-date.
Let’s learn how to use JavaScript responsibly and stay up-to-date. Christian Heilmann
 
MCE^3 - Konstantin Raev - React Native: Open Source Continuous Build and Deli...
MCE^3 - Konstantin Raev - React Native: Open Source Continuous Build and Deli...MCE^3 - Konstantin Raev - React Native: Open Source Continuous Build and Deli...
MCE^3 - Konstantin Raev - React Native: Open Source Continuous Build and Deli...PROIDEA
 
Emergent design @ Pronto 24/11/2013
Emergent design @ Pronto 24/11/2013Emergent design @ Pronto 24/11/2013
Emergent design @ Pronto 24/11/2013Varokas Panusuwan
 
Enterprise Strength Mobile JavaScript
Enterprise Strength Mobile JavaScriptEnterprise Strength Mobile JavaScript
Enterprise Strength Mobile JavaScriptTroy Miles
 
JavaScript: Past, Present, Future
JavaScript: Past, Present, FutureJavaScript: Past, Present, Future
JavaScript: Past, Present, FutureJungryul Choi
 
How I learned to stop worrying and love embedding JavaScript
How I learned to stop worrying and love embedding JavaScriptHow I learned to stop worrying and love embedding JavaScript
How I learned to stop worrying and love embedding JavaScriptKevin Read
 
Embedding V8 in Android apps with Ejecta-V8
Embedding V8 in Android apps with Ejecta-V8Embedding V8 in Android apps with Ejecta-V8
Embedding V8 in Android apps with Ejecta-V8Kevin Read
 
Quo vadis, JavaScript? Devday.pl keynote
Quo vadis, JavaScript? Devday.pl keynoteQuo vadis, JavaScript? Devday.pl keynote
Quo vadis, JavaScript? Devday.pl keynoteChristian Heilmann
 
The JavaScript Delusion
The JavaScript DelusionThe JavaScript Delusion
The JavaScript DelusionJUGBD
 
React Native and the future of web technology (Mark Wilcox) - GreeceJS #15
React Native and the future of web technology (Mark Wilcox) - GreeceJS #15React Native and the future of web technology (Mark Wilcox) - GreeceJS #15
React Native and the future of web technology (Mark Wilcox) - GreeceJS #15GreeceJS
 
Javascript Best Practices and Intro to Titanium
Javascript Best Practices and Intro to TitaniumJavascript Best Practices and Intro to Titanium
Javascript Best Practices and Intro to TitaniumTechday7
 
The Silver Bullet Syndrome by Alexey Vasiliev
The Silver Bullet Syndrome by Alexey VasilievThe Silver Bullet Syndrome by Alexey Vasiliev
The Silver Bullet Syndrome by Alexey VasilievPivorak MeetUp
 
UML for Aspect Oriented Design
UML for Aspect Oriented DesignUML for Aspect Oriented Design
UML for Aspect Oriented DesignEdison Lascano
 
Xamarin - Why I started learning it?
Xamarin - Why I started learning it?Xamarin - Why I started learning it?
Xamarin - Why I started learning it?Ankit Kashyap
 
Angular from a Different Angle
Angular from a Different AngleAngular from a Different Angle
Angular from a Different AngleJeremy Likness
 
Untangling spring week9
Untangling spring week9Untangling spring week9
Untangling spring week9Derek Jacoby
 

Similaire à Java script ppt (20)

Let’s learn how to use JavaScript responsibly and stay up-to-date.
Let’s learn how to use JavaScript responsibly and stay up-to-date. Let’s learn how to use JavaScript responsibly and stay up-to-date.
Let’s learn how to use JavaScript responsibly and stay up-to-date.
 
MCE^3 - Konstantin Raev - React Native: Open Source Continuous Build and Deli...
MCE^3 - Konstantin Raev - React Native: Open Source Continuous Build and Deli...MCE^3 - Konstantin Raev - React Native: Open Source Continuous Build and Deli...
MCE^3 - Konstantin Raev - React Native: Open Source Continuous Build and Deli...
 
Emergent design @ Pronto 24/11/2013
Emergent design @ Pronto 24/11/2013Emergent design @ Pronto 24/11/2013
Emergent design @ Pronto 24/11/2013
 
Enterprise Strength Mobile JavaScript
Enterprise Strength Mobile JavaScriptEnterprise Strength Mobile JavaScript
Enterprise Strength Mobile JavaScript
 
Java script core
Java script coreJava script core
Java script core
 
JavaScript: Past, Present, Future
JavaScript: Past, Present, FutureJavaScript: Past, Present, Future
JavaScript: Past, Present, Future
 
JS Essence
JS EssenceJS Essence
JS Essence
 
Java script introduction
Java script introductionJava script introduction
Java script introduction
 
How I learned to stop worrying and love embedding JavaScript
How I learned to stop worrying and love embedding JavaScriptHow I learned to stop worrying and love embedding JavaScript
How I learned to stop worrying and love embedding JavaScript
 
Embedding V8 in Android apps with Ejecta-V8
Embedding V8 in Android apps with Ejecta-V8Embedding V8 in Android apps with Ejecta-V8
Embedding V8 in Android apps with Ejecta-V8
 
Quo vadis, JavaScript? Devday.pl keynote
Quo vadis, JavaScript? Devday.pl keynoteQuo vadis, JavaScript? Devday.pl keynote
Quo vadis, JavaScript? Devday.pl keynote
 
The JavaScript Delusion
The JavaScript DelusionThe JavaScript Delusion
The JavaScript Delusion
 
React Native and the future of web technology (Mark Wilcox) - GreeceJS #15
React Native and the future of web technology (Mark Wilcox) - GreeceJS #15React Native and the future of web technology (Mark Wilcox) - GreeceJS #15
React Native and the future of web technology (Mark Wilcox) - GreeceJS #15
 
Coffee script throwdown
Coffee script throwdownCoffee script throwdown
Coffee script throwdown
 
Javascript Best Practices and Intro to Titanium
Javascript Best Practices and Intro to TitaniumJavascript Best Practices and Intro to Titanium
Javascript Best Practices and Intro to Titanium
 
The Silver Bullet Syndrome by Alexey Vasiliev
The Silver Bullet Syndrome by Alexey VasilievThe Silver Bullet Syndrome by Alexey Vasiliev
The Silver Bullet Syndrome by Alexey Vasiliev
 
UML for Aspect Oriented Design
UML for Aspect Oriented DesignUML for Aspect Oriented Design
UML for Aspect Oriented Design
 
Xamarin - Why I started learning it?
Xamarin - Why I started learning it?Xamarin - Why I started learning it?
Xamarin - Why I started learning it?
 
Angular from a Different Angle
Angular from a Different AngleAngular from a Different Angle
Angular from a Different Angle
 
Untangling spring week9
Untangling spring week9Untangling spring week9
Untangling spring week9
 

Plus de The Health and Social Care Information Centre

Benefits case study summary – prescriptions dispensed in the community’ publi...
Benefits case study summary – prescriptions dispensed in the community’ publi...Benefits case study summary – prescriptions dispensed in the community’ publi...
Benefits case study summary – prescriptions dispensed in the community’ publi...The Health and Social Care Information Centre
 

Plus de The Health and Social Care Information Centre (20)

Hscic data quality_data_standards_workshop_taunton_2016
Hscic data quality_data_standards_workshop_taunton_2016Hscic data quality_data_standards_workshop_taunton_2016
Hscic data quality_data_standards_workshop_taunton_2016
 
Hscic data quality_data_standards_workshop_manchester_2016
Hscic data quality_data_standards_workshop_manchester_2016Hscic data quality_data_standards_workshop_manchester_2016
Hscic data quality_data_standards_workshop_manchester_2016
 
Hscic data quality_data_standards_workshop_leeds_2016
Hscic data quality_data_standards_workshop_leeds_2016Hscic data quality_data_standards_workshop_leeds_2016
Hscic data quality_data_standards_workshop_leeds_2016
 
Benefits case study summary – prescriptions dispensed in the community’ publi...
Benefits case study summary – prescriptions dispensed in the community’ publi...Benefits case study summary – prescriptions dispensed in the community’ publi...
Benefits case study summary – prescriptions dispensed in the community’ publi...
 
Benefits case study summary: NHS Immunisation Statistics Publication
Benefits case study summary: NHS Immunisation Statistics PublicationBenefits case study summary: NHS Immunisation Statistics Publication
Benefits case study summary: NHS Immunisation Statistics Publication
 
Benefits case study: NHS Immunisation Statistics Publication
Benefits case study: NHS Immunisation Statistics PublicationBenefits case study: NHS Immunisation Statistics Publication
Benefits case study: NHS Immunisation Statistics Publication
 
Benefits case study summary: Diabetes Uk Putting Feet First Campaign
Benefits case study summary: Diabetes Uk Putting Feet First CampaignBenefits case study summary: Diabetes Uk Putting Feet First Campaign
Benefits case study summary: Diabetes Uk Putting Feet First Campaign
 
Benefits case study: Diabetes UK Putting Feet First Campaign
Benefits case study: Diabetes UK Putting Feet First CampaignBenefits case study: Diabetes UK Putting Feet First Campaign
Benefits case study: Diabetes UK Putting Feet First Campaign
 
HSCIC/ESR Data Quality / Data Standards Road Shows 2015/16
HSCIC/ESR Data Quality / Data Standards Road Shows 2015/16HSCIC/ESR Data Quality / Data Standards Road Shows 2015/16
HSCIC/ESR Data Quality / Data Standards Road Shows 2015/16
 
Nicholas Oughtibridge: Code Of Practice For Confidential Information Commissi...
Nicholas Oughtibridge: Code Of Practice For Confidential Information Commissi...Nicholas Oughtibridge: Code Of Practice For Confidential Information Commissi...
Nicholas Oughtibridge: Code Of Practice For Confidential Information Commissi...
 
Julie Henderson and Shaun Rowark (NICE): Commissioning in Healthcare show (Ci...
Julie Henderson and Shaun Rowark (NICE): Commissioning in Healthcare show (Ci...Julie Henderson and Shaun Rowark (NICE): Commissioning in Healthcare show (Ci...
Julie Henderson and Shaun Rowark (NICE): Commissioning in Healthcare show (Ci...
 
Jackie Shears: NHS Pathways Commissioning in Healthcare show (CiH 2015)
Jackie Shears: NHS Pathways Commissioning in Healthcare show (CiH 2015)Jackie Shears: NHS Pathways Commissioning in Healthcare show (CiH 2015)
Jackie Shears: NHS Pathways Commissioning in Healthcare show (CiH 2015)
 
Andy Williams: Healthcare Efficiency Through Technology Expo (HETT 2015)
Andy Williams: Healthcare Efficiency Through Technology Expo (HETT 2015)Andy Williams: Healthcare Efficiency Through Technology Expo (HETT 2015)
Andy Williams: Healthcare Efficiency Through Technology Expo (HETT 2015)
 
Cleveland Henry: Healthcare Efficiency Through Technology Expo (HETT 2015)
Cleveland Henry: Healthcare Efficiency Through Technology Expo (HETT 2015)Cleveland Henry: Healthcare Efficiency Through Technology Expo (HETT 2015)
Cleveland Henry: Healthcare Efficiency Through Technology Expo (HETT 2015)
 
Measures from the Adult Social Care Outcomes Framework, England - 2014-15
Measures from the Adult Social Care Outcomes Framework, England - 2014-15Measures from the Adult Social Care Outcomes Framework, England - 2014-15
Measures from the Adult Social Care Outcomes Framework, England - 2014-15
 
HSCIC/ESR Data Quality / Data Standards Road Shows 2015/16
HSCIC/ESR Data Quality / Data Standards Road Shows 2015/16HSCIC/ESR Data Quality / Data Standards Road Shows 2015/16
HSCIC/ESR Data Quality / Data Standards Road Shows 2015/16
 
Stoptober: infographic of HSCIC statistics on smoking
Stoptober: infographic of HSCIC statistics on smokingStoptober: infographic of HSCIC statistics on smoking
Stoptober: infographic of HSCIC statistics on smoking
 
Focus on the health and care of young people - poster
Focus on the health and care of young people - posterFocus on the health and care of young people - poster
Focus on the health and care of young people - poster
 
Focus on the health and care of young people
Focus on the health and care of young people Focus on the health and care of young people
Focus on the health and care of young people
 
Business plan for the Health and Social Care Information Centre 2015 - 2016
Business plan for the Health and Social Care Information Centre 2015 - 2016Business plan for the Health and Social Care Information Centre 2015 - 2016
Business plan for the Health and Social Care Information Centre 2015 - 2016
 

Dernier

CCSC6142 Week 3 Research ethics - Long Hoang.pdf
CCSC6142 Week 3 Research ethics - Long Hoang.pdfCCSC6142 Week 3 Research ethics - Long Hoang.pdf
CCSC6142 Week 3 Research ethics - Long Hoang.pdfMyThaoAiDoan
 
Culture and Health Disorders Social change.pptx
Culture and Health Disorders Social change.pptxCulture and Health Disorders Social change.pptx
Culture and Health Disorders Social change.pptxDr. Dheeraj Kumar
 
PULMONARY EDEMA AND ITS MANAGEMENT.pdf
PULMONARY EDEMA AND  ITS  MANAGEMENT.pdfPULMONARY EDEMA AND  ITS  MANAGEMENT.pdf
PULMONARY EDEMA AND ITS MANAGEMENT.pdfDolisha Warbi
 
World-Health-Day-2024-My-Health-My-Right.pptx
World-Health-Day-2024-My-Health-My-Right.pptxWorld-Health-Day-2024-My-Health-My-Right.pptx
World-Health-Day-2024-My-Health-My-Right.pptxEx WHO/USAID
 
Lippincott Microcards_ Microbiology Flash Cards-LWW (2015).pdf
Lippincott Microcards_ Microbiology Flash Cards-LWW (2015).pdfLippincott Microcards_ Microbiology Flash Cards-LWW (2015).pdf
Lippincott Microcards_ Microbiology Flash Cards-LWW (2015).pdfSreeja Cherukuru
 
Big Data Analysis Suggests COVID Vaccination Increases Excess Mortality Of ...
Big Data Analysis Suggests COVID  Vaccination Increases Excess Mortality Of  ...Big Data Analysis Suggests COVID  Vaccination Increases Excess Mortality Of  ...
Big Data Analysis Suggests COVID Vaccination Increases Excess Mortality Of ...sdateam0
 
Phytochemical Investigation of Drugs PDF.pdf
Phytochemical Investigation of Drugs PDF.pdfPhytochemical Investigation of Drugs PDF.pdf
Phytochemical Investigation of Drugs PDF.pdfDivya Kanojiya
 
Tans femoral Amputee : Prosthetics Knee Joints.pptx
Tans femoral Amputee : Prosthetics Knee Joints.pptxTans femoral Amputee : Prosthetics Knee Joints.pptx
Tans femoral Amputee : Prosthetics Knee Joints.pptxKezaiah S
 
Radiation Dosimetry Parameters and Isodose Curves.pptx
Radiation Dosimetry Parameters and Isodose Curves.pptxRadiation Dosimetry Parameters and Isodose Curves.pptx
Radiation Dosimetry Parameters and Isodose Curves.pptxDr. Dheeraj Kumar
 
LESSON PLAN ON fever.pdf child health nursing
LESSON PLAN ON fever.pdf child health nursingLESSON PLAN ON fever.pdf child health nursing
LESSON PLAN ON fever.pdf child health nursingSakthi Kathiravan
 
Screening for colorectal cancer AAU.pptx
Screening for colorectal cancer AAU.pptxScreening for colorectal cancer AAU.pptx
Screening for colorectal cancer AAU.pptxtadehabte
 
Measurement of Radiation and Dosimetric Procedure.pptx
Measurement of Radiation and Dosimetric Procedure.pptxMeasurement of Radiation and Dosimetric Procedure.pptx
Measurement of Radiation and Dosimetric Procedure.pptxDr. Dheeraj Kumar
 
Primary headache and facial pain. (2024)
Primary headache and facial pain. (2024)Primary headache and facial pain. (2024)
Primary headache and facial pain. (2024)Mohamed Rizk Khodair
 
Presentation for Bella Mahl 2024-03-28-24-MW-Overview-Bella.pptx
Presentation for Bella Mahl 2024-03-28-24-MW-Overview-Bella.pptxPresentation for Bella Mahl 2024-03-28-24-MW-Overview-Bella.pptx
Presentation for Bella Mahl 2024-03-28-24-MW-Overview-Bella.pptxpdamico1
 
MedDRA-A-Comprehensive-Guide-to-Standardized-Medical-Terminology.pdf
MedDRA-A-Comprehensive-Guide-to-Standardized-Medical-Terminology.pdfMedDRA-A-Comprehensive-Guide-to-Standardized-Medical-Terminology.pdf
MedDRA-A-Comprehensive-Guide-to-Standardized-Medical-Terminology.pdfSasikiranMarri
 
PHYSIOTHERAPY IN HEART TRANSPLANTATION..
PHYSIOTHERAPY IN HEART TRANSPLANTATION..PHYSIOTHERAPY IN HEART TRANSPLANTATION..
PHYSIOTHERAPY IN HEART TRANSPLANTATION..AneriPatwari
 
SCHOOL HEALTH SERVICES.pptx made by Sapna Thakur
SCHOOL HEALTH SERVICES.pptx made by Sapna ThakurSCHOOL HEALTH SERVICES.pptx made by Sapna Thakur
SCHOOL HEALTH SERVICES.pptx made by Sapna ThakurSapna Thakur
 
Presentation on Parasympathetic Nervous System
Presentation on Parasympathetic Nervous SystemPresentation on Parasympathetic Nervous System
Presentation on Parasympathetic Nervous SystemPrerana Jadhav
 
SYNDESMOTIC INJURY- ANATOMICAL REPAIR.pptx
SYNDESMOTIC INJURY- ANATOMICAL REPAIR.pptxSYNDESMOTIC INJURY- ANATOMICAL REPAIR.pptx
SYNDESMOTIC INJURY- ANATOMICAL REPAIR.pptxdrashraf369
 

Dernier (20)

CCSC6142 Week 3 Research ethics - Long Hoang.pdf
CCSC6142 Week 3 Research ethics - Long Hoang.pdfCCSC6142 Week 3 Research ethics - Long Hoang.pdf
CCSC6142 Week 3 Research ethics - Long Hoang.pdf
 
Culture and Health Disorders Social change.pptx
Culture and Health Disorders Social change.pptxCulture and Health Disorders Social change.pptx
Culture and Health Disorders Social change.pptx
 
PULMONARY EDEMA AND ITS MANAGEMENT.pdf
PULMONARY EDEMA AND  ITS  MANAGEMENT.pdfPULMONARY EDEMA AND  ITS  MANAGEMENT.pdf
PULMONARY EDEMA AND ITS MANAGEMENT.pdf
 
World-Health-Day-2024-My-Health-My-Right.pptx
World-Health-Day-2024-My-Health-My-Right.pptxWorld-Health-Day-2024-My-Health-My-Right.pptx
World-Health-Day-2024-My-Health-My-Right.pptx
 
Lippincott Microcards_ Microbiology Flash Cards-LWW (2015).pdf
Lippincott Microcards_ Microbiology Flash Cards-LWW (2015).pdfLippincott Microcards_ Microbiology Flash Cards-LWW (2015).pdf
Lippincott Microcards_ Microbiology Flash Cards-LWW (2015).pdf
 
Big Data Analysis Suggests COVID Vaccination Increases Excess Mortality Of ...
Big Data Analysis Suggests COVID  Vaccination Increases Excess Mortality Of  ...Big Data Analysis Suggests COVID  Vaccination Increases Excess Mortality Of  ...
Big Data Analysis Suggests COVID Vaccination Increases Excess Mortality Of ...
 
Phytochemical Investigation of Drugs PDF.pdf
Phytochemical Investigation of Drugs PDF.pdfPhytochemical Investigation of Drugs PDF.pdf
Phytochemical Investigation of Drugs PDF.pdf
 
Tans femoral Amputee : Prosthetics Knee Joints.pptx
Tans femoral Amputee : Prosthetics Knee Joints.pptxTans femoral Amputee : Prosthetics Knee Joints.pptx
Tans femoral Amputee : Prosthetics Knee Joints.pptx
 
Radiation Dosimetry Parameters and Isodose Curves.pptx
Radiation Dosimetry Parameters and Isodose Curves.pptxRadiation Dosimetry Parameters and Isodose Curves.pptx
Radiation Dosimetry Parameters and Isodose Curves.pptx
 
LESSON PLAN ON fever.pdf child health nursing
LESSON PLAN ON fever.pdf child health nursingLESSON PLAN ON fever.pdf child health nursing
LESSON PLAN ON fever.pdf child health nursing
 
Screening for colorectal cancer AAU.pptx
Screening for colorectal cancer AAU.pptxScreening for colorectal cancer AAU.pptx
Screening for colorectal cancer AAU.pptx
 
Measurement of Radiation and Dosimetric Procedure.pptx
Measurement of Radiation and Dosimetric Procedure.pptxMeasurement of Radiation and Dosimetric Procedure.pptx
Measurement of Radiation and Dosimetric Procedure.pptx
 
Primary headache and facial pain. (2024)
Primary headache and facial pain. (2024)Primary headache and facial pain. (2024)
Primary headache and facial pain. (2024)
 
Presentation for Bella Mahl 2024-03-28-24-MW-Overview-Bella.pptx
Presentation for Bella Mahl 2024-03-28-24-MW-Overview-Bella.pptxPresentation for Bella Mahl 2024-03-28-24-MW-Overview-Bella.pptx
Presentation for Bella Mahl 2024-03-28-24-MW-Overview-Bella.pptx
 
JANGAMA VISHA .pptx-
JANGAMA VISHA .pptx-JANGAMA VISHA .pptx-
JANGAMA VISHA .pptx-
 
MedDRA-A-Comprehensive-Guide-to-Standardized-Medical-Terminology.pdf
MedDRA-A-Comprehensive-Guide-to-Standardized-Medical-Terminology.pdfMedDRA-A-Comprehensive-Guide-to-Standardized-Medical-Terminology.pdf
MedDRA-A-Comprehensive-Guide-to-Standardized-Medical-Terminology.pdf
 
PHYSIOTHERAPY IN HEART TRANSPLANTATION..
PHYSIOTHERAPY IN HEART TRANSPLANTATION..PHYSIOTHERAPY IN HEART TRANSPLANTATION..
PHYSIOTHERAPY IN HEART TRANSPLANTATION..
 
SCHOOL HEALTH SERVICES.pptx made by Sapna Thakur
SCHOOL HEALTH SERVICES.pptx made by Sapna ThakurSCHOOL HEALTH SERVICES.pptx made by Sapna Thakur
SCHOOL HEALTH SERVICES.pptx made by Sapna Thakur
 
Presentation on Parasympathetic Nervous System
Presentation on Parasympathetic Nervous SystemPresentation on Parasympathetic Nervous System
Presentation on Parasympathetic Nervous System
 
SYNDESMOTIC INJURY- ANATOMICAL REPAIR.pptx
SYNDESMOTIC INJURY- ANATOMICAL REPAIR.pptxSYNDESMOTIC INJURY- ANATOMICAL REPAIR.pptx
SYNDESMOTIC INJURY- ANATOMICAL REPAIR.pptx
 

Java script ppt

  • 1. JAVASCRIPT DOJO Lessons and thoughts from DevWeek
  • 2. TALKS ATTENDED • “Modern JavaScript” - K. Scott Allen • “Just because it’s JavaScript doesn’t give you the right to write rubbish!” – Hadi Hariri • Mobile development with MVC4 and jQuery Mobile – Brock Allen
  • 4. DOUBLE AND TRIPLE EQUALS a)1 == “1” a)1 == true a)“1” == true a)1 == “ 1 “ a)1 == [1] f) null == undefined f) 1 == 1 f) “ “ == false f) NaN == NaN f) 1 == “true”
  • 7. SCOPE A/ (function () { if (true) { var functionScope = "functionScope"; } return functionScope; })(); B/ var functionScope = "functionScope"; (function () { return functionScope; })(); C/ (function () { var test = function () { var functionScope = "functionScope"; } return functionScope; })(); D/ (function () { var functionScope = 0; var functionScope = “functionScope”; return function }
  • 9. Function scope means that all variables and parameters declared inside a function are visible everywhere within the function.
  • 10. FUNCTION DECLARATIONS VS FUNCTION EXPRESSIONS Function Declaration function functionDeclaration() { return “I’m a function declaration”; } Function Expression var functionExpression = function() { return “I’m a function expression”; };
  • 11. AUTOMATIC SEMICOLON INSERTION Using semicolons in JavaScript is optional BUT JavaScript inserts them automatically. Don't forget to use new on constructor functions. New and This
  • 12. TECHNIQUES • Constructor protection • Encapsulation • Placing methods on the prototype • Self executing functions • Namespaces • Module Pattern / Revealing module pattern
  • 14. STORE FUNCTIONS ON THE PROTOTYPE
  • 15. HADI HARIRI • “It’s just JavaScript!” • “JavaScript is write once code – you never want to go back to it and change it” • “People think that JavaScript is not maintainable.” • “People think SRP doesn’t exist in JavaScript – how can a class have a single responsibility if there isn’t a class” • “We care in C#, we care in Java....why not JavaScript?”
  • 16. NEXT STEPS • Know JavaScript better. • Be able to write and run tests easily in Visual Studio. • Write real world JavaScript tests with mocking. • Get intellisense in Visual Studio • Be able to run tests as part of Team City build • Have tools which will help me improve the
  • 17. USEFUL LINKS • K Scott Allen’s blog - www.odetocode.com/blogs/all • Hadi Hariri , same talk in Norway – http://vimeo.com/43536490 • Basic JavaScript blog posts – http://elegantcode.com/2011/03/24/basic- javascript-part-12-function-hoisting • JavaScript sketch pad – http://jsfiddle.net • Free Book (now published by O’Reilly) based on ECMAScript version 3 http://javascriptenlightment.com/JavaScript_Enlightenment.pdf • JavaScript performance test bed – http://jsperf.com