Vuk Djapic

Greenhorn
+ Follow
since Jun 24, 2016
Vuk likes ...
Eclipse IDE Opera Java
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Vuk Djapic

Hi Craig,

Thanks a lot for the answer, really clarifies it.
I wanted to use the Gateway also to resolve security in a multitenant environment, and some helpful MVC context beans just aren't there any more. Ended with Monos and Fluxes everywhere in some complicated unreadable lambdas.
But understand the benefits of it, and probably needs some practice to get used to the programming model. Will certainly give it a try again, looking forward to read those chapters in your book!
1 year ago
Recently I tried Spring Gateway for our microservice setup, and as part of it had to learn Spring reactive programming.
Struggled some time in attempt to configure the Gateway the way I wanted, finally gave up and continued with Zuul 1. But it's not just that I didn't succeed to configure it - honestly, didn't like Spring's reactive style of programming. But with Spring Gateway it is the only option, reactive types must be used.

So the question is - where the Spring reactive way of programming is going? Why it is so eagerly promoted? Will it remain just an option or mandatory for some of the Spring projects, like it is for the Gateway?
To me it seems that Spring's team is pushing it, reminds me of the similar kind of promotion between Java and JavaFX.
1 year ago

Stephan van Hulst wrote:Why?



Because that's what enums are for. Your singleton class doesn't have to extend java.lang.Enum. Or need values() method, or valueOf(). And how would you know do you work with real enum, which happen at the moment to have only one defined value, or it's made enum because it is by nature singlton?
5 years ago
Thank you. Just one thing though, enum is not replacement for a singlton. There is not much sense in making enum with just one member, it's misleading.
5 years ago
Hi,

In my opinion singlton is very useful. Whole Spring framework is designed mainly around singlton objects. Instead of double checking, it's better to use static field and initializer.

Other useful patterns: Builder, Factory Method, Composite, Decorater, State, Template method.
5 years ago