SlideShare une entreprise Scribd logo
1  sur  16
Télécharger pour lire hors ligne
JavaScript, qué hermoso eres
</ironyOff>
Disclaimer
● JavaScript a la antigua usanza, nada de ES6.
● Spanglish
● Sólo sé que no sé nada.
Show me the code
https://github.com/islomar/poc-javascript/tree/master/alea-technical-friday
Sumario
1. Show and hide
2. Hoisting
3. Ola k ase, soi un numero o k ase
4. La globalización de las variables
5. Objetos
6. IIFE
7. Module pattern
8. Herencia y prototipado
9. Invocation patterns
Show and hide
Visto por ahí: uso de clase ‘hide’
jQuery ofrece funciones show(), hide() y toggle()
Hoisting
● Hoisting = elevar, alzar, levantar
● It is a concept about program load order
● Function expressions vs function declaration/statements.
○ Function expression:
■ var showMeTheMoney = function(){}
■ Never hoisted
■ It loads only when this particular line of code is reached while executing.
○ Function declaration/statements:
■ Builds in memory immediately when the program loads
■ It does not require variable assignment
■ Can be invoked during execution before its actual definition
Ola k ase, soi un numero o k ase
Using NaN to check if values are actually JS Numbers seems like
a good idea, but it will try to kill you.
La globalización de las variables
Global variable: a variable visible in every scope.
Possible collisions when programs grow...
JS makes it easy to define global variables that can hold all of the assets of your
application.
Objetos
● The simple types of JS are numbers, strings, booleans, null and undefined
● All other values are objects: arrays, functions, regular expressions, etc.
● Numbers, strings and booleans have methods but they are immutable.
● Objects are mutable keyed collections.
● Objects are class-free
IIFE
IIFE (Immediately Invoked Function Expression) is a JavaScript function that runs as
soon as it is defined.
Used to hide “private” properties: module pattern.
Module pattern
The Module pattern is used to further emulate the concept of classes in such a way
that we're able to include both public/private methods and variables inside a single
object, thus shielding particular parts from the global scope.
What this results in is a reduction in the likelihood of our function names conflicting
with other functions defined in additional scripts on the page.
Inheritance and protoyping
● JS is a prototypal language, which means that objects inherit directly from other
objects.
● Every object is linked to a prototype object from which it can inherit properties.
● All objects created from object literals are linked to Object.prototype.
● When you make a new object, you can select the object that should be its
prototype.
Invocation patterns
● Invoking a function suspends the execution of the current function, passing
control and parameters to the new function.
● In addition to the declared parameters, every function receives two additional
parameters, every function receives two additional parameters: ‘this’ and
arguments.
Invocation patterns
● The patterns differ in how the bonus parameter ‘this’ is initialized:
○ Method invocation pattern
○ Function invocation pattern
○ Constructor invocation pattern
○ Apply invocation pattern
Bibliografía recomendada
● https://developer.mozilla.org/en-US/docs/Web/JavaScript
● Head First JavaScript
● CodeSchool: JavaScript Path
● JavaScript The Good Parts (Douglas Crockford)
● JavaScript Enlightenment (Cody Lindley)
JavaScript, qué hermoso eres

Contenu connexe

Tendances

Object Oriented Prograring(OOP) java
Object Oriented Prograring(OOP) javaObject Oriented Prograring(OOP) java
Object Oriented Prograring(OOP) javaGaddafiAdamu1
 
TypeScript: Angular's Secret Weapon
TypeScript: Angular's Secret WeaponTypeScript: Angular's Secret Weapon
TypeScript: Angular's Secret WeaponLaurent Duveau
 
Introducing type script
Introducing type scriptIntroducing type script
Introducing type scriptRemo Jansen
 
Introduction to Angular for .NET Developers
Introduction to Angular for .NET DevelopersIntroduction to Angular for .NET Developers
Introduction to Angular for .NET DevelopersLaurent Duveau
 
Ruby on Rails: a brief introduction
Ruby on Rails: a brief introductionRuby on Rails: a brief introduction
Ruby on Rails: a brief introductionLuigi De Russis
 
Javascript for Intermediates
Javascript for IntermediatesJavascript for Intermediates
Javascript for IntermediatesAnkit Agrawal
 
Typescript 101 introduction
Typescript 101   introductionTypescript 101   introduction
Typescript 101 introductionBob German
 
Lint, coverage, doc, autocompletion, transpilation, minification... powered b...
Lint, coverage, doc, autocompletion, transpilation, minification... powered b...Lint, coverage, doc, autocompletion, transpilation, minification... powered b...
Lint, coverage, doc, autocompletion, transpilation, minification... powered b...Alexandre Morgaut
 
TypeScript 101 - Studio Session - Accenture Liquid Studio
TypeScript 101 - Studio Session - Accenture Liquid StudioTypeScript 101 - Studio Session - Accenture Liquid Studio
TypeScript 101 - Studio Session - Accenture Liquid StudioFrances Coronel
 
JavaScript Execution Context
JavaScript Execution ContextJavaScript Execution Context
JavaScript Execution ContextJuan Medina
 
An overview of node.js
An overview of node.jsAn overview of node.js
An overview of node.jsvaluebound
 
Advanced Object Oriented JavaScript (prototype, closure, scope, design patterns)
Advanced Object Oriented JavaScript (prototype, closure, scope, design patterns)Advanced Object Oriented JavaScript (prototype, closure, scope, design patterns)
Advanced Object Oriented JavaScript (prototype, closure, scope, design patterns)raja kvk
 
Ruby's metaclass
Ruby's metaclassRuby's metaclass
Ruby's metaclassxds2000
 
TypeScript for Java Developers
TypeScript for Java DevelopersTypeScript for Java Developers
TypeScript for Java DevelopersYakov Fain
 
TypeScript . the JavaScript developer best friend!
TypeScript . the JavaScript developer best friend!TypeScript . the JavaScript developer best friend!
TypeScript . the JavaScript developer best friend!Alessandro Giorgetti
 

Tendances (20)

Object Oriented Prograring(OOP) java
Object Oriented Prograring(OOP) javaObject Oriented Prograring(OOP) java
Object Oriented Prograring(OOP) java
 
TypeScript Overview
TypeScript OverviewTypeScript Overview
TypeScript Overview
 
TypeScript: Angular's Secret Weapon
TypeScript: Angular's Secret WeaponTypeScript: Angular's Secret Weapon
TypeScript: Angular's Secret Weapon
 
Introducing type script
Introducing type scriptIntroducing type script
Introducing type script
 
Introduction to Angular for .NET Developers
Introduction to Angular for .NET DevelopersIntroduction to Angular for .NET Developers
Introduction to Angular for .NET Developers
 
Ruby on Rails: a brief introduction
Ruby on Rails: a brief introductionRuby on Rails: a brief introduction
Ruby on Rails: a brief introduction
 
Twins: OOP and FP
Twins: OOP and FPTwins: OOP and FP
Twins: OOP and FP
 
jQuery (intermediate)
jQuery (intermediate)jQuery (intermediate)
jQuery (intermediate)
 
TypeScript and Angular workshop
TypeScript and Angular workshopTypeScript and Angular workshop
TypeScript and Angular workshop
 
Javascript for Intermediates
Javascript for IntermediatesJavascript for Intermediates
Javascript for Intermediates
 
Typescript 101 introduction
Typescript 101   introductionTypescript 101   introduction
Typescript 101 introduction
 
Lint, coverage, doc, autocompletion, transpilation, minification... powered b...
Lint, coverage, doc, autocompletion, transpilation, minification... powered b...Lint, coverage, doc, autocompletion, transpilation, minification... powered b...
Lint, coverage, doc, autocompletion, transpilation, minification... powered b...
 
TypeScript 101 - Studio Session - Accenture Liquid Studio
TypeScript 101 - Studio Session - Accenture Liquid StudioTypeScript 101 - Studio Session - Accenture Liquid Studio
TypeScript 101 - Studio Session - Accenture Liquid Studio
 
JavaScript Execution Context
JavaScript Execution ContextJavaScript Execution Context
JavaScript Execution Context
 
An overview of node.js
An overview of node.jsAn overview of node.js
An overview of node.js
 
Advanced Object Oriented JavaScript (prototype, closure, scope, design patterns)
Advanced Object Oriented JavaScript (prototype, closure, scope, design patterns)Advanced Object Oriented JavaScript (prototype, closure, scope, design patterns)
Advanced Object Oriented JavaScript (prototype, closure, scope, design patterns)
 
Java object
Java objectJava object
Java object
 
Ruby's metaclass
Ruby's metaclassRuby's metaclass
Ruby's metaclass
 
TypeScript for Java Developers
TypeScript for Java DevelopersTypeScript for Java Developers
TypeScript for Java Developers
 
TypeScript . the JavaScript developer best friend!
TypeScript . the JavaScript developer best friend!TypeScript . the JavaScript developer best friend!
TypeScript . the JavaScript developer best friend!
 

En vedette

Customer experience research anno 2009
Customer experience research anno 2009Customer experience research anno 2009
Customer experience research anno 2009Lander Janssens
 
Shinygarden presentation
Shinygarden presentation Shinygarden presentation
Shinygarden presentation David Hong
 
Panel 10 : Managing Transfer Pricing Risks - By Ms.Marlies de Ruiter
Panel 10 : Managing Transfer Pricing Risks - By Ms.Marlies de RuiterPanel 10 : Managing Transfer Pricing Risks - By Ms.Marlies de Ruiter
Panel 10 : Managing Transfer Pricing Risks - By Ms.Marlies de Ruitertaxsutra
 
Godrej Signature Homes
Godrej Signature HomesGodrej Signature Homes
Godrej Signature HomesManish Kumar
 
Godrej Properties Noida - Affordable Homes
Godrej Properties Noida - Affordable Homes  Godrej Properties Noida - Affordable Homes
Godrej Properties Noida - Affordable Homes Manish Kumar
 
Proposal usaha warnet 1
Proposal usaha warnet 1Proposal usaha warnet 1
Proposal usaha warnet 1Andry Ansah
 
Materi Sosialisasi SNPT oleh Ridwan
Materi Sosialisasi SNPT oleh RidwanMateri Sosialisasi SNPT oleh Ridwan
Materi Sosialisasi SNPT oleh RidwanSunu Pradana
 
Optimization in scilab
Optimization in scilabOptimization in scilab
Optimization in scilabScilab
 
3Rs of Internet Safety: Rights, Responsibilities and Risk Management
3Rs of Internet Safety: Rights, Responsibilities and Risk Management3Rs of Internet Safety: Rights, Responsibilities and Risk Management
3Rs of Internet Safety: Rights, Responsibilities and Risk ManagementConnectSafely
 
¿Qué es la Deep Web? #Palabradehacker
¿Qué es la Deep Web? #Palabradehacker¿Qué es la Deep Web? #Palabradehacker
¿Qué es la Deep Web? #PalabradehackerYolanda Corral
 
Александр Лисаченко, Alpari, «Решение вопросов сквозной функциональности в пр...
Александр Лисаченко, Alpari, «Решение вопросов сквозной функциональности в пр...Александр Лисаченко, Alpari, «Решение вопросов сквозной функциональности в пр...
Александр Лисаченко, Alpari, «Решение вопросов сквозной функциональности в пр...Mail.ru Group
 

En vedette (16)

Customer experience research anno 2009
Customer experience research anno 2009Customer experience research anno 2009
Customer experience research anno 2009
 
Shinygarden presentation
Shinygarden presentation Shinygarden presentation
Shinygarden presentation
 
Panel 10 : Managing Transfer Pricing Risks - By Ms.Marlies de Ruiter
Panel 10 : Managing Transfer Pricing Risks - By Ms.Marlies de RuiterPanel 10 : Managing Transfer Pricing Risks - By Ms.Marlies de Ruiter
Panel 10 : Managing Transfer Pricing Risks - By Ms.Marlies de Ruiter
 
Godrej Signature Homes
Godrej Signature HomesGodrej Signature Homes
Godrej Signature Homes
 
Behavioral targeting
Behavioral targetingBehavioral targeting
Behavioral targeting
 
EAS solution
EAS solutionEAS solution
EAS solution
 
Godrej Properties Noida - Affordable Homes
Godrej Properties Noida - Affordable Homes  Godrej Properties Noida - Affordable Homes
Godrej Properties Noida - Affordable Homes
 
Argox printer
Argox printerArgox printer
Argox printer
 
Proposal usaha warnet 1
Proposal usaha warnet 1Proposal usaha warnet 1
Proposal usaha warnet 1
 
Materi Sosialisasi SNPT oleh Ridwan
Materi Sosialisasi SNPT oleh RidwanMateri Sosialisasi SNPT oleh Ridwan
Materi Sosialisasi SNPT oleh Ridwan
 
Optimization in scilab
Optimization in scilabOptimization in scilab
Optimization in scilab
 
3Rs of Internet Safety: Rights, Responsibilities and Risk Management
3Rs of Internet Safety: Rights, Responsibilities and Risk Management3Rs of Internet Safety: Rights, Responsibilities and Risk Management
3Rs of Internet Safety: Rights, Responsibilities and Risk Management
 
¿Qué es la Deep Web? #Palabradehacker
¿Qué es la Deep Web? #Palabradehacker¿Qué es la Deep Web? #Palabradehacker
¿Qué es la Deep Web? #Palabradehacker
 
Александр Лисаченко, Alpari, «Решение вопросов сквозной функциональности в пр...
Александр Лисаченко, Alpari, «Решение вопросов сквозной функциональности в пр...Александр Лисаченко, Alpari, «Решение вопросов сквозной функциональности в пр...
Александр Лисаченко, Alpari, «Решение вопросов сквозной функциональности в пр...
 
Resume_ALEX DGF
Resume_ALEX DGFResume_ALEX DGF
Resume_ALEX DGF
 
201603 01 bvd
201603  01 bvd201603  01 bvd
201603 01 bvd
 

Similaire à JavaScript, qué hermoso eres

Design patterns in javascript
Design patterns in javascriptDesign patterns in javascript
Design patterns in javascriptAyush Sharma
 
Exciting JavaScript - Part I
Exciting JavaScript - Part IExciting JavaScript - Part I
Exciting JavaScript - Part IEugene Lazutkin
 
Object Oriented Javascript part2
Object Oriented Javascript part2Object Oriented Javascript part2
Object Oriented Javascript part2Usman Mehmood
 
Javascript training sample
Javascript training sampleJavascript training sample
Javascript training sampleprahalad_das_in
 
Object oriented java script
Object oriented java scriptObject oriented java script
Object oriented java scriptvivek p s
 
Jquery Plugin
Jquery PluginJquery Plugin
Jquery PluginRavi Mone
 
"The JavaScript Design Patterns You have to Know" by Rashad Majali
"The JavaScript Design Patterns You have to Know" by Rashad Majali"The JavaScript Design Patterns You have to Know" by Rashad Majali
"The JavaScript Design Patterns You have to Know" by Rashad MajaliJordan Open Source Association
 
Understanding Object Oriented Javascript - Coffee@DBG June
Understanding Object Oriented Javascript - Coffee@DBG JuneUnderstanding Object Oriented Javascript - Coffee@DBG June
Understanding Object Oriented Javascript - Coffee@DBG JuneDeepu S Nath
 
Javascript for the c# developer
Javascript for the c# developerJavascript for the c# developer
Javascript for the c# developerSalvatore Fazio
 
Unbundling the JavaScript module bundler - DublinJS July 2018
Unbundling the JavaScript module bundler - DublinJS July 2018Unbundling the JavaScript module bundler - DublinJS July 2018
Unbundling the JavaScript module bundler - DublinJS July 2018Luciano Mammino
 
Object Oriented Programming All Unit Notes
Object Oriented Programming All Unit NotesObject Oriented Programming All Unit Notes
Object Oriented Programming All Unit NotesBalamuruganV28
 
Javascriptinobject orientedway-090512225827-phpapp02
Javascriptinobject orientedway-090512225827-phpapp02Javascriptinobject orientedway-090512225827-phpapp02
Javascriptinobject orientedway-090512225827-phpapp02Sopheak Sem
 
Javascript design patterns
Javascript design patternsJavascript design patterns
Javascript design patternsGomathiNayagam S
 
JavaScript OOPS Implimentation
JavaScript OOPS ImplimentationJavaScript OOPS Implimentation
JavaScript OOPS ImplimentationUsman Mehmood
 
jquery summit presentation for large scale javascript applications
jquery summit  presentation for large scale javascript applicationsjquery summit  presentation for large scale javascript applications
jquery summit presentation for large scale javascript applicationsDivyanshGupta922023
 

Similaire à JavaScript, qué hermoso eres (20)

Design patterns in javascript
Design patterns in javascriptDesign patterns in javascript
Design patterns in javascript
 
Exciting JavaScript - Part I
Exciting JavaScript - Part IExciting JavaScript - Part I
Exciting JavaScript - Part I
 
Object Oriented Javascript part2
Object Oriented Javascript part2Object Oriented Javascript part2
Object Oriented Javascript part2
 
[2015/2016] JavaScript
[2015/2016] JavaScript[2015/2016] JavaScript
[2015/2016] JavaScript
 
Javascript training sample
Javascript training sampleJavascript training sample
Javascript training sample
 
Object oriented java script
Object oriented java scriptObject oriented java script
Object oriented java script
 
Jquery Plugin
Jquery PluginJquery Plugin
Jquery Plugin
 
"The JavaScript Design Patterns You have to Know" by Rashad Majali
"The JavaScript Design Patterns You have to Know" by Rashad Majali"The JavaScript Design Patterns You have to Know" by Rashad Majali
"The JavaScript Design Patterns You have to Know" by Rashad Majali
 
Understanding Object Oriented Javascript - Coffee@DBG June
Understanding Object Oriented Javascript - Coffee@DBG JuneUnderstanding Object Oriented Javascript - Coffee@DBG June
Understanding Object Oriented Javascript - Coffee@DBG June
 
Javascript for the c# developer
Javascript for the c# developerJavascript for the c# developer
Javascript for the c# developer
 
Java 9 Features
Java 9 FeaturesJava 9 Features
Java 9 Features
 
Unbundling the JavaScript module bundler - DublinJS July 2018
Unbundling the JavaScript module bundler - DublinJS July 2018Unbundling the JavaScript module bundler - DublinJS July 2018
Unbundling the JavaScript module bundler - DublinJS July 2018
 
Object Oriented Programming All Unit Notes
Object Oriented Programming All Unit NotesObject Oriented Programming All Unit Notes
Object Oriented Programming All Unit Notes
 
Javascriptinobject orientedway-090512225827-phpapp02
Javascriptinobject orientedway-090512225827-phpapp02Javascriptinobject orientedway-090512225827-phpapp02
Javascriptinobject orientedway-090512225827-phpapp02
 
Javascript design patterns
Javascript design patternsJavascript design patterns
Javascript design patterns
 
JavaScript OOPS Implimentation
JavaScript OOPS ImplimentationJavaScript OOPS Implimentation
JavaScript OOPS Implimentation
 
JavaScript
JavaScriptJavaScript
JavaScript
 
jQuery
jQueryjQuery
jQuery
 
jquery summit presentation for large scale javascript applications
jquery summit  presentation for large scale javascript applicationsjquery summit  presentation for large scale javascript applications
jquery summit presentation for large scale javascript applications
 
Core Java Tutorial
Core Java TutorialCore Java Tutorial
Core Java Tutorial
 

Plus de Alea Soluciones, S.L.

Plus de Alea Soluciones, S.L. (9)

Boot process: BIOS vs UEFI
Boot process: BIOS vs UEFIBoot process: BIOS vs UEFI
Boot process: BIOS vs UEFI
 
Introducción a sysdig
Introducción a sysdigIntroducción a sysdig
Introducción a sysdig
 
Tests funcionales con Geb
Tests funcionales con GebTests funcionales con Geb
Tests funcionales con Geb
 
Introduction to Connascence
Introduction to ConnascenceIntroduction to Connascence
Introduction to Connascence
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integration
 
Polymer 101
Polymer 101Polymer 101
Polymer 101
 
Twelve factor apps
Twelve factor appsTwelve factor apps
Twelve factor apps
 
Presentación CAS 2016: Alineando valores y principios con prácticas técnicas
Presentación CAS 2016: Alineando valores y principios con prácticas técnicasPresentación CAS 2016: Alineando valores y principios con prácticas técnicas
Presentación CAS 2016: Alineando valores y principios con prácticas técnicas
 
Taller PyConEs 2016: Introducción a TDD
Taller PyConEs 2016: Introducción a TDDTaller PyConEs 2016: Introducción a TDD
Taller PyConEs 2016: Introducción a TDD
 

Dernier

The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 

Dernier (20)

The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 

JavaScript, qué hermoso eres

  • 1. JavaScript, qué hermoso eres </ironyOff>
  • 2. Disclaimer ● JavaScript a la antigua usanza, nada de ES6. ● Spanglish ● Sólo sé que no sé nada.
  • 3. Show me the code https://github.com/islomar/poc-javascript/tree/master/alea-technical-friday
  • 4. Sumario 1. Show and hide 2. Hoisting 3. Ola k ase, soi un numero o k ase 4. La globalización de las variables 5. Objetos 6. IIFE 7. Module pattern 8. Herencia y prototipado 9. Invocation patterns
  • 5. Show and hide Visto por ahí: uso de clase ‘hide’ jQuery ofrece funciones show(), hide() y toggle()
  • 6. Hoisting ● Hoisting = elevar, alzar, levantar ● It is a concept about program load order ● Function expressions vs function declaration/statements. ○ Function expression: ■ var showMeTheMoney = function(){} ■ Never hoisted ■ It loads only when this particular line of code is reached while executing. ○ Function declaration/statements: ■ Builds in memory immediately when the program loads ■ It does not require variable assignment ■ Can be invoked during execution before its actual definition
  • 7. Ola k ase, soi un numero o k ase Using NaN to check if values are actually JS Numbers seems like a good idea, but it will try to kill you.
  • 8. La globalización de las variables Global variable: a variable visible in every scope. Possible collisions when programs grow... JS makes it easy to define global variables that can hold all of the assets of your application.
  • 9. Objetos ● The simple types of JS are numbers, strings, booleans, null and undefined ● All other values are objects: arrays, functions, regular expressions, etc. ● Numbers, strings and booleans have methods but they are immutable. ● Objects are mutable keyed collections. ● Objects are class-free
  • 10. IIFE IIFE (Immediately Invoked Function Expression) is a JavaScript function that runs as soon as it is defined. Used to hide “private” properties: module pattern.
  • 11. Module pattern The Module pattern is used to further emulate the concept of classes in such a way that we're able to include both public/private methods and variables inside a single object, thus shielding particular parts from the global scope. What this results in is a reduction in the likelihood of our function names conflicting with other functions defined in additional scripts on the page.
  • 12. Inheritance and protoyping ● JS is a prototypal language, which means that objects inherit directly from other objects. ● Every object is linked to a prototype object from which it can inherit properties. ● All objects created from object literals are linked to Object.prototype. ● When you make a new object, you can select the object that should be its prototype.
  • 13. Invocation patterns ● Invoking a function suspends the execution of the current function, passing control and parameters to the new function. ● In addition to the declared parameters, every function receives two additional parameters, every function receives two additional parameters: ‘this’ and arguments.
  • 14. Invocation patterns ● The patterns differ in how the bonus parameter ‘this’ is initialized: ○ Method invocation pattern ○ Function invocation pattern ○ Constructor invocation pattern ○ Apply invocation pattern
  • 15. Bibliografía recomendada ● https://developer.mozilla.org/en-US/docs/Web/JavaScript ● Head First JavaScript ● CodeSchool: JavaScript Path ● JavaScript The Good Parts (Douglas Crockford) ● JavaScript Enlightenment (Cody Lindley)