Jax RS vs Spring
JAX-RS vs Spring for REST Endpoints
Streams in Java
Steams API https://docs.oracle.com/javase/8/docs/api/java/util/stream/package-summary.html
Steams Examples: https://winterbe.com/posts/2014/07/31/java8-stream-tutorial-examples/
When POJO is having 10+ fields and needs getter/setters, we use IDE-> Righ Click-> Generate getter/setter. This will increase code a lot. During this time better to use Lombok.
If you want to add prechecks/post checks we can’t.
Why to bundle Big JRE?
Ship files only what are required to run JRE.
Feed JSON object from URL to following URL.
This gives Java class.
Using this Java class, build mock service.
Note: This is having issues when there are nested elements
This is well sophisticated way to convert JSON to Java Classes.
Note: Before you give JSON as input, find null values and make them some values. So that they will picked up and becomes variables. Otherwise it will cause trouble when it see values during run time.
This is similar to XPath.
Very useful when we need only few elements.
Transaction: an exchange or interaction between people.
Third Party Support
1. If we are doing credit card transaction, we need to do reverse swipe separately (We can write separate task and execute, but to be careful and need to handle, if we fail to perform reverse swipe).
2. If credit card transaction failed, we can’t do it again and again.
We need to understand and apply common sense on how to deal with it.
Thanks to Lukas Eder
1. These are tightly coupling with database and may cause brittleness down the line.
2. Performance fine tuning is tough.
3. Saves time and lines of code and increases productivity.
4. Better to write stored procs and use them.
5. C# LINQ looks good, but didn’t liked it.