0% found this document useful (0 votes)
236 views

Javascript For Abap Programmers: Chapter 1 - Introduction

Java script for ABAP 1

Uploaded by

hanumana_dasa
Copyright
© © All Rights Reserved
Available Formats
Download as PPSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
236 views

Javascript For Abap Programmers: Chapter 1 - Introduction

Java script for ABAP 1

Uploaded by

hanumana_dasa
Copyright
© © All Rights Reserved
Available Formats
Download as PPSX, PDF, TXT or read online on Scribd
You are on page 1/ 12

JavaScript for ABAP Programmers

Chapter 1 - Introduction
Chris Whealy / Technology RIG
JavaScript’s Name – And the Resulting Confusion…

JavaScript was first developed by Brendan Eich at Netscape in 1995 (in 10 days). Originally, this new
scripting language was called “Mocha”.
When Netscape Navigator 2.0 was shipped in September 1995, the language was renamed to
“LiveScript”.
However, when Netscape Navigator 2.0B3 was released on December 4th, 1995, Netscape made a
joint announcement with Sun Microsystems to the effect that Netscape’s new scripting language would
complement Sun Microsystem’s new Web application language Java; therefore, the new scripting
language would be called “JavaScript” – and this has caused no end of confusion ever since…
The bottom line is simply this…

JavaScript is NOT Java!

© 2015 SAP AG. All rights reserved. 2


JavaScript’s Linguistic Heritage

Over the course of the language’s development, various conceptual elements have been borrowed
from other languages to form what is now called JavaScript.

JavaScript

© 2015 SAP AG. All rights reserved. 3


JavaScript’s Linguistic Heritage

Over the course of the language’s development, various conceptual elements have been borrowed
from other languages to form what is now called JavaScript.

JavaScript

© 2015 SAP AG. All rights reserved. 4


JavaScript’s Linguistic Heritage

Over the course of the language’s development, various conceptual elements have been borrowed
from other languages to form what is now called JavaScript.

Scheme

JavaScript

© 2015 SAP AG. All rights reserved. 5


JavaScript’s Linguistic Heritage

Over the course of the language’s development, various conceptual elements have been borrowed
from other languages to form what is now called JavaScript.

Scheme

JavaScript

Perl

© 2015 SAP AG. All rights reserved. 6


JavaScript Standards

JavaScript was standardised by the European Computer Manufacturer’s Association (ECMA) in 1997.
JavaScript used in browsers is now considered to be only one implementation of the ECMA-262
specification.

Edition Date
1 June 1997
2 June 1998
3 December 1999
4 Abandoned
5 December 2009
5.1 June 2011
6 (Harmony) Work in progress
7 Work in progress

© 2015 SAP AG. All rights reserved. 7


JavaScript Runtime Engines

In order to execute a JavaScript program, a JavaScript Engine is needed.


Multiple implementations of JavaScript engines are available, with the most widely used being:

JavaScript Engine
Rhino (Mozilla)
SpiderMonkey (Mozilla)

Chakra (Microsoft)

V8 (Google)

Nitro (Apple)

© 2015 SAP AG. All rights reserved. 8


JavaScript Runtime: Client Side Implementations

Modern JavaScript engines have been designed to run either from within a web browser or as stand
alone, server-side execution engines.

Client Side Implementation JavaScript Engine

Mozilla Firefox SpiderMonkey (Mozilla)

Microsoft Internet Explorer Chakra (Microsoft)

Google Chrome V8 (Google)

Apple Safari Nitro (Apple)

© 2015 SAP AG. All rights reserved. 9


JavaScript Runtime: Server Side Implementations

There are multiple server-side implementations of JavaScript, many of which are based on Mozilla
Rhino (Java based). When speed is required however, Mozilla SpiderMonkey or the Google V8
engine are used instead.

Server Side Implementation JavaScript Engine

SpiderMonkey (Mozilla)

Accessible via Chakra (Microsoft)

V8 (Google)

Nitro (Apple)

© 2015 SAP AG. All rights reserved. 10


In A Nutshell – The Main Differences Between ABAP & JavaScript

Understanding the differences between ABAP and JavaScript is fundamental to transferring your
existing programming skills into JavaScript.
Some of the main differences are as follows:

ABAP JavaScript
Data typing Strong Weak
Syntax Similar to COBOL Derived mainly from Java with some influence from C
Variable Scope Block scope Lexical (or function) scope
“Function” No concept of a function as a Functions are 1st class citizens.
Concept data object That is, a function is an object with “an executable part”
Inheritance Model Class based Referential (or Prototypical)
Programming Style Strictly Imperative Both Imperative and Functional

© 2015 SAP AG. All rights reserved. 11


© 2015 SAP AG. All rights reserved.

No part of this publication may be reproduced or transmitted in any form or for any purpose without the express Google App Engine, Google Apps, Google Checkout, Google Data API, Google Maps, Google Mobile Ads,
permission of SAP AG. The information contained herein may be changed without prior notice. Google Mobile Updater, Google Mobile, Google Store, Google Sync, Google Updater, Google Voice,
Google Mail, Gmail, YouTube, Dalvik and Android are trademarks or registered trademarks of Google Inc.
Some software products marketed by SAP AG and its distributors contain proprietary software components of
other software vendors. INTERMEC is a registered trademark of Intermec Technologies Corporation.
Microsoft, Windows, Excel, Outlook, PowerPoint, Silverlight, and Visual Studio are registered trademarks of Wi-Fi is a registered trademark of Wi-Fi Alliance.
Microsoft Corporation.
Bluetooth is a registered trademark of Bluetooth SIG Inc.
IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, System z, System
Motorola is a registered trademark of Motorola Trademark Holdings LLC.
z10, z10, z/VM, z/OS, OS/390, zEnterprise, PowerVM, Power Architecture, Power Systems, POWER7,
POWER6+, POWER6, POWER, PowerHA, pureScale, PowerPC, BladeCenter, System Storage, Storwize, Computop is a registered trademark of Computop Wirtschaftsinformatik GmbH.
XIV, GPFS, HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, AIX, Intelligent Miner, WebSphere,
Tivoli, Informix, and Smarter Planet are trademarks or registered trademarks of IBM Corporation. SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP BusinessObjects Explorer, StreamWork,
SAP HANA, and other SAP products and services mentioned herein as well as their respective logos are
Linux is the registered trademark of Linus Torvalds in the United States and other countries. trademarks or registered trademarks of SAP AG in Germany and other countries.
Adobe, the Adobe logo, Acrobat, PostScript, and Reader are trademarks or registered trademarks of Adobe Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web
Systems Incorporated in the United States and other countries. Intelligence, Xcelsius, and other Business Objects products and services mentioned herein as well as their
respective logos are trademarks or registered trademarks of Business Objects Software Ltd. Business Objects
Oracle and Java are registered trademarks of Oracle and its affiliates.
is an SAP company.
UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.
Sybase and Adaptive Server, iAnywhere, Sybase 365, SQL Anywhere, and other Sybase products and services
Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or mentioned herein as well as their respective logos are trademarks or registered trademarks of Sybase Inc.
registered trademarks of Citrix Systems Inc. Sybase is an SAP company.
HTML, XML, XHTML, and W3C are trademarks or registered trademarks of W3C®, World Wide Web Crossgate, m@gic EDDY, B2B 360°, and B2B 360° Services are registered trademarks of Crossgate AG
Consortium, Massachusetts Institute of Technology. in Germany and other countries. Crossgate is an SAP company.
Apple, App Store, iBooks, iPad, iPhone, iPhoto, iPod, iTunes, Multi-Touch, Objective-C, Retina, Safari, Siri, All other product and service names mentioned are the trademarks of their respective companies. Data
and Xcode are trademarks or registered trademarks of Apple Inc. contained in this document serves informational purposes only. National product specifications may vary.
IOS is a registered trademark of Cisco Systems Inc. The information in this document is proprietary to SAP. No part of this document may be reproduced, copied,
or transmitted in any form or for any purpose without the express prior written permission of SAP AG.
RIM, BlackBerry, BBM, BlackBerry Curve, BlackBerry Bold, BlackBerry Pearl, BlackBerry Torch, BlackBerry
Storm, BlackBerry Storm2, BlackBerry PlayBook, and BlackBerry App World are trademarks or registered
trademarks of Research in Motion Limited.

© 2015 SAP AG. All rights reserved. 12

You might also like