Testing is still a topic that most developers would like to avoid. Even though it is crucial for working software, developing and maintaining tests takes certain time and effort — especially for distributed applications or when changes in existing functionality forces test scenarios to adapt. Omitting software tests can’t be the solution; therefore, how can we tackle enterprise tests in an effective and productive way?
Enterprise Java has come a long way. Let’s not focus on the old, darker days, but modern approaches on how to do enterprise applications. Where do we start? What technologies, tools, and approaches are a good choice for our applications and what allows us to effectively implement business logic and to deliver value to our users?
With Microservices as its target, the programmer sees a gap between the typical old-school approach (deploying to an application server) and modern approaches.JAX-RS 2.2 allows to natively startup a web server, even in-process in an IDE, so it allows to simply start it as a Java main() method and debug its startup and requests processing just as easy as Hello World! No more slow build and deploy cycles! This talk demonstrates how to do that, and what more to expect from JAX-RS 2.2 and the further roadmap.
Conventional wisdom has it that Java EE is a bad starting point for building cloud-native Java applications, but despite this most cloud-native frameworks are designed to use and extend Java EE. The issue has been not that Java EE can't be used, but deploying applications to new cloud platforms like Docker and Kubernetes so they can be efficiently updated and scaled requires new API's. Enter the Eclipse MicroProfile initiative which, combined with Jakarta EE, has been rapidly building out these gaps.
With the rise of micro-services, REST communication is more popular than ever. But the communication between the different parts must also be performed in a secure way.
First, we need to know if the user or system is allowed to call the JAX-RS endpoint. For this authentication part, self-contained tokens are the best option to not overload any of our services in the system. JWT which contains the authentication but also can contain the authorization info is ideal for this use-case.