SlideShare a Scribd company logo
Introduction to Advanced Javascript
www.collaborationtech.co.in
Bengaluru INDIA
Presentation By
Ramananda M.S Rao
Content
Content
Overview
Get Started
OOPs
Design Patterns
Document Object Model(DOM)
About Us
www.collaborationtech.co.in
Overview
 object-oriented JavaScript is somewhat redundant, as the
JavaScript language is completely object-oriented and is impossible
to use otherwise.
 Objects are the foundation of JavaScript. Virtually everything
within the language is an object. Much of the power of the
language is derived from this fact.
 Design patterns are advanced object-oriented solutions to
commonly occurring software problems. Patterns are about
reusable designs and interactions of objects.
 Each pattern has a name and becomes part of a vocabulary when
discussing complex design solutions.
www.collaborationtech.co.in
Get Started OOPS
Example:
console.log('Hi');
function Person() {}
var gosho = new Person(); // instance of Person
var maria = new Person(); // another instance of Person
gosho.name = "George";
maria.name = "Maria";
console.log(gosho.name); // George
console.log(maria.name); // Maria
www.collaborationtech.co.in
Design Pattern
Example:
<!DOCTYPE html>
<html>
<head><title></title>
<script>
var TeslaModelS = function() {
this.numWheels = 4; this.manufacturer = 'Tesla'; this.make = 'Model S';
}
TeslaModelS.prototype = function() {
var go = function() { document.write(“Hi Naveen");};
var stop = function() { document.write("Missing you so much"); };
return { pressBrakePedal: stop,pressGasPedal: go }}();
var test = new TeslaModelS()
test.pressGasPedal();
test.pressBrakePedal();
</script>
</head>
<body>
</body>
</html>
www.collaborationtech.co.in
Design Pattern
Example:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title></title>
<script>
function Shop() {
this.construct = function(builder) {
builder.step1();
builder.step2();
return builder.get();}}
function CarBuilder() { this.car = null;
this.step1 = function() { this.car = new Car(); };
this.step2 = function() { this.car.addParts(); };
this.get = function() {return this.car; }; }
function TruckBuilder() {this.truck = null;
this.step1 = function() {
this.truck = new Truck(); };
www.collaborationtech.co.in
Design Pattern
this.step2 = function() {
this.truck.addParts();};
this.get = function() { return this.truck;};}
function Car() {this.doors = 0;
this.addParts = function() {this.doors = 4;};
this.say = function() { log.add("I am a " + this.doors + "-door
car");};}
function Truck() {this.doors = 0;
this.addParts = function() {this.doors = 2;};
this.say = function() {log.add("I am a " + this.doors + "-door
truck");
};}
www.collaborationtech.co.in
Design Pattern
// log helper
var log = (function () {
var log = "";
return {
add: function (msg) { log += msg + "n"; },
show: function () { alert(log); log = ""; } }})();
function run() {
var shop = new Shop();
var carBuilder = new CarBuilder();
var truckBuilder = new TruckBuilder();
var car = shop.construct(carBuilder);
var truck = shop.construct(truckBuilder);
car.say(); truck.say(); log.show(); }
run();
</script>
</head>
<body>
</body>
</html>
www.collaborationtech.co.in
DOM
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Shopping list</title>
<style type="text/css">
p { color: yellow; font-family: "arial", sans-serif; font-size: 1.2em;}
body { color: white; background-color: black;}
#purchases { border: 1px solid white; background-color: #333; color: #ccc; padding: 1em;}
#purchases li { font-weight: bold;}
</style>
</head>
<body>
<h1>What to buy</h1>
<p title="a gentle reminder">Don't forget to buy this stuff.</p>
<p>This is just a test</p>
<ul id="purchases">
<li>A tin of beans</li>
<li>Cheese</li>
<li>Milk</li> </ul>
<script type="text/JavaScript">
var paras = document.getElementsByTagName("p");
for (var i=0; i< paras.length; i++) {
var title_text = paras[i].getAttribute("title");
if (title_text != null) {
alert(title_text); }}</script>
</body>
</html>
www.collaborationtech.co.in
DOM
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Image Gallery</title>
</head>
<body>
<h1>Snapshots</h1>
<ul>
<li>
<a href="images/fireworks.jpg" title="A fireworks display">Fireworks</a>
</li>
<li>
<a href="images/coffee.jpg" title="A cup of black coffee">Coffee</a>
</li>
<li>
<a href="images/rose.jpg" title="A red, red rose">Rose</a>
</li>
<li>
<a href="images/bigben.jpg" title="The famous clock">Big Ben</a>
</li>
</ul>
</body>
</html>
www.collaborationtech.co.in
Follow us on Social
Facebook: https://www.facebook.com/collaborationtechnologies/
Twitter : https://twitter.com/collaboration09
Google Plus : https://plus.google.com/100704494006819853579
LinkedIn : https://www.linkedin.com/in/ramananda-rao-a2012545
Instagram : https://instagram.com/collaborationtechnologies
YouTube :
https://www.youtube.com/channel/UCm9nK56LRbWSqcYWbzs8CUg
Tumblr : https://collaborationtechnologies.tumblr.com/
Pinterest : https://in.pinterest.com/collaborationte/
Skype : facebook:ramananda.rao.7
WhatsApp : +91 9886272445
www.collaborationtech.co.in
THANK YOU
About Us

More Related Content

ZIP
Fundamental JavaScript [In Control 2009]
PDF
Domain Driven Design and Hexagonal Architecture with Rails
PPSX
Javascript variables and datatypes
PPTX
Java Script An Introduction By HWA
PPT
Java script -23jan2015
PPTX
Javascript
PPTX
Javascript
PPTX
Java Script
Fundamental JavaScript [In Control 2009]
Domain Driven Design and Hexagonal Architecture with Rails
Javascript variables and datatypes
Java Script An Introduction By HWA
Java script -23jan2015
Javascript
Javascript
Java Script

What's hot (20)

PPTX
Java script
PPT
Java script
PPT
Java script final presentation
PDF
JavaScript - Chapter 12 - Document Object Model
ODP
Elixir and elm - the perfect couple
PPS
Advisor Jumpstart: JavaScript
PPT
Java script
PPTX
Java script basics
PDF
Basic JavaScript Tutorial
PDF
Everything You Need To Know About AngularJS
PPTX
1. java script language fundamentals
PDF
Javascript
PPTX
Web programming
PPTX
Java script
PPTX
Complete Notes on Angular 2 and TypeScript
PDF
Javascript
PPTX
Javascript functions
PPT
Java script Learn Easy
PPTX
Java script
Java script
Java script final presentation
JavaScript - Chapter 12 - Document Object Model
Elixir and elm - the perfect couple
Advisor Jumpstart: JavaScript
Java script
Java script basics
Basic JavaScript Tutorial
Everything You Need To Know About AngularJS
1. java script language fundamentals
Javascript
Web programming
Java script
Complete Notes on Angular 2 and TypeScript
Javascript
Javascript functions
Java script Learn Easy
Ad

Viewers also liked (20)

PDF
Python - Lecture 1
PDF
Analysis of Fatal Utah Avalanches with Python. From Scraping, Analysis, to In...
PDF
Java OOP Programming language (Part 1) - Introduction to Java
PDF
Learning notes of r for python programmer (Temp1)
PDF
Meetup Python Nantes - les tests en python
PPT
Operator Overloading
PDF
PyCon 2013 : Scripting to PyPi to GitHub and More
PDF
Installing Python on Mac
PDF
Python for All
PDF
Introduction to python
PDF
Lesson1 python an introduction
PDF
Python master class part 1
DOCX
Introduction to Python - Running Notes
PDF
Introduction to facebook java script sdk
PDF
Introduction to facebook javascript sdk
PPTX
Lec02 structures (2)
PPTX
Mastering python lesson2
PDF
Running openCV project on Mac OS
PDF
Concise Notes on Python
PPTX
Python Hype?
Python - Lecture 1
Analysis of Fatal Utah Avalanches with Python. From Scraping, Analysis, to In...
Java OOP Programming language (Part 1) - Introduction to Java
Learning notes of r for python programmer (Temp1)
Meetup Python Nantes - les tests en python
Operator Overloading
PyCon 2013 : Scripting to PyPi to GitHub and More
Installing Python on Mac
Python for All
Introduction to python
Lesson1 python an introduction
Python master class part 1
Introduction to Python - Running Notes
Introduction to facebook java script sdk
Introduction to facebook javascript sdk
Lec02 structures (2)
Mastering python lesson2
Running openCV project on Mac OS
Concise Notes on Python
Python Hype?
Ad

Similar to Introduction to Advanced Javascript (20)

PPT
Javascript Design Patterns
PDF
Javascript coding-and-design-patterns
PPTX
Wt unit 5
PPT
JBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
PDF
HTML5 for the Silverlight Guy
PPT
eXo SEA - JavaScript Introduction Training
PPTX
IWT presentation121232112122222225556+556.pptx
PPTX
Closure
PDF
JavaScript Core
PDF
Javascript Design Patterns
PDF
How AngularJS Embraced Traditional Design Patterns
PDF
TWINS: OOP and FP - Warburton
PPT
Grails Introduction - IJTC 2007
ODP
Apache Aries Blog Sample
PDF
JavaScript ES6
PPTX
Untangling8
PDF
Angular JS2 Training Session #1
PPTX
Google Apps Script for Beginners- Amazing Things with Code
PPT
PHP 5.3 Part 2 - Lambda Functions & Closures
Javascript Design Patterns
Javascript coding-and-design-patterns
Wt unit 5
JBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
HTML5 for the Silverlight Guy
eXo SEA - JavaScript Introduction Training
IWT presentation121232112122222225556+556.pptx
Closure
JavaScript Core
Javascript Design Patterns
How AngularJS Embraced Traditional Design Patterns
TWINS: OOP and FP - Warburton
Grails Introduction - IJTC 2007
Apache Aries Blog Sample
JavaScript ES6
Untangling8
Angular JS2 Training Session #1
Google Apps Script for Beginners- Amazing Things with Code
PHP 5.3 Part 2 - Lambda Functions & Closures

More from Collaboration Technologies (17)

PPTX
Introduction to Core Java Programming
PPTX
Introduction to Database SQL & PL/SQL
PPTX
Introduction to AngularJS
PPTX
Introduction to Bootstrap
PPTX
Introduction to Hibernate Framework
PPTX
Introduction to HTML4
PPTX
Introduction to HTML5
PPTX
Introduction to JavaScript Programming
PPTX
Introduction to JPA Framework
PPTX
Introduction to jQuery
PPTX
Introduction to Perl Programming
PPTX
Introduction to PHP
PPTX
Introduction to Python Basics Programming
PPTX
Introduction to Spring Framework
PPTX
Introduction to Struts 2
PPTX
Introduction to JSON & AJAX
PPTX
Introduction to Node.JS
Introduction to Core Java Programming
Introduction to Database SQL & PL/SQL
Introduction to AngularJS
Introduction to Bootstrap
Introduction to Hibernate Framework
Introduction to HTML4
Introduction to HTML5
Introduction to JavaScript Programming
Introduction to JPA Framework
Introduction to jQuery
Introduction to Perl Programming
Introduction to PHP
Introduction to Python Basics Programming
Introduction to Spring Framework
Introduction to Struts 2
Introduction to JSON & AJAX
Introduction to Node.JS

Recently uploaded (20)

PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
HCSP-Presales-Campus Network Planning and Design V1.0 Training Material-Witho...
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Transforming Manufacturing operations through Intelligent Integrations
PDF
Sensors and Actuators in IoT Systems using pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Advanced IT Governance
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Modernizing your data center with Dell and AMD
PDF
Advanced Soft Computing BINUS July 2025.pdf
PDF
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
PPTX
Cloud computing and distributed systems.
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
Big Data Technologies - Introduction.pptx
PDF
Electronic commerce courselecture one. Pdf
PDF
CIFDAQ's Market Wrap: Ethereum Leads, Bitcoin Lags, Institutions Shift
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
20250228 LYD VKU AI Blended-Learning.pptx
HCSP-Presales-Campus Network Planning and Design V1.0 Training Material-Witho...
NewMind AI Monthly Chronicles - July 2025
Transforming Manufacturing operations through Intelligent Integrations
Sensors and Actuators in IoT Systems using pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Advanced IT Governance
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
NewMind AI Weekly Chronicles - August'25 Week I
Modernizing your data center with Dell and AMD
Advanced Soft Computing BINUS July 2025.pdf
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
Cloud computing and distributed systems.
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Big Data Technologies - Introduction.pptx
Electronic commerce courselecture one. Pdf
CIFDAQ's Market Wrap: Ethereum Leads, Bitcoin Lags, Institutions Shift
Understanding_Digital_Forensics_Presentation.pptx
Spectral efficient network and resource selection model in 5G networks
Advanced methodologies resolving dimensionality complications for autism neur...

Introduction to Advanced Javascript

  • 1. Introduction to Advanced Javascript www.collaborationtech.co.in Bengaluru INDIA Presentation By Ramananda M.S Rao
  • 2. Content Content Overview Get Started OOPs Design Patterns Document Object Model(DOM) About Us www.collaborationtech.co.in
  • 3. Overview  object-oriented JavaScript is somewhat redundant, as the JavaScript language is completely object-oriented and is impossible to use otherwise.  Objects are the foundation of JavaScript. Virtually everything within the language is an object. Much of the power of the language is derived from this fact.  Design patterns are advanced object-oriented solutions to commonly occurring software problems. Patterns are about reusable designs and interactions of objects.  Each pattern has a name and becomes part of a vocabulary when discussing complex design solutions. www.collaborationtech.co.in
  • 4. Get Started OOPS Example: console.log('Hi'); function Person() {} var gosho = new Person(); // instance of Person var maria = new Person(); // another instance of Person gosho.name = "George"; maria.name = "Maria"; console.log(gosho.name); // George console.log(maria.name); // Maria www.collaborationtech.co.in
  • 5. Design Pattern Example: <!DOCTYPE html> <html> <head><title></title> <script> var TeslaModelS = function() { this.numWheels = 4; this.manufacturer = 'Tesla'; this.make = 'Model S'; } TeslaModelS.prototype = function() { var go = function() { document.write(“Hi Naveen");}; var stop = function() { document.write("Missing you so much"); }; return { pressBrakePedal: stop,pressGasPedal: go }}(); var test = new TeslaModelS() test.pressGasPedal(); test.pressBrakePedal(); </script> </head> <body> </body> </html> www.collaborationtech.co.in
  • 6. Design Pattern Example: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title></title> <script> function Shop() { this.construct = function(builder) { builder.step1(); builder.step2(); return builder.get();}} function CarBuilder() { this.car = null; this.step1 = function() { this.car = new Car(); }; this.step2 = function() { this.car.addParts(); }; this.get = function() {return this.car; }; } function TruckBuilder() {this.truck = null; this.step1 = function() { this.truck = new Truck(); }; www.collaborationtech.co.in
  • 7. Design Pattern this.step2 = function() { this.truck.addParts();}; this.get = function() { return this.truck;};} function Car() {this.doors = 0; this.addParts = function() {this.doors = 4;}; this.say = function() { log.add("I am a " + this.doors + "-door car");};} function Truck() {this.doors = 0; this.addParts = function() {this.doors = 2;}; this.say = function() {log.add("I am a " + this.doors + "-door truck"); };} www.collaborationtech.co.in
  • 8. Design Pattern // log helper var log = (function () { var log = ""; return { add: function (msg) { log += msg + "n"; }, show: function () { alert(log); log = ""; } }})(); function run() { var shop = new Shop(); var carBuilder = new CarBuilder(); var truckBuilder = new TruckBuilder(); var car = shop.construct(carBuilder); var truck = shop.construct(truckBuilder); car.say(); truck.say(); log.show(); } run(); </script> </head> <body> </body> </html> www.collaborationtech.co.in
  • 9. DOM <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>Shopping list</title> <style type="text/css"> p { color: yellow; font-family: "arial", sans-serif; font-size: 1.2em;} body { color: white; background-color: black;} #purchases { border: 1px solid white; background-color: #333; color: #ccc; padding: 1em;} #purchases li { font-weight: bold;} </style> </head> <body> <h1>What to buy</h1> <p title="a gentle reminder">Don't forget to buy this stuff.</p> <p>This is just a test</p> <ul id="purchases"> <li>A tin of beans</li> <li>Cheese</li> <li>Milk</li> </ul> <script type="text/JavaScript"> var paras = document.getElementsByTagName("p"); for (var i=0; i< paras.length; i++) { var title_text = paras[i].getAttribute("title"); if (title_text != null) { alert(title_text); }}</script> </body> </html> www.collaborationtech.co.in
  • 10. DOM <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>Image Gallery</title> </head> <body> <h1>Snapshots</h1> <ul> <li> <a href="images/fireworks.jpg" title="A fireworks display">Fireworks</a> </li> <li> <a href="images/coffee.jpg" title="A cup of black coffee">Coffee</a> </li> <li> <a href="images/rose.jpg" title="A red, red rose">Rose</a> </li> <li> <a href="images/bigben.jpg" title="The famous clock">Big Ben</a> </li> </ul> </body> </html> www.collaborationtech.co.in
  • 11. Follow us on Social Facebook: https://www.facebook.com/collaborationtechnologies/ Twitter : https://twitter.com/collaboration09 Google Plus : https://plus.google.com/100704494006819853579 LinkedIn : https://www.linkedin.com/in/ramananda-rao-a2012545 Instagram : https://instagram.com/collaborationtechnologies YouTube : https://www.youtube.com/channel/UCm9nK56LRbWSqcYWbzs8CUg Tumblr : https://collaborationtechnologies.tumblr.com/ Pinterest : https://in.pinterest.com/collaborationte/ Skype : facebook:ramananda.rao.7 WhatsApp : +91 9886272445 www.collaborationtech.co.in THANK YOU