Skip to content

Instantly share code, notes, and snippets.

@AdamBien
Created November 12, 2024 06:30
Show Gist options
  • Save AdamBien/355fd0bebcfd5865464cbaf32b0e3e5a to your computer and use it in GitHub Desktop.
Save AdamBien/355fd0bebcfd5865464cbaf32b0e3e5a to your computer and use it in GitHub Desktop.
129thAirhacksQ&A.md
@eniuane
Copy link

eniuane commented Nov 29, 2024

Hi Adam!

Regarding the BCE Pattern,

  • If I wanted to use repository pattern where should I setup the repository class? In the control or entity?
  • And what about the RestClients? The RestClient should be on the control and the requests and responses class on the entity or everything on the entity? e.g. For a Shopping Cart Rest API, with external products, should I have a package "cart" with everything regarding it, and another one called "product", the control would have the service with all the logic regarding biz, and that service would communicate with the RestClient on the entity. Because that restclient is considered data and domain logic?

Thanks in advance and keep up the amazing work!

@AdamBien
Copy link
Author

AdamBien commented Dec 3, 2024

Before i saw someone using secureRandom class or something like that for generating random numbers(to generate a verification code for email verification ) is it different from using Random class...i know that they use different algorithms but what do they mean by more secure ?😅

-- from https://www.youtube.com/watch?v=N5Sct9XkCWo&lc=UgzvHUuJ5bBFOg_PKHV4AaABAg / http://youtube.com/bienadam/shorts

@dwamara
Copy link

dwamara commented Dec 5, 2024

Hi Adam, long time no writing but watching every session as always.
I am working on a government project, using Quarkus as always and I would like to integrate log collection, metrics and telemetry by using the least configuration possible. What would be your choice of tools to use? Graylog? ELK? LGTM?

Regards,
D.

@eniuane
Copy link

eniuane commented Dec 6, 2024

Hi again Adam!

One more question, I see that you expose the JPA entity on the boundary layer, sometimes as a response and others as a request. What is the best approach if you need to do some bean validation on those objects to return 400? Is to create a specific class for the request? Or you add the bean validations annotations to the jpa entity class? Or create a method to validate and if there is a problem it returns 400?

e.g. the ebank repository that you have, imagine that you wanted to return 400 if you try to create an account without the name of the person (new field) you would add that validation to the method “isValidForCreation”?

Thanks!

@sakariye
Copy link

sakariye commented Dec 6, 2024

Hi Adam,

This is not a question but a suggestion. It would be cool if you brought on the LangGraph4J (a sister project to LangChain4J) developer on your podcast. From the project page: LangGraph for Java. A library for building stateful, multi-agents applications with LLMs, built for work with langchain4j

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