Duration
3 days
Overview
JavaScript is a scripting language that is commonly used to create and control dynamic Website content along with its use in the Node.js runtime. This JavaScript training course provides the fundamental knowledge necessary to design and develop dynamic Web pages using JavaScript and to be able to grasp JavaScript libraries and frameworks such as jQuery, React and Angular. Students will learn the syntax of the JavaScript language and how to use JavaScript in a Web browser.
Objectives
- Learn the subleties and gotchas of JavaScript to be much more productive!
- Learn how global variables can trip you up
- Understand variable naming conventions
- Control JavaScripts automatic semi-colon insertion
- Learn how to use Ternary conditional logic
- Understand Compound Ternary logic
- Learn to implement Ternary logic that executes functions!
- Discover how to minimize DOM operations in your code
- Learn how the Chrome Dev Tools are your best friend
- Understand how the SOLID principles apply in JavaScript
Introduction
- An introduction to Javascript best practices & course content
- Call things by their name
- Easy, short and readable variable and function names
- Avoid globals
- Workarounds to avoid using globals
- Stick to a strict coding style
- Way to check the syntactical quality
- JSLint
- Clean and valid code
- Comment as much as needed but not more
- Messages to other developers
- Adding a double slash
- JavaDoc style
- Avoid mixing with other technologies
- CSS
- Adding a class called “error”
- Use shortcut notation when it makes sense
- Object Literal
- Using array shortcut
- Modularize — one function per task
- Create functions that fulfill one job at a time
- Debug and change your code without having to scan
- Creating helper functions for common tasks
- Enhance progressively
- Graceful degradation versus progressive enhancement
- Write code that works regardless of available technology
- To track how many users chose which option
- Allow for configuration and translation
- Create a configuration object
- CSS class and ID names
- Avoid heavy nesting
- Nesting code
- Variable names and loops
- Optimize loops
- Keep computation-heavy code outside loops
- Create the DOM nodes in the loop
- Avoid inserting them into the document
- Keep DOM access to a minimum
- Tool function that turns a string into DOM elements
- Don’t yield to browser whims
- Build code based on agreed standards
- Don’t trust any data
- Make sure that all the data that goes into your systems is clean
- To test the type of parameters sent to your functions
- Add functionality with JavaScript, don’t create too much content
- Inline HTML comments
- Translate and change the player without having to alter the JavaScript code
- Build on the shoulders of giants
- Working around cross-browser inconsistencies
- Patching browser support holes
- Development code is not live code
- Build script
- Summary
Programme scope, delivery arrangements and suitability are confirmed during enquiry.