The document discusses reactive programming in Android using RxJava. It explains that RxJava allows composing asynchronous data streams through Observables and Subscribers. It avoids callback hell by treating callbacks as streams. Operations like mapping, filtering can be done through various RxJava operators to transform data streams. It also discusses key RxJava concepts like Observables, Subscribers, Schedulers for controlling thread execution.
This document summarizes new features in Java 9 including Jshell for interactive coding, private methods in interfaces, factory methods for immutable collections, enhancements to try-with-resources, the Java Platform Module System (JPMS), Jlink for creating custom runtime images, and updates to the HTTP client and Process APIs. Key areas covered include modularization of the JDK, creating custom runtimes, improved resource management, and support for HTTP/2.
This presentation provides an overview of using the Java SE 8 Date & Time API. It covers how to:
1. Create and manage date-based and time-based events including a combination of date and time into a single object using LocalDate, LocalTime, LocalDateTime, Instant, Period, and Duration
2. Work with dates and times across timezones and manage changes resulting from daylight savings including format date and times values
3. Define and create and manage date-based and time-based events using Instant, Period, Duration, and TemporalUnit
La tecnología Java es un lenguaje de programación orientado a objetos que se ejecuta en una máquina virtual, lo que permite que el código Java sea portable entre sistemas operativos. Java proporciona características como encapsulamiento, herencia, polimorfismo y manejo automático de memoria a través de un recolector de basura.
The document discusses JUnit 5, the next generation of the JUnit testing framework for Java. Key aspects include a new programming model using extensions, support for Java 8 features, and ways to migrate from earlier JUnit versions. The new framework consists of the JUnit Platform launcher, the JUnit Jupiter API for writing tests, and the JUnit Vintage engine for running JUnit 3 and 4 tests.
Este documento presenta conceptos fundamentales sobre las sentencias de control IF y WHILE en Java. Explica el uso de IF para ejecutar instrucciones condicionalmente y de WHILE para crear bucles. Incluye ejemplos de flujos de procesos y código para animar un conejo que salta, dice frases y se detiene dependiendo de si choca con obstáculos. También propone actividades prácticas opcionales para aplicar los conceptos con otros objetos en diferentes escenarios.
Mockito is a mocking framework for Java that allows developers to focus tests on interactions between objects rather than states. It provides test doubles like mocks and spies to simulate dependencies and verify expected interactions. Mockito allows mocking method calls and configuring return values or exceptions to test different scenarios. It provides default values for unstubbed calls to avoid overspecifying tests.
Este documento proporciona instrucciones para crear animaciones utilizando herramientas como guiones gráficos, diagramas de flujo y pruebas. Recomienda diseñar detalladamente las animaciones antes de codificarlas y realizar pruebas frecuentes mientras se desarrolla el código para identificar errores. También ofrece consejos para presentar con éxito las animaciones terminadas ante clientes.
JUnit: A unit testing framework that is extensively used to test the code written in Java.
Unit testing is a type of software testing.
Software testing: The process of examining whether the software and its components meet the specified requirements
Other types of software testing are as shown.
This document summarizes new features in Java 9 including Jshell for interactive coding, private methods in interfaces, factory methods for immutable collections, enhancements to try-with-resources, the Java Platform Module System (JPMS), Jlink for creating custom runtime images, and updates to the HTTP client and Process APIs. Key areas covered include modularization of the JDK, creating custom runtimes, improved resource management, and support for HTTP/2.
This presentation provides an overview of using the Java SE 8 Date & Time API. It covers how to:
1. Create and manage date-based and time-based events including a combination of date and time into a single object using LocalDate, LocalTime, LocalDateTime, Instant, Period, and Duration
2. Work with dates and times across timezones and manage changes resulting from daylight savings including format date and times values
3. Define and create and manage date-based and time-based events using Instant, Period, Duration, and TemporalUnit
La tecnología Java es un lenguaje de programación orientado a objetos que se ejecuta en una máquina virtual, lo que permite que el código Java sea portable entre sistemas operativos. Java proporciona características como encapsulamiento, herencia, polimorfismo y manejo automático de memoria a través de un recolector de basura.
The document discusses JUnit 5, the next generation of the JUnit testing framework for Java. Key aspects include a new programming model using extensions, support for Java 8 features, and ways to migrate from earlier JUnit versions. The new framework consists of the JUnit Platform launcher, the JUnit Jupiter API for writing tests, and the JUnit Vintage engine for running JUnit 3 and 4 tests.
Este documento presenta conceptos fundamentales sobre las sentencias de control IF y WHILE en Java. Explica el uso de IF para ejecutar instrucciones condicionalmente y de WHILE para crear bucles. Incluye ejemplos de flujos de procesos y código para animar un conejo que salta, dice frases y se detiene dependiendo de si choca con obstáculos. También propone actividades prácticas opcionales para aplicar los conceptos con otros objetos en diferentes escenarios.
Mockito is a mocking framework for Java that allows developers to focus tests on interactions between objects rather than states. It provides test doubles like mocks and spies to simulate dependencies and verify expected interactions. Mockito allows mocking method calls and configuring return values or exceptions to test different scenarios. It provides default values for unstubbed calls to avoid overspecifying tests.
Este documento proporciona instrucciones para crear animaciones utilizando herramientas como guiones gráficos, diagramas de flujo y pruebas. Recomienda diseñar detalladamente las animaciones antes de codificarlas y realizar pruebas frecuentes mientras se desarrolla el código para identificar errores. También ofrece consejos para presentar con éxito las animaciones terminadas ante clientes.
JUnit: A unit testing framework that is extensively used to test the code written in Java.
Unit testing is a type of software testing.
Software testing: The process of examining whether the software and its components meet the specified requirements
Other types of software testing are as shown.
An Introduction to JUnit 5 and how to use it with Spring boot tests and Mockitoshaunthomas999
This document provides an overview of JUnit 5, including its components and features. It introduces JUnit 5 as an improvement over JUnit 4, released in 2017 to work with Java 8+. JUnit 5 consists of the Platform, Jupiter, and Vintage. The Platform provides test discovery and execution. Jupiter supports writing new tests with annotations and extensions. Vintage allows running old JUnit 3 & 4 tests on the platform. New features discussed include assertions, assumptions, display names, tags, repetition, and parameterization. It also covers using JUnit 5 with Spring tests and Mockito.
Unit testing involves writing code to test individual units or components of an application to ensure they operate as intended. A unit test targets a specific function or class and ensures the code works correctly. A test suite is a collection of test cases that test a module. Frameworks like JUnit simplify the unit testing process and allow for test automation. JUnit tests are created in the same project structure with a "Test" suffix and use annotations to define test cases and suites. Tests can then be run and results analyzed to measure code coverage.
Introduction to Design Patterns and SingletonJonathan Simon
This is Class 1 on a 6 week course I taught on Software Design Patterns.
This course provides an introduction into Design Patterns and delves into the Singleton Pattern.
Class based on "Head First Design Patterns."
Java Classes | Java Tutorial for Beginners | Java Classes and Objects | Java ...Edureka!
This Edureka 'Java Classes' tutorial will take you through in-depth details of Java classes and different key-components in Java. It is ideal for both beginners and professionals who want to learn or brush up the basics of Java. Below are the topics covered in this tutorial:
1. Classes in Java
2. Constructors
3. Structure of a Class
4. Overview of Objects
5. Working with Objects
6. Multiple classes
7. OOPS concepts: Inheritance, Encapsulation, Abstraction, Interface
This document discusses test-driven development and unit testing with JUnit. It covers:
- Writing tests before code using stubs, so code is testable and requirements are clear.
- Key aspects of JUnit like test classes, fixtures, assertions and annotations like @Before, @Test.
- Best practices like testing individual methods, writing simple tests first, and repeating the test-code cycle until all tests pass.
- Features of JUnit in Eclipse like generating test stubs from code and viewing test results.
The overall message is that testing saves significant time versus debugging, helps write better code, and is an essential part of the development process. Tests should cover all requirements and edge cases to
The document provides an overview of new features in Java 9, including:
- The introduction of a module system that divides the JDK into smaller modules, allowing applications to only use necessary modules.
- Private methods can now be defined in interfaces to avoid redundant code.
- Multi-release JAR files allow libraries to support multiple Java versions.
- Various commands are described to work with the new module system, such as listing modules, describing modules, compiling modular code, and creating a custom JRE with only required modules.
Test Driven Development (TDD) Preso 360|Flex 2010guest5639fa9
This document discusses Test Driven Development (TDD) using FlexUnit 4. It provides an overview of TDD and its benefits. It then walks through an example of building a Twitter client application using TDD. It demonstrates how to create test suites and test cases, write tests to fail initially, then write code to pass the tests. It covers concepts like user stories, assertions, refactoring tests. The document recommends TDD for APIs, frameworks and services, but not GUI testing. It provides resources to learn more about TDD with FlexUnit 4 and Adobe technologies.
This year ECMA International will be ratifying the biggest update to the JavaScript language in its history. In this talk we'll look at key features already appearing in browsers as well as those coming in the near future. We'll also explore how you can begin leveraging the power of ES6 across all browsers today. If you haven't looked at JavaScript recently, you soon realize that a bigger, better world awaits.
RxJava is a library for composing asynchronous and event-based programs using observable sequences for the Java VM. It provides APIs for asynchronous programming with observable streams. Reactive Extensions (Rx) is a library that supports reactive programming with observable streams in many languages. Netflix adopted RxJava to address issues with its legacy API and improve performance of its services. RxJava uses Observables to build responsive and resilient applications in a reactive style.
This document discusses procedures, functions, and packages in PL/SQL. It defines that procedures do not return values while functions do. It provides examples of how to create and call procedures and functions that take in arguments and return values. It also explains how to define packages, which can contain groups of procedures and functions, through a package specification and package body.
This document provides an overview of an introductory C# programming course. The course covers C# fundamentals like setting up a development environment, data types, conditionals, loops, object-oriented programming concepts, and data structures. It includes topics like installing Visual Studio, writing a "Hello World" program, built-in data types like string, integer, boolean, and more. The document also outlines sample code solutions for exercises on command line arguments, integer operations, leap year finder, and powers of two.
Java 10 contains several new features including local variable type inference using the var keyword, time-based release versioning, improved support for Docker containers, and various library enhancements. It focuses on improving performance and usability. Some notable changes include local variable type inference for concise code, parallel full GC for the G1 collector to reduce latency, and application data sharing to improve startup times.
The document provides an overview of core Java basics. It discusses that Java was originally developed by Sun Microsystems and the latest release is Java SE 8. It also explains that Java is object-oriented, platform independent, simple, architecture neutral, portable, robust, multithreaded, interpreted and distributed. The document then discusses Java environment setup, basic syntax including classes, objects and methods. It also covers primitive data types, constructors, OOP concepts like abstraction, encapsulation, inheritance and polymorphism.
The document discusses exception handling in C++. It defines an exception as an error that occurs during runtime. C++ includes a built-in exception handling mechanism using try, catch, and throw keywords. Code that can generate exceptions is placed in a try block. If an exception occurs, it is thrown using throw and caught using catch, where it can be processed. Exceptions are objects belonging to a specific class. Multiple catch blocks can handle different exception types in order. A catch-all block using ellipses (...) can handle any exception.
The document discusses various looping constructs in Java including for, while, do-while loops as well as decision making statements like if, if-else, switch. It provides the syntax and examples of each. The key loops covered are for, which allows looping a specific number of times, while which checks a condition before running the loop body, and do-while which runs the body at least once. The document also discusses break and continue keywords that can be used within loops. For decision making, it explains if, if-else-if-else for multiple conditions, and switch for equality checks. Nested if statements are also covered.
Java Multithreading Using Executors FrameworkArun Mehra
This document provides an overview of using executors to handle multithreading in Java. It discusses key classes and interfaces in the executors framework like Executor, ExecutorService, and Executors. Common thread pools like fixed thread pool and cached thread pool are mentioned. The document also summarizes techniques for naming threads, returning values from threads, creating daemon threads, checking thread status, terminating threads, and handling uncaught exceptions using both the thread and executor APIs. Finally, it covers scheduling tasks using both the timer/timerTask classes and executor service.
1. O documento apresenta os fundamentos de programação concorrente em Java, incluindo threads, a interface Runnable, como iniciar novos threads, interrupção de threads, espera de threads e problemas de corrida.
2. A segunda parte aborda a API de concorrência do Java, incluindo classes e interfaces do pacote java.util.concurrent.
3. O documento fornece exemplos de código para ilustrar os principais conceitos de programação concorrente em Java.
Building Scalable Stateless Applications with RxJavaRick Warren
RxJava is a lightweight open-source library, originally from Netflix, that makes it easy to compose asynchronous data sources and operations. This presentation is a high-level intro to this library and how it can fit into your application.
The document discusses reactive programming and how it can be used on Android. It explains that reactive programming uses observable sequences and asynchronous data flows. It introduces RxJava as a library for reactive programming that uses Observables to compose flows of asynchronous data. It provides examples of how RxJava can be used on Android to perform background tasks, handle errors and activity lifecycles, load images asynchronously, and create and transform Observables.
An Introduction to JUnit 5 and how to use it with Spring boot tests and Mockitoshaunthomas999
This document provides an overview of JUnit 5, including its components and features. It introduces JUnit 5 as an improvement over JUnit 4, released in 2017 to work with Java 8+. JUnit 5 consists of the Platform, Jupiter, and Vintage. The Platform provides test discovery and execution. Jupiter supports writing new tests with annotations and extensions. Vintage allows running old JUnit 3 & 4 tests on the platform. New features discussed include assertions, assumptions, display names, tags, repetition, and parameterization. It also covers using JUnit 5 with Spring tests and Mockito.
Unit testing involves writing code to test individual units or components of an application to ensure they operate as intended. A unit test targets a specific function or class and ensures the code works correctly. A test suite is a collection of test cases that test a module. Frameworks like JUnit simplify the unit testing process and allow for test automation. JUnit tests are created in the same project structure with a "Test" suffix and use annotations to define test cases and suites. Tests can then be run and results analyzed to measure code coverage.
Introduction to Design Patterns and SingletonJonathan Simon
This is Class 1 on a 6 week course I taught on Software Design Patterns.
This course provides an introduction into Design Patterns and delves into the Singleton Pattern.
Class based on "Head First Design Patterns."
Java Classes | Java Tutorial for Beginners | Java Classes and Objects | Java ...Edureka!
This Edureka 'Java Classes' tutorial will take you through in-depth details of Java classes and different key-components in Java. It is ideal for both beginners and professionals who want to learn or brush up the basics of Java. Below are the topics covered in this tutorial:
1. Classes in Java
2. Constructors
3. Structure of a Class
4. Overview of Objects
5. Working with Objects
6. Multiple classes
7. OOPS concepts: Inheritance, Encapsulation, Abstraction, Interface
This document discusses test-driven development and unit testing with JUnit. It covers:
- Writing tests before code using stubs, so code is testable and requirements are clear.
- Key aspects of JUnit like test classes, fixtures, assertions and annotations like @Before, @Test.
- Best practices like testing individual methods, writing simple tests first, and repeating the test-code cycle until all tests pass.
- Features of JUnit in Eclipse like generating test stubs from code and viewing test results.
The overall message is that testing saves significant time versus debugging, helps write better code, and is an essential part of the development process. Tests should cover all requirements and edge cases to
The document provides an overview of new features in Java 9, including:
- The introduction of a module system that divides the JDK into smaller modules, allowing applications to only use necessary modules.
- Private methods can now be defined in interfaces to avoid redundant code.
- Multi-release JAR files allow libraries to support multiple Java versions.
- Various commands are described to work with the new module system, such as listing modules, describing modules, compiling modular code, and creating a custom JRE with only required modules.
Test Driven Development (TDD) Preso 360|Flex 2010guest5639fa9
This document discusses Test Driven Development (TDD) using FlexUnit 4. It provides an overview of TDD and its benefits. It then walks through an example of building a Twitter client application using TDD. It demonstrates how to create test suites and test cases, write tests to fail initially, then write code to pass the tests. It covers concepts like user stories, assertions, refactoring tests. The document recommends TDD for APIs, frameworks and services, but not GUI testing. It provides resources to learn more about TDD with FlexUnit 4 and Adobe technologies.
This year ECMA International will be ratifying the biggest update to the JavaScript language in its history. In this talk we'll look at key features already appearing in browsers as well as those coming in the near future. We'll also explore how you can begin leveraging the power of ES6 across all browsers today. If you haven't looked at JavaScript recently, you soon realize that a bigger, better world awaits.
RxJava is a library for composing asynchronous and event-based programs using observable sequences for the Java VM. It provides APIs for asynchronous programming with observable streams. Reactive Extensions (Rx) is a library that supports reactive programming with observable streams in many languages. Netflix adopted RxJava to address issues with its legacy API and improve performance of its services. RxJava uses Observables to build responsive and resilient applications in a reactive style.
This document discusses procedures, functions, and packages in PL/SQL. It defines that procedures do not return values while functions do. It provides examples of how to create and call procedures and functions that take in arguments and return values. It also explains how to define packages, which can contain groups of procedures and functions, through a package specification and package body.
This document provides an overview of an introductory C# programming course. The course covers C# fundamentals like setting up a development environment, data types, conditionals, loops, object-oriented programming concepts, and data structures. It includes topics like installing Visual Studio, writing a "Hello World" program, built-in data types like string, integer, boolean, and more. The document also outlines sample code solutions for exercises on command line arguments, integer operations, leap year finder, and powers of two.
Java 10 contains several new features including local variable type inference using the var keyword, time-based release versioning, improved support for Docker containers, and various library enhancements. It focuses on improving performance and usability. Some notable changes include local variable type inference for concise code, parallel full GC for the G1 collector to reduce latency, and application data sharing to improve startup times.
The document provides an overview of core Java basics. It discusses that Java was originally developed by Sun Microsystems and the latest release is Java SE 8. It also explains that Java is object-oriented, platform independent, simple, architecture neutral, portable, robust, multithreaded, interpreted and distributed. The document then discusses Java environment setup, basic syntax including classes, objects and methods. It also covers primitive data types, constructors, OOP concepts like abstraction, encapsulation, inheritance and polymorphism.
The document discusses exception handling in C++. It defines an exception as an error that occurs during runtime. C++ includes a built-in exception handling mechanism using try, catch, and throw keywords. Code that can generate exceptions is placed in a try block. If an exception occurs, it is thrown using throw and caught using catch, where it can be processed. Exceptions are objects belonging to a specific class. Multiple catch blocks can handle different exception types in order. A catch-all block using ellipses (...) can handle any exception.
The document discusses various looping constructs in Java including for, while, do-while loops as well as decision making statements like if, if-else, switch. It provides the syntax and examples of each. The key loops covered are for, which allows looping a specific number of times, while which checks a condition before running the loop body, and do-while which runs the body at least once. The document also discusses break and continue keywords that can be used within loops. For decision making, it explains if, if-else-if-else for multiple conditions, and switch for equality checks. Nested if statements are also covered.
Java Multithreading Using Executors FrameworkArun Mehra
This document provides an overview of using executors to handle multithreading in Java. It discusses key classes and interfaces in the executors framework like Executor, ExecutorService, and Executors. Common thread pools like fixed thread pool and cached thread pool are mentioned. The document also summarizes techniques for naming threads, returning values from threads, creating daemon threads, checking thread status, terminating threads, and handling uncaught exceptions using both the thread and executor APIs. Finally, it covers scheduling tasks using both the timer/timerTask classes and executor service.
1. O documento apresenta os fundamentos de programação concorrente em Java, incluindo threads, a interface Runnable, como iniciar novos threads, interrupção de threads, espera de threads e problemas de corrida.
2. A segunda parte aborda a API de concorrência do Java, incluindo classes e interfaces do pacote java.util.concurrent.
3. O documento fornece exemplos de código para ilustrar os principais conceitos de programação concorrente em Java.
Building Scalable Stateless Applications with RxJavaRick Warren
RxJava is a lightweight open-source library, originally from Netflix, that makes it easy to compose asynchronous data sources and operations. This presentation is a high-level intro to this library and how it can fit into your application.
The document discusses reactive programming and how it can be used on Android. It explains that reactive programming uses observable sequences and asynchronous data flows. It introduces RxJava as a library for reactive programming that uses Observables to compose flows of asynchronous data. It provides examples of how RxJava can be used on Android to perform background tasks, handle errors and activity lifecycles, load images asynchronously, and create and transform Observables.
4Developers 2015: Programowanie synchroniczne i asynchroniczne - dwa światy k...PROIDEA
This document discusses asynchronous and synchronous programming in Java. It covers several key aspects:
1. Java supports both multi-threading for synchronous programming as well as asynchronous programming using non-blocking I/O and libraries like RxJava.
2. Asynchronous programming can be difficult due to issues like complex error handling, lack of readability, and difficulty debugging.
3. Many open-source libraries have been created to help with asynchronous programming using approaches like futures, callbacks, and promises.
4. Reactive programming libraries like RxJava, Reactor, and Vert.x use approaches like asynchronous streams to simplify asynchronous code.
Reactive Extensions (Rx) is a library for composing asynchronous and event-based programs using Observable sequences. RxJava implements Rx for the Java VM. Key advantages include simplifying async operations, surfacing errors sooner, and reducing state bugs. The API has a large surface area, so the learning curve is steep. RxJava 2 is recommended over 1 due to better performance, lower memory usage, and other improvements. Observables push data to Observers via onNext, onError, onCompleted calls. Common operators like map, flatMap, filter transform and combine Observable streams. Multithreading uses Schedulers. Unit testing uses TestSubscriber to make assertions.
The document discusses ReactiveX (RxJava) and the Observable pattern. It begins with an overview of Observables which emit streams of data and how subscribers observe and react to those streams. It then covers various RxJava operators like map, flatMap, and compose that allow transforming and combining Observable streams. The document also discusses threading with RxJava using subscribeOn and observeOn and how to structure applications using an MVVM architecture with RxJava.
Intro to Reactive Thinking and RxJava 2JollyRogers5
Reactive Extensions (Rx) was first introduced by Microsoft in 2009 and has since been ported to most platforms and languages. It provides a way to model asynchronous data streams and events using Observables in a way that makes it easier to compose asynchronous and event-based programs. Some key advantages include simplifying asynchronous operations, surfacing errors sooner, and reducing bugs from state variables. However, the API is large so there is a steep learning curve. RxJava is an implementation of Rx for the JVM that allows pushing data instead of pulling it without worrying about threads. Common operators like map, filter, and flatMap allow transforming and combining Observable streams.
RxJava 2 Reactive extensions for the JVMNetesh Kumar
This document provides an overview of RxJava and reactive programming concepts. It discusses why RxJava was created, defines key RxJava terms like Observables and Operators, and provides examples of common Observable creation methods and Operators like filter(), flatMap(), and zip(). The document aims to explain the basics of RxJava and how it allows for asynchronous and event-based programming using Observable sequences.
RxJava2 is an updated version of RxJava that is compatible with Reactive Streams for asynchronous stream processing, improves null handling and backpressure support, and has updated Observable types while maintaining compatibility with many RxJava1 libraries; it offers performance benefits but requires updating code to work with some non-compatible libraries; developers should consider switching to RxJava2 for new projects or when upgrading dependencies allow it.
RxJava is a library for composing asynchronous and event-based programs using observable sequences. It allows avoiding callback hell and makes it easy to compose and transform asynchronous processes through combining, filtering, etc. RxJava uses Observables to represent asynchronous data streams and allows subscribing to those streams using Observers. It supports asynchronous operations through Schedulers and can integrate with libraries like Retrofit to handle asynchronous network requests in a reactive way. Learning the RxJava concepts and operators takes some time but it provides many benefits for managing asynchronous code in a declarative way.
This document summarizes an introductory presentation on RxJava. It begins with definitions of reactive programming and RxJava, noting that RxJava allows for composing asynchronous and event-based programs using observable sequences. It then discusses some common problems with concurrency in Android and how RxJava provides solutions through concepts like Observables, operators, and schedulers. It provides examples of using RxJava for common tasks like network requests and timers. It concludes with some common mistakes to avoid like improper use of schedulers and failing to unsubscribe.
RxJava и Android. Плюсы, минусы, подводные камниStfalcon Meetups
Ярослав Герьятович
Android Engineer в компании Attendify . Спикер на UA Mobile'14 . Идеолог функционального и реактивного подхода в проектировании Android приложений.
Subject represents an object that is both an Observable and an Observer. It allows objects to subscribe to it as an Observable and also emit events to observers as an Observer. There are different types of Subjects including PublishSubject, BehaviorSubject, AsyncSubject, and ReplaySubject. PublishSubject simply publishes events to observers, BehaviorSubject caches the last emitted value, AsyncSubject only emits the last value upon completion, and ReplaySubject caches emitted values and replays them to new observers. Subjects can be used to build event buses to facilitate loose coupling between components.
This document provides an introduction to Akka.NET Streams and Reactive Streams. It discusses key concepts like observables, async enumerables, and reactive streams. It also demonstrates how to build workflows with Akka.NET streams, including examples of building a TCP server. The document introduces core Akka.NET streams concepts like sources, flows, and sinks, and how they compose together in a runnable graph. It also covers testing streams with probes and materialization.
The document discusses Reactive programming concepts using RxJava. It defines key RxJava terms like Observable and Observer. An Observable is the source of events, while an Observer handles incoming events. It also covers how to create Observables from sources like arrays, intervals, and network calls. Operators like filter, map, take, and defaultIfEmpty are demonstrated for transforming Observables.
RxJava is an open source library for reactive programming that allows processing asynchronous streams of data. It provides operators to filter, transform, and combine Observables in a lazy manner. Observables represent asynchronous data streams that can be subscribed to receive push-based event notifications. Services return Observables to make their APIs asynchronous and reactive.
The document introduces RxJava and how it can be used in Android applications, describing key concepts like Observables, Observers, Operators, and Subjects that allow asynchronous and event-based code to be written in a reactive style. It provides examples of how RxJava can be used to fetch toilet data from an API and handle the asynchronous response more declaratively compared to using callbacks. The document also discusses how subjects can act as both observables that emit events and observers that receive events, making them useful for building event buses between activities.
Tech Talk #4 : RxJava and Using RxJava in MVP - Dương Văn TớiNexus FrontierTech
RxJava is a library for composing asynchronous and event-based programs using observable sequences. It allows processing streams of data and events asynchronously without blocking threads. Some key features include:
- Creating Observables from various sources like arrays, callbacks, or network requests
- Combining multiple Observables using operators like map, filter, concatMap
- Scheduling Observables to run on different threads for IO, computation, or the main thread
- Subscribing to Observables using Subscriber, Observer, or other callback methods
When using RxJava with MVP, Observables can be used to asynchronously load and transform data from the model to be presented by the view. Operators allow processing streams of data before
A presentation given to Overstock.com IT at annual conference. Twitter @TECHknO 2015. Goal of the presentation is to provide a good introduction to the reactive programming model with RxJava.
The document discusses reactive programming concepts using RxJava. It introduces observables and observers, where observables push asynchronous events to observers via subscriptions. It explains how to create observables that return asynchronous values, and how operators like map, filter, and flatMap can transform and combine observable streams. Key lessons are that performance depends on operator implementations, debugging subscriptions can be difficult, and IDE support for reactive code is still maturing.
This document discusses using RxJava to handle asynchronous and concurrent processes. It provides an example of using RxJava to stream tweets from Twitter APIs, retrieve user profiles concurrently, and find the most popular tweet by a user. Key strengths of RxJava highlighted are that it is functional, reactive, allows controlling execution threads, and is easy to compose and integrate workflows. Some pitfalls mentioned are that the API is large, it can be hard to debug, and back pressure must be managed.
What to do when you have a perfect model for your software but you are constrained by an imperfect business model?
This talk explores the challenges of bringing modelling rigour to the business and strategy levels, and talking to your non-technical counterparts in the process.
Malibou Pitch Deck For Its €3M Seed Roundsjcobrien
French start-up Malibou raised a €3 million Seed Round to develop its payroll and human resources
management platform for VSEs and SMEs. The financing round was led by investors Breega, Y Combinator, and FCVC.
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdfVALiNTRY360
Salesforce Healthcare CRM, implemented by VALiNTRY360, revolutionizes patient management by enhancing patient engagement, streamlining administrative processes, and improving care coordination. Its advanced analytics, robust security, and seamless integration with telehealth services ensure that healthcare providers can deliver personalized, efficient, and secure patient care. By automating routine tasks and providing actionable insights, Salesforce Healthcare CRM enables healthcare providers to focus on delivering high-quality care, leading to better patient outcomes and higher satisfaction. VALiNTRY360's expertise ensures a tailored solution that meets the unique needs of any healthcare practice, from small clinics to large hospital systems.
For more info visit us https://valintry360.com/solutions/health-life-sciences
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...Paul Brebner
Closing talk for the Performance Engineering track at Community Over Code EU (Bratislava, Slovakia, June 5 2024) https://eu.communityovercode.org/sessions/2024/why-apache-kafka-clusters-are-like-galaxies-and-other-cosmic-kafka-quandaries-explored/ Instaclustr (now part of NetApp) manages 100s of Apache Kafka clusters of many different sizes, for a variety of use cases and customers. For the last 7 years I’ve been focused outwardly on exploring Kafka application development challenges, but recently I decided to look inward and see what I could discover about the performance, scalability and resource characteristics of the Kafka clusters themselves. Using a suite of Performance Engineering techniques, I will reveal some surprising discoveries about cosmic Kafka mysteries in our data centres, related to: cluster sizes and distribution (using Zipf’s Law), horizontal vs. vertical scalability, and predicting Kafka performance using metrics, modelling and regression techniques. These insights are relevant to Kafka developers and operators.
Microservice Teams - How the cloud changes the way we workSven Peters
A lot of technical challenges and complexity come with building a cloud-native and distributed architecture. The way we develop backend software has fundamentally changed in the last ten years. Managing a microservices architecture demands a lot of us to ensure observability and operational resiliency. But did you also change the way you run your development teams?
Sven will talk about Atlassian’s journey from a monolith to a multi-tenanted architecture and how it affected the way the engineering teams work. You will learn how we shifted to service ownership, moved to more autonomous teams (and its challenges), and established platform and enablement teams.
WWDC 2024 Keynote Review: For CocoaCoders AustinPatrick Weigel
Overview of WWDC 2024 Keynote Address.
Covers: Apple Intelligence, iOS18, macOS Sequoia, iPadOS, watchOS, visionOS, and Apple TV+.
Understandable dialogue on Apple TV+
On-device app controlling AI.
Access to ChatGPT with a guest appearance by Chief Data Thief Sam Altman!
App Locking! iPhone Mirroring! And a Calculator!!
How Can Hiring A Mobile App Development Company Help Your Business Grow?ToXSL Technologies
ToXSL Technologies is an award-winning Mobile App Development Company in Dubai that helps businesses reshape their digital possibilities with custom app services. As a top app development company in Dubai, we offer highly engaging iOS & Android app solutions. https://rb.gy/necdnt
The Rising Future of CPaaS in the Middle East 2024Yara Milbes
Explore "The Rising Future of CPaaS in the Middle East in 2024" with this comprehensive PPT presentation. Discover how Communication Platforms as a Service (CPaaS) is transforming communication across various sectors in the Middle East.
14 th Edition of International conference on computer visionShulagnaSarkar2
About the event
14th Edition of International conference on computer vision
Computer conferences organized by ScienceFather group. ScienceFather takes the privilege to invite speakers participants students delegates and exhibitors from across the globe to its International Conference on computer conferences to be held in the Various Beautiful cites of the world. computer conferences are a discussion of common Inventions-related issues and additionally trade information share proof thoughts and insight into advanced developments in the science inventions service system. New technology may create many materials and devices with a vast range of applications such as in Science medicine electronics biomaterials energy production and consumer products.
Nomination are Open!! Don't Miss it
Visit: computer.scifat.com
Award Nomination: https://x-i.me/ishnom
Conference Submission: https://x-i.me/anicon
For Enquiry: Computer@scifat.com
8 Best Automated Android App Testing Tool and Framework in 2024.pdfkalichargn70th171
Regarding mobile operating systems, two major players dominate our thoughts: Android and iPhone. With Android leading the market, software development companies are focused on delivering apps compatible with this OS. Ensuring an app's functionality across various Android devices, OS versions, and hardware specifications is critical, making Android app testing essential.
Consistent toolbox talks are critical for maintaining workplace safety, as they provide regular opportunities to address specific hazards and reinforce safe practices.
These brief, focused sessions ensure that safety is a continual conversation rather than a one-time event, which helps keep safety protocols fresh in employees' minds. Studies have shown that shorter, more frequent training sessions are more effective for retention and behavior change compared to longer, infrequent sessions.
Engaging workers regularly, toolbox talks promote a culture of safety, empower employees to voice concerns, and ultimately reduce the likelihood of accidents and injuries on site.
The traditional method of conducting safety talks with paper documents and lengthy meetings is not only time-consuming but also less effective. Manual tracking of attendance and compliance is prone to errors and inconsistencies, leading to gaps in safety communication and potential non-compliance with OSHA regulations. Switching to a digital solution like Safelyio offers significant advantages.
Safelyio automates the delivery and documentation of safety talks, ensuring consistency and accessibility. The microlearning approach breaks down complex safety protocols into manageable, bite-sized pieces, making it easier for employees to absorb and retain information.
This method minimizes disruptions to work schedules, eliminates the hassle of paperwork, and ensures that all safety communications are tracked and recorded accurately. Ultimately, using a digital platform like Safelyio enhances engagement, compliance, and overall safety performance on site. https://safelyio.com/
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdfBaha Majid
IBM watsonx Code Assistant for Z, our latest Generative AI-assisted mainframe application modernization solution. Mainframe (IBM Z) application modernization is a topic that every mainframe client is addressing to various degrees today, driven largely from digital transformation. With generative AI comes the opportunity to reimagine the mainframe application modernization experience. Infusing generative AI will enable speed and trust, help de-risk, and lower total costs associated with heavy-lifting application modernization initiatives. This document provides an overview of the IBM watsonx Code Assistant for Z which uses the power of generative AI to make it easier for developers to selectively modernize COBOL business services while maintaining mainframe qualities of service.
2. ¿Que es reactive?
- Se basa en que las apps son flujos de datos finitos o infinitos asíncronos.
- Nos abstrae
- Threading de bajo nivel
- Sincronización
- Estructuras de datos concurrentes
- Gestión de Errores *
- Nos permite concatenar transformaciones, componer datos de diferentes
fuentes de manera sencilla*
- Reactive- RXJava, RXJs, RX.NET, RXScala, RXPy …
- RXJava creado por Netflix
3.
4. Ok show me now!
Time
Observer Observable
Subscribe
On Next *
OnError |
OnComplete
5. Ok show me now!
String adventure="Time";
Observable.just(adventure)
.subscribe(new Subscriber<String>() {
@Override
public void onCompleted() {
Log.d("Test", "COMPLETE");
}
@Override
public void onError(Throwable e) {
Log.e("Test", "ERROR");
}
@Override
public void onNext(String s) {
Log.d("Test", s);
}
});
6. Ok show me now!
String adventure="Time";
Observable.just(adventure)
.subscribe(new Subscriber<String>() {
@Override
public void onCompleted() {
Log.d("Test", "COMPLETE");
}
@Override
public void onError(Throwable e) {
Log.e("Test", "ERROR");
}
@Override
public void onNext(String s) {
Log.d("Test", s);
}
});
Crear el Observable
“Flujo de datos”
7. Ok show me now!
String adventure="Time";
Observable.just(adventure)
.subscribe(new Subscriber<String>() {
@Override
public void onCompleted() {
Log.d("Test", "COMPLETE");
}
@Override
public void onError(Throwable e) {
Log.e("Test", "ERROR");
}
@Override
public void onNext(String s) {
Log.d("Test", s);
}
});
Te suscribes para
recoger los datos
LOG:
Time
Complete
9. Que Evita RXJava
Callbacks:
public void changeName(final User user,final String
name,final Callback<User> callback ){
Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
user.setName(name);
callback.onSuccess(user);
}
}, SERVICE_LATENCY_IN_MILLIS);
}
public class User{
String name;
String surname;
String fullName;
}
10. Que Evita RXJava
Callbacks: User user = new User();
userRepository.changeName(user,
"Name", new Callback<User>() {
@Override
public void onSuccess(User item) {
//:D
}
@Override
public void onError() {
//D:
}
});
public void changeName(final User user,final String
name,final Callback<User> callback ){
Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
user.setName(name);
callback.onSuccess(user);
}
}, SERVICE_LATENCY_IN_MILLIS);
}
public class User{
String name;
String surname;
String fullName;
}
11. Que Evita RXJava
Callbacks: userRepository.changeName(user, "Name", new Callback<User>() {
@Override
public void onSuccess(User item) {
userRepository.changeSurname(item, "Surname", new Callback<User>() {
@Override
public void onSuccess(User item) {
//:D
}
@Override
public void onError() { //D: }
});
}
@Override
public void onError() { //D: }
});
public class User{
String name;
String surname;
String fullName;
}
12. Que Evita RXJava
Callbacks: userRepository.changeName(user, "Name", new Callback<User>() {
@Override
public void onSuccess(User item) {
userRepository.changeSurname(item, "Surname", new Callback<User>() {
@Override
public void onSuccess(User item) {
userRepository.changeFullname(item, item.getName(), item.getSurmane(),
new Callback<User>() {
@Override
public void onSuccess(User item) {
//Finish!
}
@Override
public void onError() {//D:
}
});
}
@Override
public void onError() {//D:
}
});
}
@Override
public void onError() {
}
});
public class User{
String name;
String surname;
String fullName;
}
13. Que Evita RXJava
Callbacks:
public class User{
String name;
String surname;
String fullName;
}
CALLBACK HELL!
userRepository.changeName(user, "Name", new Callback<User>() {
@Override
public void onSuccess(User item) {
userRepository.changeSurname(item, "Surname", new Callback<User>() {
@Override
public void onSuccess(User item) {
userRepository.changeFullname(item, item.getName(), item.getSurmane(),
new Callback<User>() {
@Override
public void onSuccess(User item) {
//Finish!
}
@Override
public void onError() {//D:
}
});
}
@Override
public void onError() {//D:
}
});
}
@Override
public void onError() {
}
});
14. y en RXJava ...
Callbacks:
public Observable<User> changeName(final User user,final String name) {
return Observable.fromCallable(new Callable<User>() {
@Override
public User call() throws Exception {
user.setName(name);
return user;
}
});
}
public class User{
String name;
String surname;
String fullName;
}
15. y en RXJava ...
Callbacks:
public class User{
String name;
String surname;
String fullName;
}
Observable.just(new User())
.flatMap(new Func1<User, Observable<User>>() {
@Override
public Observable<User> call(User user) {
return userRepository.changeName(user, "name");
}
}).flatMap(new Func1<User, Observable<User>>() {
@Override
public Observable<User> call(User user) {
return userRepository.changeSurname(user, "surname");
}
}).flatMap(new Func1<User, Observable<User>>() {
@Override
public Observable<User> call(User user) {
return userRepository.changeFullName(user, user.getName(), user.getSurmane());
}
}).subscribe(new Subscriber<User>() {
@Override
public void onCompleted() {//Finish
}
@Override
public void onError(Throwable e) { //D:
}
@Override
public void onNext(User user) { // :D
log(user);
}
});
16. en RXJava y retrolambda...o Kotlin ! :D
Callbacks:
Observable.just(new User())
.flatMap(user -> userRepository.changeName(user, "name"))
.flatMap(user -> userRepository.changeSurname(user, "surname"))
.flatMap(user ->
userRepository.changeFullName(user, user.getName(), user.getSurmane()))
.subscribe(user ->log(user));
public class User{
String name;
String surname;
String fullName;
}
17. RXJava
● Se compone:
○ Set de clases para representar streams de datos - Observables
○ Set de clases para escuchar las fuentes de datos - Subscribers
○ Set de clases para modificar y componer los datos
TimeObserver/subscriber Observable
Subscribe
On Next *
OrError |
OnComplete
18. RxJava Observable types
● Observable<T>
○ Emite 0-n items, termina con error, o completo
● Flowable<T> -RXJava2
○ Emite 0-n items, termina con error, o completo
○ Soporta BackPressure
● Single<T>
○ Emite exactamente 1 item or error
● Maybe<T>
○ Emite 0 items o 1 item o error
● Completable
○ Emite 0 items, solo una señal de completado o error
19. Flowable vs Observable
BackPessure: poder controlar la velocidad con la que source emite datos
RXJava 1:
● Solo estaban los Observables (implementaban BackPressure)
● MissingBackpressureException D:
○ Hay formas de evitarlo https://github.com/ReactiveX/RxJava/wiki/Backpressure
RXJava 2:
● Flowables
● Observable (No backPressure) - Flowables (Con backPressure)
20. Subscriptions
Subscribe un observer a un
observable:
Subscription subscribe()
Subscription subscribe(Action1<? super T> onNext)
Subscription subscribe(Observer<? super T> observer)
Subscription subscribe(Subscriber<? super T> subscriber)
Subscription subscribe(Action1<? super T> onNext,
Action1<java.lang.Throwable> onError)
Subscription subscribe(Action1<? super T> onNext,
Action1<java.lang.Throwable> onError, Action0 onComplete)
String adventure="Time";
Observable.just(adventure)
.subscribeOn(Schedulers.computation())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Subscriber<String>() {
@Override
public void onCompleted() {
Log.d("Test", "COMPLETE");
}
@Override
public void onError(Throwable e) {
Log.e("Test", "ERROR");
}
@Override
public void onNext(String s) {
Log.d("Test", s);
}
});
21. Subscriptions con memory leaks!
Sin problemas potenciales
Observable.just(1).subscribe(... this.something());
Memory Leak!!
Observable.interval(1, TimeUnit.SECONDS).subscribe(... this.something());
24. Schedulers
Indican en qué hilo deben
ejecutarse las operaciones:
● Scheduler.immediate()
Crea un Scheduler que ejecuta
inmediatamente el trabajo en el
hilo actual
String adventure="Time";
Observable.just(adventure)
.subscribeOn(Schedulers.inmediate())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Subscriber<String>() {
@Override
public void onCompleted() {
Log.d("Test", "COMPLETE");
}
@Override
public void onError(Throwable e) {
Log.e("Test", "ERROR");
}
@Override
public void onNext(String s) {
Log.d("Test", s);
}
});
25. Schedulers
Indican en qué hilo deben
ejecutarse las operaciones:
● Scheduler.immediate()
● Scheduler.trampoline()
Crea un Scheduler que coloca
el trabajo, en la cola del hilo
actual.
String adventure="Time";
Observable.just(adventure)
.subscribeOn(Schedulers.trampoline())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Subscriber<String>() {
@Override
public void onCompleted() {
Log.d("Test", "COMPLETE");
}
@Override
public void onError(Throwable e) {
Log.e("Test", "ERROR");
}
@Override
public void onNext(String s) {
Log.d("Test", s);
}
});
26. Schedulers
Indican en qué hilo deben
ejecutarse las operaciones:
● Scheduler.immediate()
● Scheduler.trampoline()
● Scheduler.newThread()
Crea un Scheduler que crea un
nuevo hilo para realizar el
trabajo.
String adventure="Time";
Observable.just(adventure)
.subscribeOn(Schedulers.newThead())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Subscriber<String>() {
@Override
public void onCompleted() {
Log.d("Test", "COMPLETE");
}
@Override
public void onError(Throwable e) {
Log.e("Test", "ERROR");
}
@Override
public void onNext(String s) {
Log.d("Test", s);
}
});
27. Schedulers
Indican en qué hilo deben
ejecutarse las operaciones:
● Scheduler.immediate()
● Scheduler.trampoline()
● Scheduler.newThread()
● Scheduler.computation()
Crea un Scheduler para trabajo
computacional, tiene tantos
hilos como CPU tenga el
dispositivo.
String adventure="Time";
Observable.just(adventure)
.subscribeOn(Schedulers.computation())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Subscriber<String>() {
@Override
public void onCompleted() {
Log.d("Test", "COMPLETE");
}
@Override
public void onError(Throwable e) {
Log.e("Test", "ERROR");
}
@Override
public void onNext(String s) {
Log.d("Test", s);
}
});
28. Schedulers
Indican en qué hilo deben
ejecutarse las operaciones:
● Scheduler.immediate()
● Scheduler.trampoline()
● Scheduler.newThread()
● Scheduler.computation()
● Scheduler.io()
Crea un Scheduler para
realizar llamadas I/O. Tiene un
thread-pool que crece a
demanda
String adventure="Time";
Observable.just(adventure)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Subscriber<String>() {
@Override
public void onCompleted() {
Log.d("Test", "COMPLETE");
}
@Override
public void onError(Throwable e) {
Log.e("Test", "ERROR");
}
@Override
public void onNext(String s) {
Log.d("Test", s);
}
});
37. Ejemplo Operaciones
Lista de usuarios de la charla
searchQuery(query)
.flatMap(new Func1<List<Users>, Observable<Users>>() {
@Override
public Observable<Users> call(List<Users> userList) {
return Observable.from(userList);
}
});
38. Ejemplo Operaciones
Lista de perfiles de usuarios de la charla
searchQuery(query)
.flatMap(new Func1<List<Users>, Observable<Users>>() {
@Override
public Observable<Users> call(List<Users> userList) {
return Observable.from(userList);
}
}).flatMap(new Func1<Users, Observable<LinkedINData>>() {
@Override
public Observable<LinkedINData> call(Users user) {
return linkedINQuery(user.getURL());
}
});
39. Ejemplo Operaciones
Lista de perfiles de usuarios de la charla
searchQuery(query)
.flatMap(new Func1<List<Users>, Observable<Users>>() {
@Override
public Observable<Users> call(List<Users> userList) {
return Observable.from(userList);
}
}).flatMap(new Func1<Users, Observable<LinkedINData>>() {
@Override
public Observable<LinkedINData> call(Users user) {
return linkedINQuery(user.getURL());
}
});
40. Ejemplo Operaciones
Lista de perfiles de usuarios de la charla que trabajan en Android
searchQuery(query)
.flatMap(new Func1<List<Users>, Observable<Users>>() {
@Override
public Observable<Users> call(List<Users> userList) {
return Observable.from(userList);
}
}).flatMap(new Func1<Users, Observable<LinkedINData>>() {
@Override
public Observable<LinkedINData> call(Users user) {
return linkedINQuery(user.getURL());
}).filter(new Func1<LinkedINData, Boolean>() {
@Override
public Boolean call(LinkedINData linkedINData) {
return linkedINData.worksInAndroid();
}
});
41. Ejemplo Operaciones
5 usuarios de la charla que trabajan en Android
searchQuery(query)
.flatMap(new Func1<List<Users>, Observable<Users>>() {
@Override
public Observable<Users> call(List<Users> userList) {
return Observable.from(userList);
}
}).flatMap(new Func1<Users, Observable<LinkedINData>>() {
@Override
public Observable<LinkedINData> call(Users user) {
return linkedINQuery(user.getURL());
}).filter(new Func1<LinkedINData, Boolean>() {
@Override
public Boolean call(LinkedINData linkedINData) {
return linkedINData.worksInAndroid();
}
}).take(5);
42. Ejemplo Operaciones
5 usuarios de la charla que trabajan en Android
searchQuery(query)
.flatMap(new Func1<List<Users>, Observable<Users>>() {
@Override
public Observable<Users> call(List<Users> userList) {
return Observable.from(userList);
}
}).flatMap(new Func1<Users, Observable<LinkedINData>>() {
@Override
public Observable<LinkedINData> call(Users user) {
return linkedINQuery(user.getURL());
}).filter(new Func1<LinkedINData, Boolean>() {
@Override
public Boolean call(LinkedINData linkedINData) {
return linkedINData.worksInAndroid();
}
}).take(5);
44. Data
RXJava en la práctica
Repositorio
BD/API/... public interface GithubService {
String SERVICE_ENDPOINT = "https://api.github.com";
@GET("/users/{login}")
Observable<GithubEntity> getUser(@Path("login") String login);
}
Datasources
Retrofit y Realm
45. Data
RXJava en la práctica
Repositorio
BD/API/...
public Observable<Github> getGithubUser(String login){
return dataStoreFactory.getUser(login)
//Map the Api object to the Domain object
.flatMap(new Function<GithubEntity, Observable<Github>>() {
@Override
public Observable<Github> apply
(@NonNull GithubEntity githubEntity) throws Exception {
return userResponseMapper.responseToModel(githubEntity);
}
});
}
Datasources
46. Domain
RXJava en la práctica
Casos de uso
public Observable<Github> getGithubUser(String login){
return mGithubRepository.getUser(login);
}
Interactor
47. View
RXJava en la práctica
Activity/fragment
Presenter
Model
mGetUserUseCase.execute(“user_login”)
.subscribeOn(Schedulers.newThread())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Subscriber<Github>() {
@Override
public void onCompleted() {
Log.d(TAG, "onCompleted");
}
@Override
public void onError(Throwable e) {
Log.e(TAG, "onError");
}
@Override
public void onNext(Github user) {
render(user);
}
});