Skip to content

Instantly share code, notes, and snippets.

@AdamBien
Last active December 15, 2025 07:41
Show Gist options
  • Select an option

  • Save AdamBien/44cf061fca06f6cf41b6f88950789089 to your computer and use it in GitHub Desktop.

Select an option

Save AdamBien/44cf061fca06f6cf41b6f88950789089 to your computer and use it in GitHub Desktop.
@JensFransson
Copy link

Many people claim that C++ is faster than Java. However, Java has the advantage of the Hotspot VM. In a benchmark that I wrote (sorting a large array of random strings) Java turned out to be about 3 times faster. Did you ever write a benchmark to compare Java and C++ for yourself?

@AdamBien
Copy link
Author

AdamBien commented Nov 21, 2025

"Is it a good idea to use Angular with AI or without?" ๐Ÿ‘‰ question (Adrian M.) from Java User Group Vienna meetup.

@amitev
Copy link

amitev commented Nov 21, 2025

@AdamBien the question also includes whether you would in general recommend Angular (your personal opinion on it).

@muchiri08
Copy link

How do you approach testing your b/s logic if they call external apis?

@tokalak
Copy link

tokalak commented Dec 4, 2025

Hi Adam,

thanks for the BCE project! It's great.

Question 1: In which package to put the data access classes? in the ebank project they reside inside the controller package, but I did expect them in the boundary package, because they do external communication as the database is an external system.

Question 2: Where to put the DTO entities?

Question 3: How to convert between domain entities and DTO entities? What about the following approach:

package com.test.user.entity;

public record User(String name, ...){
  
 public UserDTO toDto(){
      return new UserDTO(this.name, ...)
  }
  
  public static User fromDto(UserDTO dto){
      return new User(dto.username(), ...)
   }

}    

Question 4: How to communicate between modules? Create an interface in module A's boundary package and call it from module B?

What do you think? Thank you in advance.

@denis-arruda
Copy link

denis-arruda commented Dec 15, 2025

Considering a Java application, potentially with MicroProfile, that needs to support multi-tenancy where each tenant (client) has a dedicated database, what approach would you recommend?

Specifically, should we pursue a 'one application instance per tenant database' model or a 'single shared application instance' that dynamically routes requests to the correct tenant database based on a tenant identifier in the incoming request? Do you know if panache/hibernate supports that?

@AdamBien
Copy link
Author

Time machine: 41st airhacks.tv from 7th August 2017:

"React over Angular? ...and WebStandards, JSR-375 and REST, Reactive Programming vs. CompletableFuture, Blocking @asynchronous calls, Interceptors with EntityManager, AMQP and data masses, To Framework Or Not To Framework, Unit Testing Primefaces, Multi-Threaded JAX-RS 2.0 Clients, Java EE "vs." .NET, Dynamic entities, Data encryption, Working offline with JPA, Sample Projects, Industry trends, Conferences and Co., Server Side Rendering with Java EE 7, Naming CRUD in BCE, Java 9 Logging interface, Generic REST client, React.js / Polymer examples, Session replication challenges"

๐Ÿ‘‰ https://adambien.blog/roller/abien/entry/react_over_angular_reactive_programming

@muchiri08
Copy link

How do you manage transactions when you spawn threads(virtual/use of completable futures etc) in your code base? AFAIK transactions are per-thread and spawning a thread for whatever reason will detach from the transaction boundary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment