Questions tagged [java]
Java is a high-level, platform-independent, object-oriented programming language originally developed by Sun Microsystems. Java is currently owned by Oracle, which purchased Sun in 2010.
5,022 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
-2
votes
0
answers
41
views
Model bank account withdraw and deposit on conditions [closed]
I have the following java modeling challenge kata. I need to use hexagonal architecture:
Feature 1: The Bank Account
We want to offer a bank account feature.
It must include:
A unique account number (...
0
votes
1
answer
101
views
What is the difference between Vertical Slice Architecture and Feature-Based Architecture
I am refactoring my monolithic application, in which the code is organized based on layered architecture.
I want to implement Modulith (Modular Monolit) in my app, but I've run into a problem: I haven'...
0
votes
2
answers
112
views
A class that implements two interfaces that extend the same interface [duplicate]
I'll get straight to the point. I want to implement a class structure in Java similar to the one in the image.
Am I falling into bad practice with this kind of diamond-shaped interface implementation?...
-3
votes
0
answers
91
views
Why this code fails concurent modification test [closed]
I am trying to model (as close as possible) a real world bank account with deposit/withdraw methods.
This is meant to be the core of as Spring rest api back end domain. I tried different approach ( ...
1
vote
2
answers
415
views
Convenience inheritance
Sometimes, you inherit from a class that defines the semantics of your type (Shape – Ellipse – Circle). Other times, you inherit simply because it's convenient to do so.
A superclass may have ...
1
vote
2
answers
209
views
Testing GUI panel involving modal dialogs
Suppose you have a panel with a table, which I will call a pane.
The table has a toolbar above it, including an edit button.
Editing involves showing an editing dialog. It allows the user to edit the ...
0
votes
2
answers
171
views
Keeping the impact of changes low when moving shared domain objects into a library
I’m refactoring a microservice project where multiple services share the same domain objects. Over time, these objects have diverged across services, causing inconsistencies.
To solve this, I plan to ...
4
votes
2
answers
291
views
Managing Growth in Microservice Architecture: Is Modular Monolith the Solution?
Our team of 5 members are managing a microservice architecture that currently includes around 200 Java Spring boot microservices, with approximately 50 new services being added each year. We follow ...
0
votes
3
answers
178
views
Tracking data change in GUI form
Problem: our application allows users to close a form window after certain changes without any confirmation, instead of pressing the Save button. This makes them complain they have to start afresh.
We ...
1
vote
2
answers
200
views
Classpath hell: independently updated apps with shared dependencies
This is how our desktop applications are launched. In this case, it's called DesktopApp (I changed the actual name). As you see, the dependencies are hard-coded, including their versions. In the ...
0
votes
1
answer
114
views
How to create a job management for a hybrid cloud/on-premise software?
I am exploring the state-of-the-art methods to create a service that can run and scale in both cloud (container) and on-premise environments.
The current version of the software is designed for on-...
0
votes
1
answer
98
views
Designing a Scalable Caching Layer for User and Tenant Metadata in a Messaging System
I'm developing a microservice-based application that processes a high volume of messages. Each message must be handled according to the user’s personal settings and some tenant-specific (customer) ...
2
votes
3
answers
240
views
Search requests with multiple search values
(related: Fetching records matching multiple joined attributes)
If Spring Data doesn't allow GET requests to have a body (and it's considered bad practice anyway)
curl -X 'GET' \
'http://localhost:...
0
votes
2
answers
140
views
Is it better to pass a specific "context" object to handlers rather than the entire domain object?
I’m designing a system where various "handlers" apply business rules to an object. Initially I had each handler receive the full domain object:
// A large domain object with many properties and ...
1
vote
5
answers
530
views
Code reusability/inheritance introduces pointless testing
Say I have a bunch of classes that imitate cars: SportsCar, Truck, and SUV. All of these classes share some public methods like start() and stop() which they inherit from an abstract class Car. While ...