Opleiding: JavaScript Development Advanced
Improve your JavaScript skills with advanced language features and techniques
Description
Deze training borduurt voort op onze training JavaScript Development Core. Waar we in die training aandacht besteden aan kernvaardigheden voor het werken met JavaScript, gaan we in deze training een stap verder door te focussen op geavanceerdere taalfeatures en technieken. Deze kennis en vaardigheden komen sterk van pas nu steeds meer projecten de kracht van "vanilla JavaScript" maximaal willen benutten. Ook op projecten waar met React, Svelte, TypeScript of testframeworks als Cypress en Playwright wordt gewerkt komen geavanceerde technieken van pas bij het structureren van code.
Je leert in deze training over het geavanceerd gebruik van functies met arrow functions en closures, het geavanceerd gebruik van objecten met encapsulatie en proxies, wat JavaScript's inheritance-mechanisme voor je kan betekenen, wanneer Symbols van pas komen, wat Sets en Maps voor voordeel bieden, hoe iterators en generators interessante perspectieven bieden voor loops en tenslotte alles over het wrappen van asynchroon werk met Promises.
Deze training richt zich op ontwikkelaars die al een goede basis van JavaScript hebben en deze willen aanvullen om het in te zetten in een professionele omgeving. Kennis van C#, Java of C++ komt ook van pas.
Learning Goals
- Describe different types of functions in JavaScript, including function declarations, function expressions, arrow functions, IIFE and constructor functions, and their appropriate use cases to write clearer and more efficient code. [Understand]
- Recognize the challenges of working with this inside a JavaScript application. [Remember]
- Explain the concept of prototypes and how prototypal inheritance allows for efficient object-oriented programming in JavaScript. [Understand]
- Express the reason for using Symbols and apply them to override features in the JavaScript runtime. [Apply]
- Differentiate between Sets and Maps to choose the appropriate data structure for managing collections of unique values and key-value pairs. [Analyze]
- Explain the iterator pattern and describe the role of generator functions in creating iterable sequences in JavaScript. [Analyze]
- Explain the benefits of using Promises and async/await for handling asynchronous operations in JavaScript. [Understand]
Subjects
Advanced functionsIn this module, you will learn about the advanced use of functions
Lessons
- Function properties
- Constructor functions
- The mystery of this unveiled
- Arrow functions
- IIFE's
- Closures
- Template literals
Lab: Advanced functions
After completing this module, students will be able to:
- Determine when to use a function and when to use an arrow function
- Reason about the value of this
- Utilize the advantages of arrow functions
- Understand libraries better an appropriate situation presents itself
In this module, you will learn what prototypes are and how you can apply them
Lessons
- Prototypes
- Prototype chain
- Set/change the prototype
- Inheritance
- super
Lab: Prototypes
After completing this module, students will be able to:
- Understand how prototypes work in JavaScript
- Use prototypes for inheritance of writing extension methods
- Understand how classes relate to prototypes
In this module, you will learn about Symbols: a value-type to uniquely address something
Lessons
- Symbols
- The value type
- Built-in symbols and the symbol registry
- Symbols and properties
- Libraries and symbols
Lab: Symbols
After completing this module, students will be able to:
- Use and write symbols
- Influence JavaScript's conversions using Symbol.toPrimitive()
In this module, you will learn about the built-in types Set and Map
Lessons
- Set en Map
- Their weaker counterparts, WeakSet en WeakMap
Lab: Sets en Maps
After completing this module, students will be able to:
- Use Set and Map when an appropriate situation presents itself
In this module, you will learn about iterating using iterators and generators
Lessons
- Iterators, Symbol.iterator() and the Iterator pattern
- Generators and yield
Lab: Iterators and generators
After completing this module, students will be able to:
- Use iterators en generators
- Implement the iterator pattern
- Create a generator
In this module, you will learn using objects in an advanced manner
Lessons
- Static functions on objects: Object.is(), Object.assign(), Object.keys() and more
- Proxy
- Reflect
- Encapsulation
- Garbage collection
Lab: Advanced objects
After completing this module, students will be able to:
- Use certain static functions when an appropriate situation presents itself
- Use Proxy to trap interactions
- Use Reflect for reflection-like functions
- Shield functions/properties in various ways from other bits of code
- Hook into the event of an object being garbage collected by the JavaScript-engine
In this module, you will learn about performing asynchronous work using promises
Lessons
- Creating and using promises
- Promise chaining
- Error handling
- Returning values
- Static functions like Promise.all(), Promise.allSettled() and more
- Useful techniques
- async/await
Lab: Asynchronously read the contents of multiple files
After completing this module, students will be able to:
- Create and use promises
- Implement error handling and chaining
- Deal with parallel promises
- Use async/await to improve readability
