Description
This book serves to deliver best practices and tools regarding ‘clean code’ for modern front-end development to ensure code and applications are easier, efficient and more cost effective to run. Looking at everything from the foundations of JavaScript and HTML to popular frameworks like React, all with a clear focus on accessibility (a11y), semantics, performance and the Green Web.
Using a web-based application as an example, we will begin to clean and improve the code base starting with JavaScript by adopting a functional style. Thanks to functional programming, the code will be divided into smaller, reusable and composable functions without side effects. Then, we will improve the HTML code base by applying "Disability Driven Design" patterns. Today, the web needs to be inclusive for all users so a11y must be at the center of everyone methods and projects, not just designers but programmers and engineers too. We shall focus on HTML semantics because with screen readers, we do not "see" the web page but we "hear" it. Hence the importance of choosing HTML elements not for its visuals but how it can fulfill a specific role or use. Once we have improved the low-level base, we move on to improving the architecture by also adopting a functional style (immutable, modular and composable).
At this level, we are ready to run our code and improve it. The web today needs to be green with better performance reducing loading time and the energy consumption of a site. For this, we will first look at some essential technical details such as understanding how the JavaScript engine works and memory management. Next, we will use some available tools to analyze and monitor runtime performance. Finally, we'll apply some tips and tricks to improve the perceived performance of our code. Lastly, we will look at how to best monitor performance in a continuous and scalable way using the right tools and project management approaches.
You Will Learn:
- The guiding principles of ‘clean code’ and how it applies to modern front-end development
- Explore in greater detail key focus areas of accessibility and green computing
- Understand how to make applications easier and more cost effective to run
- Learn about clean and sustainable development using JavaScript and React
This is for:
Programmers, Developers, Engineers and Product Managers who are looking at ways to make their applications run more smoothly and efficiently that will prevent costs spiralling out of control.
Book Information
ISBN 9798868810039
Author Héla Ben Khalfallah
Format Paperback
Page Count 200
Imprint APress
Publisher Springer-Verlag Berlin and Heidelberg GmbH & Co. KG