Giter Site home page Giter Site logo

atsticks / practicalrx Goto Github PK

View Code? Open in Web Editor NEW

This project forked from simonbasle/practicalrx

0.0 1.0 0.0 305 KB

A RxJava workshop to discover this library by migrating a legacy application. DON'T fork or PR this repo as it may be reconstructed from practicalRxOrigin in the future. Needs https://github.com/simonbasle/practicalRxExternal running.

License: Other

Java 100.00%

practicalrx's Introduction

Practical RxJava Workshop

README

This project is the skeleton (and solution) for the PracticalRxjava workshop.

The aim of the workshop is to discover RxJava through a practical example, a legacy application that we want to gradually migrate to a fully asynchronous and reactive app.

The application is a REST API, based on Spring Boot and layered into Controllers and Services. Services call themselves, a database and even external REST APIs.

/!\ This project should only be cloned for the duration of the workshop. It can (and will) be recreated from upstream if feedback warrants it or new features are brought into the workshop. Don't submit issues or PR here but rather in the upstream practicalRxOrigin repo.

You are now doing step1

Pre-requisites

PracticalRxExternal: a fake set of "external REST APIs" called by the legacy application. Some of these are unreliable and will simulate timeouts and delays.

Users can be stored as JSON in a Couchbase database, a key/value and document-oriented NoSQL database for which a fully reactive Java SDK exists.

  • Developers will need to copy and edit the configuration files
    • Copy application.main into /src/main/resources/application.properties
    • Copy application.test into /src/test/resources/applications.properties
    • Edit the copied files. Git will ignore them when switching branches.

There's a property to change the IP on which both the fake external APIs and the database will be running (usualy the workshop's presenter).

IPs can also independently be modified (eg. if the attendee wants to run the database on his own machine).

The need for a database can be deactivated (two Users will be created in memory).

Running the Workshop

This is a Maven project, developed and tested with the IntelliJ IDE.

The REST API is fully functional and can be played with (eg. with a REST client like POSTMAN) by running the Main class.

Controllers are unit tested (see /src/test/java) and attendees are encouraged to run tests from within the IDE to check that their modifications at each step are correct.

Step 9 makes a deep change to the Controllers so tests will change at this point. One can checkout branch step9pre to see both the solution to step 8 and the new version of the tests in preparation for step 9.

Each step is described in the ad hoc stepX.md document under /docs.

One can catch up if late or peek at the solution of each step in its associated branch (eg. branch solution/step2 contains the solution to step #2 described in /docs/steps2.md and can be used as a starting point for step #3).

practicalrx's People

Contributors

simonbasle avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.