Learning Reactive Programming with Java 8
eBook - ePub

Learning Reactive Programming with Java 8

Nickolay Tsvetinov

Compartir libro
  1. 182 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

Learning Reactive Programming with Java 8

Nickolay Tsvetinov

Detalles del libro
Vista previa del libro
Índice
Citas

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es Learning Reactive Programming with Java 8 un PDF/ePUB en línea?
Sí, puedes acceder a Learning Reactive Programming with Java 8 de Nickolay Tsvetinov en formato PDF o ePUB, así como a otros libros populares de Computer Science y Application Development. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2015
ISBN
9781785288722
Edición
1

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.

Índice