SlideShare a Scribd company logo
OBJECT ORIENTED PROGRAMMING
IN
JAVASCRIPT
(ENCAPSULATION)
-- Aditya Majety
FreeCodeCamp Lightning Talk
28-Mar-2017
AGENDA
 Encapsulation – What & Why
 Private vs Public Members in JavaScript
 Demo of Encapsulation in JavaScript
ENCAPSULATION – WHAT & WHY
 What is Encapsulation:
 A mechanism of restricting direct access to some of the object’s components.
 A mechanism of bundling data with methods that operate on that data.
 Why Encapsulation:
 Security – Controlled access.
 Hide Implementation and Expose Behaviour.
 Loose Coupling – Modify the implementation anytime.
PRIVATE VS PUBLIC MEMBERS
 Private :
 Private Members can only be accessed inside the Object.
 Private Methods can only access Private Members and not Public ones.
 Public :
 Public Members can be accessed anywhere using the dot notation.
 Public Methods can access both public and private members.
DEMO OF ENCAPSULATION
DEMO OF ENCAPSULATION – CONTD…
Output
THANK YOU

More Related Content

PPTX
Blockbuster Final Presentation
PPTX
VMware vSphere technical presentation
PPTX
Customer Feedback Analytics for Starbucks
PDF
So you want to do a startup, eh?
ODP
OAuth2 - Introduction
PPTX
Introduction to Java Cloud Service
PDF
Greenplum Roadmap
PDF
Building a Data Lake on AWS
Blockbuster Final Presentation
VMware vSphere technical presentation
Customer Feedback Analytics for Starbucks
So you want to do a startup, eh?
OAuth2 - Introduction
Introduction to Java Cloud Service
Greenplum Roadmap
Building a Data Lake on AWS

What's hot (20)

PPTX
Azure cognitive search
PDF
Attribute-Based Access Control in Symfony
PPTX
DeNAtechcon_DeNAのセキュリティの取り組みと、スマートフォンセキュリティ(same-origin policy)
PPTX
Secure AWS with Fortinet Security Fabric.pptx
PPTX
Azure Synapse Analytics Overview (r1)
PDF
OOW09 Integration Architecture EBS R12
PPTX
Qlik sense- Technical Seminar
PPTX
SSAS Tabular model importance and uses
PPTX
Microsoft Fabric.pptx
PPTX
Snowflake Overview
PPTX
NOVA - Enriquecimiento de IA con Azure Cognitive Search.pptx
PPTX
Snowflake Data Access.pptx
PPTX
IdP, SAML, OAuth
PPTX
Virtual Infrastructure Overview
PDF
VSAN – Architettura e Design
PDF
The Container Storage Interface (CSI)
PDF
Introduction to virtualization
PPT
Nike interview questions and answers
PPTX
Backup and Restore VMs Based on KVM
PPT
Chromium vs. Firefox
Azure cognitive search
Attribute-Based Access Control in Symfony
DeNAtechcon_DeNAのセキュリティの取り組みと、スマートフォンセキュリティ(same-origin policy)
Secure AWS with Fortinet Security Fabric.pptx
Azure Synapse Analytics Overview (r1)
OOW09 Integration Architecture EBS R12
Qlik sense- Technical Seminar
SSAS Tabular model importance and uses
Microsoft Fabric.pptx
Snowflake Overview
NOVA - Enriquecimiento de IA con Azure Cognitive Search.pptx
Snowflake Data Access.pptx
IdP, SAML, OAuth
Virtual Infrastructure Overview
VSAN – Architettura e Design
The Container Storage Interface (CSI)
Introduction to virtualization
Nike interview questions and answers
Backup and Restore VMs Based on KVM
Chromium vs. Firefox
Ad

Viewers also liked (12)

PPTX
Encapsulation
PPTX
Encapsulation C++
PPTX
2CPP09 - Encapsulation
PPTX
encapsulation
PDF
Chapter2 Encapsulation (Java)
PPTX
Process Analysis
PPTX
Flavor encapsulation assignment
PPT
An overview of encapsulation technologies for food
PPTX
Encapsulation
PPT
20. Object-Oriented Programming Fundamental Principles
PPTX
Object oriented programming in JavaScript
PPT
Encapsulation
Encapsulation
Encapsulation C++
2CPP09 - Encapsulation
encapsulation
Chapter2 Encapsulation (Java)
Process Analysis
Flavor encapsulation assignment
An overview of encapsulation technologies for food
Encapsulation
20. Object-Oriented Programming Fundamental Principles
Object oriented programming in JavaScript
Encapsulation
Ad

Similar to Encapsulation in JavaScript - OOP (20)

PPTX
Presentation related to Encapsulation and OOPs
PPTX
Prese00yq3whesfthewgdsyuvferwyjhjdfegcyjgfz.pptx
PPTX
Presen5416846534653416354165341864adeadvdes
PPTX
Prese00z213hfcyudegtyfwyyudeqw7tgfi7u.pptx
PPTX
Presentation - Copy no vaperpoit asd.pptx
PPTX
Object Oriented Javascript part2
PDF
Salesforce Meetup Grasp and Solid in Apex (Speakers: Alexander Popok and Kons...
PPTX
OOP interview questions & answers.
PPTX
Oops abap fundamental
PPTX
004_Private and public attributes and methods.pptx
PPT
Oops in Java
PPTX
OOP-Advanced_Programming.pptx
PPTX
Effective Java - Chapter 4: Classes and Interfaces
PDF
"Study of Java Access Control Mechanism”
PDF
Object Oriented Programming | class | object
PPTX
Basics of Object Oriented Programming in Python
PDF
OOP in Python, a beginners guide..........
PPTX
Reflection in Java
DOCX
Object oriented basics
PPSX
Core Java for Selenium
Presentation related to Encapsulation and OOPs
Prese00yq3whesfthewgdsyuvferwyjhjdfegcyjgfz.pptx
Presen5416846534653416354165341864adeadvdes
Prese00z213hfcyudegtyfwyyudeqw7tgfi7u.pptx
Presentation - Copy no vaperpoit asd.pptx
Object Oriented Javascript part2
Salesforce Meetup Grasp and Solid in Apex (Speakers: Alexander Popok and Kons...
OOP interview questions & answers.
Oops abap fundamental
004_Private and public attributes and methods.pptx
Oops in Java
OOP-Advanced_Programming.pptx
Effective Java - Chapter 4: Classes and Interfaces
"Study of Java Access Control Mechanism”
Object Oriented Programming | class | object
Basics of Object Oriented Programming in Python
OOP in Python, a beginners guide..........
Reflection in Java
Object oriented basics
Core Java for Selenium

Recently uploaded (20)

DOCX
The Five Best AI Cover Tools in 2025.docx
PPTX
Online Work Permit System for Fast Permit Processing
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
Presentation of Computer CLASS 2 .pptx
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PPTX
Materi_Pemrograman_Komputer-Looping.pptx
PPTX
Essential Infomation Tech presentation.pptx
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PPTX
Mini project ppt template for panimalar Engineering college
PPT
JAVA ppt tutorial basics to learn java programming
PDF
medical staffing services at VALiNTRY
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PPT
Introduction Database Management System for Course Database
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Softaken Excel to vCard Converter Software.pdf
PPTX
ISO 45001 Occupational Health and Safety Management System
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
The Five Best AI Cover Tools in 2025.docx
Online Work Permit System for Fast Permit Processing
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Presentation of Computer CLASS 2 .pptx
VVF-Customer-Presentation2025-Ver1.9.pptx
2025 Textile ERP Trends: SAP, Odoo & Oracle
Materi_Pemrograman_Komputer-Looping.pptx
Essential Infomation Tech presentation.pptx
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
ManageIQ - Sprint 268 Review - Slide Deck
Mini project ppt template for panimalar Engineering college
JAVA ppt tutorial basics to learn java programming
medical staffing services at VALiNTRY
How to Migrate SBCGlobal Email to Yahoo Easily
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Introduction Database Management System for Course Database
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Softaken Excel to vCard Converter Software.pdf
ISO 45001 Occupational Health and Safety Management System
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...

Encapsulation in JavaScript - OOP

  • 1. OBJECT ORIENTED PROGRAMMING IN JAVASCRIPT (ENCAPSULATION) -- Aditya Majety FreeCodeCamp Lightning Talk 28-Mar-2017
  • 2. AGENDA  Encapsulation – What & Why  Private vs Public Members in JavaScript  Demo of Encapsulation in JavaScript
  • 3. ENCAPSULATION – WHAT & WHY  What is Encapsulation:  A mechanism of restricting direct access to some of the object’s components.  A mechanism of bundling data with methods that operate on that data.  Why Encapsulation:  Security – Controlled access.  Hide Implementation and Expose Behaviour.  Loose Coupling – Modify the implementation anytime.
  • 4. PRIVATE VS PUBLIC MEMBERS  Private :  Private Members can only be accessed inside the Object.  Private Methods can only access Private Members and not Public ones.  Public :  Public Members can be accessed anywhere using the dot notation.  Public Methods can access both public and private members.
  • 6. DEMO OF ENCAPSULATION – CONTD… Output