Get the most out of JavaScript for building web applications through a series of patterns, techniques, and case studies for clean coding Key Features Write maintainable JS code using internal abstraction, well-written tests, and well-documented code Understand the agents of clean coding like SOLID principles, OOP, and functional programming Explore solutions to tackle common JavaScript challenges in building UIs, managing APIs, and writing states Book Description Building robust apps starts with creating clean code. In this book, you'll explore techniques for doing this by learning everything from the basics of JavaScript through to the practices of clean code. You'll write functional, intuitive, and maintainable code while also understanding how your code affects the end user and the wider community. The book starts with popular clean-coding principles such as SOLID, and the Law of Demeter (LoD), along with highlighting the enemies of writing clean code such as cargo culting and over-management. You'll then delve into JavaScript, understanding the more complex aspects of the language. Next, you'll create meaningful abstractions using design patterns, such as the Class Pattern and the Revealing Module Pattern. You'll explore real-world challenges such as DOM reconciliation, state management, dependency management, and security, both within browser and server environments. Later, you'll cover tooling and testing methodologies and the importance of documenting code. Finally, the book will focus on advocacy and good communication for improving code cleanliness within teams or workplaces, along with covering a case study for clean coding. By the end of this book, you'll be well-versed with JavaScript and have learned how to create clean abstractions, test them, and communicate about them via documentation. What you will learn Understand the true purpose of code and the problems it solves for your end-users and colleagues Discover the tenets and enemies of clean code considering the effects of cultural and syntactic conventions Use modern JavaScript syntax and design patterns to craft intuitive abstractions Maintain code quality within your team via wise adoption of tooling and advocating best practices Learn the modern ecosystem of JavaScript and its challenges like DOM reconciliation and state management Express the behavior of your code both within tests and via various forms of documentation Who this book is for This book is for anyone who writes JavaScript, professionally or otherwise. As this book does not relate specifically to any particular framework or environment, no prior experience of any JavaScript web framework is required. Some knowledge of programming is assumed to understand the concepts covered in the book more effectively. Table of Contents Setting the Scene The Tenets of Clean Code The Enemies of Clean Code SOLID and Other Principles Naming Things is Hard Primitive and Built-In Types Dynamic Typing Operators Parts of Syntax and Scope Control Flow Design Patterns Real-World Challenges The Landscape of Testing Writing Clean Tests Tools for Cleaner Code Documenting Your Code Other Peoples' Code Communication & Advocacy Case Study Combine the power of Angular, Bootstrap 4, FlexLayout, and Angular Material Design to build elegant user interfaces Key Features Learn to combine Angular 6 with Bootstrap 4 to design highly intuitive and responsive web interfaces Explore the design principles for professional web layout with Angular Material, Flexbox, and Bootstrap Avoid potential stumbling blocks in web development with the help of expert tips Book Description Angular and Bootstrap have undergone a major overhaul to embrace emerging web technologies that help developers build cutting-edge web applications. This book is for you if you're ready to enhance your web development skills beyond HTML and CSS. It begins with the basics of Angular and Bootstrap 4, along with an introduction to ES and TypeScript. You'll be able to refine your skills further with flex-layout's Responsive API to specify different layouts and sizing for various screen sizes. By using Angular Material, you'll discover how to make your web pages look professional. You'll study how to format output using Angular's pipes and use the built-in router to set up routes for all your components. With the help of Webpack, you'll be able to easily wrap up your project and use SASS to make things pretty. Furthermore, you can validate the forms you've built and debug your application. This book will also guide you in transitioning from Bootstrap to Angular smoothly, hooking up with a server, and using Firebase as the persistence layer. You'll not only develop the right skills, but also gain insights into the potential stumbling blocks and tips for how to avoid them. By the end of this book, you'll have a stunning e-commerce application running, along with the confidence to build your own applications. What you will learn Develop Angular single-page applications using an ecosystem of helper tools Get familiar with Bootstrap's new grid and helper classes Embrace TypeScript and ECMAScript to write more maintainable code Implement custom directives for Bootstrap 4 with the ng2-bootstrap library Understand the component-oriented structure of Angular and its router Use the built-in HTTP library to work with API endpoints Manage your app's data and state with observables and streams Combine Angular and Bootstrap 4 with Firebase to develop a solid example Who this book is for Whether you already know a little about Bootstrap or Angular or you're a complete beginner, this book will enhance your capabilities in both frameworks. I.. Get the most out of JavaScript for building web applications through a series of patterns, practices, and case studies in the service of clean coding Key Features Understand the true purpose of code and the problems it solves for your end-users and colleagues Discover the tenets and enemies of clean code considering the effects of cultural and syntactic conventions Use modern JavaScript syntax and design patterns to craft intuitive abstractions Maintain code quality within your team via wise adoption of tooling and advocating best practices Learn the modern ecosystem of JavaScript and its challenges like DOM reconciliation and state management Express the behavior of your code both within tests and via various forms of documentation About Building robust apps starts with creating clean code. In this book, you’ll explore techniques for doing this by learning everything from the basics of JavaScript through to the practices of clean code. You’ll write functional, intuitive, and maintainable code while also understanding how your code affects the end user and the wider community. The book starts with popular clean-coding principles such as SOLID, and the Law of Demeter (LoD), along with highlighting the enemies of writing clean code such as cargo culting and over-management. You’ll then delve into JavaScript, understanding the more complex aspects of the language. Next, you’ll create meaningful abstractions using design patterns, such as the Class Pattern and the Revealing Module Pattern. You’ll explore real-world challenges such as DOM reconciliation, state management, dependency management, and security, both within browser and server environments. Later, you’ll cover tooling and testing methodologies and the importance of documenting code. Finally, the book will focus on advocacy and good communication for improving code cleanliness within teams or workplaces, along with covering a case study for clean coding. By the end of this book, you’ll be well-versed with JavaScript and have learned how to create clean abstractions, test them, and communicate about them via documentation. Features Write maintainable JS code using internal abstraction, well-written tests, and well-documented code Understand the agents of clean coding like SOLID principles, OOP, and functional programming Explore solutions to tackle common JavaScript challenges in building UIs, managing APIs, and writing states Learn how to build dynamic schema-driven forms with Vue from scratch Key Features Understand the basics of form component composition Scale and integrate your forms with libraries such as Vuex and Vuelidate Convert any form into a self-generated schema-driven app Book Description Almost every web application and site out there handles user input in one way or another, from registration forms and log-in handling to registration and landing pages. Building Forms with Vue.js follows a step-by-step approach to help you create an efficient user interface (UI) and seamless user experience (UX) by building quick and easy-to-use forms. You'll get off to a steady start by setting up the demo project. Next, you'll get to grips with component composition from creating reusable form components through to implementing the custom input components. To further help you develop a convenient user input experience, the book will show you how to enhance custom inputs with v-mask. As you progress, you'll get up to speed with using Vuelidate and Vuex to effectively integrate your forms. You'll learn how to create forms that use global state, reactive instant user input validation and input masking, along with ensuring that they are completely schema-driven and connected to your application's API. Every chapter builds on the concepts learned in the previous chapter, while also allowing you to skip ahead to the topics you're most interested in. By the end of this book, you will have gained the skills you need to transform even the simplest form into a crafted user and developer experience with Vue. What you will learn Learn all about the basics of creating reusable form components with the Vue framework Understand v-model and how it plays a role in form creation Create forms that are completely powered and generated by a schema, either locally or from an API endpoint Understand how Vuelidate allows for easy declarative validation of all your form's inputs with Vue's reactivity system Connect your application with a Vuex-powered global state management Use the v-mask library to enhance your inputs and improve user experience (UX) Who this book is for If you are a developer with basic Vue experience who wants to enhance your forms, then this book is for you. No previous experience with any of the libraries used in the book is required Clean coding is an important skill in the portfolio of any developer willing to write reliable and intuitive code. This book presents principles, patterns, anti-patterns, and practices supported by use cases and directions for writing clean JavaScript code. It helps you refactor your legacy codebase in JavaScript and modernize your web apps. Building forms with Vue.js will guide you step by step to transform your online forms into a schema driven powerhouse. With the use of some of the core and most popular libraries you will be able to go from zero to hero.