JavaScript Promises Essentials Год: 2014 Автор: Rami Sarieddine Издательство: Packt Publishing ISBN: 978-1-78398-564-7 Язык: Английский Формат: PDF/EPUB/MOBI/AZW3 Качество: Изначально компьютерное (eBook) (Converted) Интерактивное оглавление: Да Количество страниц: 90 Описание: About This Book Integrate JavaScript Promises into your application by mastering the key concepts of the Promises API Replace complex nested callbacks in JavaScript with the more intuitive chained Promises Acquire the knowledge needed to start working with JavaScript Promises immediately Who This Book Is For If you are a JavaScript developer working with asynchronous operations and want to know more about promises, then this book is ideal for you. Having a detailed explanation of JavaScript promises will be perfect as your next step towards adopting this new standard and using the API in your web and JavaScript applications. What You Will Learn Implement asynchronous programming in JavaScript Get acquainted with the JavaScript Promises API Choose the right JavaScript libraries to use callbacks in a non-compatible platform Write chained asynchronous operations that are easy to manage Master WinJS Promises for developing Windows applications Differentiate between various implementations of promises in JavaScript Put promises into action in your applications Catch and handle errors effectively in asynchronous operations Explore browser support and platform compatibility for JavaScript promises In Detail Promises are a new programming paradigm in JavaScript that allow developers to request data that they don't have yet and deal with it at a non-determined point in the future (asynchronously). Starting with the basics of the promise objects, we'll be able to leverage the maximum capabilities of promises when writing applications. This book starts by giving you some background information on the asynchronous programming model in JavaScript, recognizing its importance in JavaScript programming. It then walks you through the key concepts and intricacies of the Promises API. Following that, you will learn how you can write complex asynchronous operations with chained promises and be able to catch and handle exceptions. With this book, you'll learn how to write better asynchronous operations using JavaScript promises.
Примеры страниц
Оглавление
Preface Chapter 1. JavaScript Promises – Why Should I Care? Asynchronous programming in JavaScript Why should I care about promises? Can’t I just use a callback? Chapter 2. The Promise API and Its Compatibility Getting to know the API Browser support and compatibility Checking the browser compatibility Libraries with promise-like features Chapter 3. Chaining of Promises Chaining like never before Chaining in sequence Chapter 4. Error Handling Exceptions and promises Handling errors with promises Chapter 5. Promises in WinJS Introducing WinJS Explaining the WinJS.Promise object Constructors Events Methods Using WinJS promises Chapter 6. Putting It All T ogether – Promises in Action Implementing a promise library Implementing the then method Defining a resolve method Implementing the doResolve function Wrapping the code Putting the promise into action Index
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum