All Questions
Tagged with javadesign-patterns
24 questions with no upvoted or accepted answers
3votes
0answers
147views
Design Pattern to unify similar generated classes
I have a project where I work with generated classes for some web interfaces. Some of these classes are (almost) identical and most of the functionality I need them for only use the identical parts. ...
2votes
0answers
481views
Third-party API wrapper in Java: how to design
Suppose, there's a site that provides an API, such as this: Users post questions, answers on that site You can make GET and POST calls There are two types of authentication: weak (only gives read ...
1vote
0answers
95views
Multitenancy - Multischema DB and should we handle by individual microservice basis?
I am looking into the revamping my organization's application by moving from a monolithic into a microservice-architecture. My database is a multi-schema shared in one database. Each of these schemas ...
1vote
0answers
59views
How does a framework manager, broker or coordinator class handle pluggable extensions and make them run?
I'm trying to understand if there is a manager/broker/coordinator class in frameworks and I hope so, but what possible ways are in a framework to make it run the pluggable extensions and what the term ...
1vote
0answers
86views
How to solve circular dependency scenario while executing http calls which require authentication?
I am working on a project which requires me to execute standard HTTP calls with session tokens. I am building a custom HTTP client, with a custom authenticator, something like this: Client client = ...
1vote
0answers
83views
Hierarchy of models while designing a client for a RESTful service
I am trying to write a client for a restful service. I am confused in designing the models. Below are the details: I have a Model named UnicastMessageRequest, it's definition is like this: ...
1vote
0answers
1kviews
MVC - How should components inside controller communicate?
I'm developing a level editor in Java. I'm designing its code in MVC. From what I've learned: controllers can have a direct reference (fields) to views and models. Views can have direct reference to ...
1vote
0answers
222views
Proper code structure for a Servlet using caching and async
I'm using an Java Servlet (with embedded Jetty, no Spring, no frameworks) and I'm adding asynchronous processing and caching to it. The exact implementation is irrelevant to this question and it's not ...
1vote
0answers
151views
Pattern for saving, updating and retrieving objects in Java
Whilst designing Java applications, I have come across a common pattern where I am writing an application that receives orders from a user and saves them in storage. When an order is stored, it can ...
1vote
0answers
116views
JavaFX generating UI controlls from backend classes
I have a problem with my Software design. I want to generate UI controls from XML messages over the network. The XML messages contain simple information about a component and its properties for ...
1vote
0answers
76views
is Command appropriate software pattern for this?
I have following task: I need to send several instructions after each other to the hardware. Next instruction is never sent before either answer to previous instruction comes (valid answer or error) ...
1vote
1answer
449views
Creating a System Sequence Diagram from an [extended] use case
As I have been taught - one controller = one use case. But I have: OutsiderController SupplierController (which extends OutsiderController) SubContractorController (which also extentds ...
0votes
0answers
117views
Spring data exchange between components?
Please advise me what pattern to use in following case: I have a Java/Spring Boot application. There is a component with @KafkaListener method which receives Kafka Messages on CRUD of various subject ...
0votes
0answers
59views
Mapping properties to lambdas instead of using factory method/pattern
I'm receiving a JSON object which has many properties and the properties change (properties are added/removed) according to the type of the data in the JSON object. I'm expecting to receive many ...
0votes
0answers
204views
Decorator Pattern Java
This is an object-oriented design question that is specific to Spring Boot. I'm extending a Spring Boot application that has an interface that is being extended and used inside another service. The ...