In Kevin Small’s excellent blog he informed ABAP developers that:
a) Its OK to take other programming languages seriously 🙂
c) You really need to learn this language
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…
- Chapter 1: Introduction
- Language origins, design influences, version history and available runtime environments
- Chapter 2: Data Types
- Chapter 3: Syntax
- Type Coercion
- Using Operators
- Declarations and Objects
- Chapter 4: Scope
- Variable Hoisting
- Function Declarations
- Lexical Scope
- Scope Chaining & Variable Lifespan
- Chapter 5: Functions
- Chapter 6: Inheritance
- Prototype Chaining
- Defining Your Own Prototype
- Chapter 7: Introduction To Functional Programming
- A Functional Programming Example
- Side Effects
- Changing Your Mind
- A SAPUI5 Example
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. 🙂
Hope that helps!