Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member181883
Active Participant

Calling all ABAP developers who need/want to learn JavaScript...

In Kevin Small's excellent blog he informed ABAP developers that:

a) Its OK to take other programming languages seriously   🙂

b) JavaScript is one such language

c) You really need to learn this language

So for those ABAPers who now want to take the next step and plunge into the low-level details of the language, I have updated the JavaScript language training material that was originally published in this blog.

<updates>

The link in the paragraph below starting "All seven chapters..." now points to the updated ZIP file.

Since functional programming is slowly, but surely moving into the consciousness of the imperative programming world, I thought it appropriate to update and extend the final chapter of this training material to cover some basic concepts in functional programming.  This amounts to taking you through a conceptual transition from knowing how to use for loops, to understanding how to use the map, reduce and filter functions.

This however, is only scratching the surface.  Functional programming is certainly much, much more than simply throwing in the odd map or reduce function, but it is also certainly nothing less.

What is not covered are topics like partial functions, function composition and (dare I mention the M word) Monads...

These topics really are the heart of functional programming, but since functional programming is based on a completely different mental approach to how your software is built, many people find the concepts harder to grasp because they must first unlearn their existing way of thinking - and this doesn't happen in your lunch break.  Also the concepts of functional programming do not fit so easily with the architecture of SAPUI5 based applications; therefore, I have not attempted to deal with them here.  Nonetheless, simply getting your brain around map, reduce and filter is a vital first step.

Also what is not covered is topics like asynchronous programming with Promises, or any of the new features in ES 6.

If I get time, I'll cover these topics in the future...

</updates>

One of the main conceptual differences ABAPers will need to understand is that fact that JavaScript is a highly dynamic language!  This then requires you to think in a completely different manner about how you construct your software.  I attempt to explain the differences in a step-by-step manner, without asking you to make any leaps of understanding.

These slides cover the JavaScript language from the ground up and have been designed with the assumption that the reader has no prior knowledge of the language.  You will be guided in gradual steps from the simplest concepts of language syntax and data types, right up to advanced topics such as creating prototype chains and the use of the functional programming style (as opposed to the more familiar imperative programming style used by ABAP)

Chapter 1: Introduction
Language origins, design influences, version history and available runtime environments
Chapter 2: Data Types
JavaScript's approach to data typing (weak vs. strong), and the 6 JavaScript data types: Null, Undefined, Boolean, String, Number and Object
Chapter 3: Syntax
  1. Operators
  2. Type Coercion
  3. Using Operators
  4. Declarations and Objects
  5. Arrays
Chapter 4: Scope
  1. Declarations
  2. Variable Hoisting
  3. Function Declarations
  4. Lexical Scope
  5. Scope Chaining & Variable Lifespan
Chapter 5: Functions
Chapter 6: Inheritance
  1. Prototype Chaining
  2. Defining Your Own Prototype
Chapter 7: Introduction To Functional Programming
  1. Operators
  2. A Functional Programming Example
  3. Side Effects
  4. Changing Your Mind
  5. A SAPUI5 Example
  6. Summary

Since these slides are focused only on the JavaScript language itself, they do not cover the use of JavaScript within the specific context of a browser (E.G. DOM programming and event handling are not covered); neither are JavaScript frameworks such as jQuery, Sencha or SAPUI5 covered. These subsequent topics should be addressed only after you have built a solid foundation in the language itself.  For instance, once you have gone through these slides, you will be completely ready to start SAPUI5 training.

All seven chapters are contained in this ZIP file in PowerPoint SlideShare format.  Because the low level details of learning a language can be rather dry, I've taken a somewhat tongue-in-cheek approach and thrown in a few amusing comments and asides just to lighten things up.  🙂

Unfortunately, I have had no time to create any exercises to accompany these slides; however, if you open the Chrome or Firefox browser and then open the Developer Tools, you will have access to a JavaScript console in which you can execute JavaScript commands and create simple objects.

Alternatively, if you're feeling somewhat more adventurous, you could install NodeJS and then have a JavaScript runtime environment that does not require a browser (server-side JavaScript).

Hope that helps!

Chris W

67 Comments