Learning Reactive Programming with Java 8
eBook - ePub

Learning Reactive Programming with Java 8

Nickolay Tsvetinov

Partager le livre
  1. 182 pages
  2. English
  3. ePUB (adapté aux mobiles)
  4. Disponible sur iOS et Android
eBook - ePub

Learning Reactive Programming with Java 8

Nickolay Tsvetinov

DĂ©tails du livre
Aperçu du livre
Table des matiĂšres
Citations

Foire aux questions

Comment puis-je résilier mon abonnement ?
Il vous suffit de vous rendre dans la section compte dans paramĂštres et de cliquer sur « RĂ©silier l’abonnement ». C’est aussi simple que cela ! Une fois que vous aurez rĂ©siliĂ© votre abonnement, il restera actif pour le reste de la pĂ©riode pour laquelle vous avez payĂ©. DĂ©couvrez-en plus ici.
Puis-je / comment puis-je télécharger des livres ?
Pour le moment, tous nos livres en format ePub adaptĂ©s aux mobiles peuvent ĂȘtre tĂ©lĂ©chargĂ©s via l’application. La plupart de nos PDF sont Ă©galement disponibles en tĂ©lĂ©chargement et les autres seront tĂ©lĂ©chargeables trĂšs prochainement. DĂ©couvrez-en plus ici.
Quelle est la différence entre les formules tarifaires ?
Les deux abonnements vous donnent un accĂšs complet Ă  la bibliothĂšque et Ă  toutes les fonctionnalitĂ©s de Perlego. Les seules diffĂ©rences sont les tarifs ainsi que la pĂ©riode d’abonnement : avec l’abonnement annuel, vous Ă©conomiserez environ 30 % par rapport Ă  12 mois d’abonnement mensuel.
Qu’est-ce que Perlego ?
Nous sommes un service d’abonnement Ă  des ouvrages universitaires en ligne, oĂč vous pouvez accĂ©der Ă  toute une bibliothĂšque pour un prix infĂ©rieur Ă  celui d’un seul livre par mois. Avec plus d’un million de livres sur plus de 1 000 sujets, nous avons ce qu’il vous faut ! DĂ©couvrez-en plus ici.
Prenez-vous en charge la synthÚse vocale ?
Recherchez le symbole Écouter sur votre prochain livre pour voir si vous pouvez l’écouter. L’outil Écouter lit le texte Ă  haute voix pour vous, en surlignant le passage qui est en cours de lecture. Vous pouvez le mettre sur pause, l’accĂ©lĂ©rer ou le ralentir. DĂ©couvrez-en plus ici.
Est-ce que Learning Reactive Programming with Java 8 est un PDF/ePUB en ligne ?
Oui, vous pouvez accĂ©der Ă  Learning Reactive Programming with Java 8 par Nickolay Tsvetinov en format PDF et/ou ePUB ainsi qu’à d’autres livres populaires dans Computer Science et Application Development. Nous disposons de plus d’un million d’ouvrages Ă  dĂ©couvrir dans notre catalogue.

Informations

Année
2015
ISBN
9781785288722

Learning Reactive Programming with Java 8


Table of Contents

Learning Reactive Programming with Java 8
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. An Introduction to Reactive Programming
What is reactive programming?
Why should we be reactive?
Introducing RxJava
Downloading and setting up RxJava
Comparing the iterator pattern and the RxJava Observable
Implementing the reactive sum
Summary
2. Using the Functional Constructions of Java 8
Lambdas in Java 8
Introducing the new syntax and semantics
Functional interfaces in Java 8 and RxJava
Implementing the reactive sum example with lambdas
Pure functions and higher order functions
Pure functions
Higher order functions
RxJava and functional programming
Summary
3. Creating and Connecting Observables, Observers, and Subjects
The Observable.from method
The Observable.just method
Other Observable factory methods
The Observable.create method
Subscribing and unsubscribing
Hot and cold Observable instances
The ConnectableObservable class
The Subject instances
Summary
4. Transforming, Filtering, and Accumulating Your Data
Observable transformations
Transformations with the various flatMap operators
Grouping items
Additional useful transformation operators
Filtering data
Accumulating data
Summary
5. Combinators, Conditionals, and Error Handling
Combining the Observable instances
The zip operator
The combineLatest operator
The merge operator
The concat operator
The conditional operators
The amb operator
The takeUntil(), takeWhile(), skipUntil(), and skipWhile() conditional operators
The defaultIfEmpty( ) operator
Handling errors
The return and resume operators
The retrying technique
An HTTP client example
Summary
6. Using Concurrency and Parallelism with Schedulers
RxJava's schedulers
Debugging Observables and their schedulers
The interval Observable and its default scheduler
Types of schedulers
The Schedulers.immediate scheduler
The Schedulers.trampoline scheduler
The Schedulers.newThread scheduler
The Schedulers.computation scheduler
The Schedulers.io scheduler
The Schedulers.from(Executor) method
Combining Observables and schedulers
The Observable<T> subscribeOn(Scheduler) method
The Observable<T> observeOn(Scheduler) operator
Parallelism
Buffering, throttling, and debouncing
Throttling
Debouncing
The buffer and window operators
The backpressure operators
Summary
7. Testing Your RxJava Application
Testing using simple subscription
The BlockingObservable class
The aggregate operators and the BlockingObservable class
Testing with the aggregate operators and the BlockingObservable class
Using the TestSubscriber class for in-depth testing
Testing asynchronous Observable instances with the help of the TestScheduler class
Summary
8. Resource Management and Extending RxJava
Resource management
Introducing the Observable.using method
Caching data with Observable.cache
Creating custom operators with lift
Composing multiple operators with the Observable.compose operator
Summary
Index

Learning Reactive Programming with Java 8

Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: June 2015
Production reference: 1170615
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78528-872-2
www.packtpub.com

Credits

Author
Nickolay Tsvetinov
Reviewers
Samuel Gruetter
DĂĄvid Karnok
Timo Tuominen
Shixiong Zhu
Commissioning Editor
Veena Pagare
Acquisition Editor
Larrisa Pinto
Content Development Editor
Adrian Raposo
Technical Editor
Abhishek R. Kotian
Copy Editors
Brandt D'mello
Neha Vyas
Project Coordinator
Sanchita Mandal
Proofreader
Safis Editing
Indexer
Mariammal Chettiyar
Production Coordinator
Conidon Miranda
Cover Work
Conidon Miranda

About the Author

Nickolay Tsvetinov is a professional all-round web developer at TransportAPI—Britain's first comprehensive open platform for transport solutions. During his career as a software developer, he experienced both good and bad and played with most of the popular programming languages—from C and Java to Ruby and JavaScript. For the last 3-4 years, he's been creating and maintaining single-page applications (SPA) and the backend API architectures that serve them. He is a fan of open source software, Rails, Vim, Sinatra, Ember.js, Node.js, and Nintendo. He was an unsuccessful musician and poet, but he is a successful husband and father. His area of interest and expertise includes the declarative/functional and reactive programming that resulted in the creation of ProAct.js (http://proactjs.com), which is a library that augments the JavaScript language and turns it into a reactive language.

Table des matiĂšres