Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
89thAirhacksQ&A.md

Ask questions and see you at August, 2nd, 2021 8pm CEST: https://youtube.com/c/bienadam/

Also checkout recent episode:

88th airhacks.tv

Please keep the questions Jakarta EE-stic. Means: as short and as concise as only possible. Feel free to ask several, shorter questions. Upcoming airhacks.tv events are also going to be announced at meetup.com/airhacks

@aldolushkja

This comment has been minimized.

Copy link

@aldolushkja aldolushkja commented Jul 12, 2021

Do you think Primefaces will release some web components like SAP or ING?

@aldolushkja

This comment has been minimized.

Copy link

@aldolushkja aldolushkja commented Jul 12, 2021

If the frontend (web components) makes calls to other services, and these services use keys, what strategy do you think is better to hide these keys? (I know that in the frontend it is impossible to hide something, I would definitely avoid calling the service directly, but I would create a proxy for the service, and I would call the one instead of the direct service).

If someone picks up this proxy service, how can you prevent someone malicious from spamming or brute forceing the service? Is there any project that is not in NodeJs that allows you to do rate-limiting for ip or slow down the response time of the request?

@wanderer2097

This comment has been minimized.

Copy link

@wanderer2097 wanderer2097 commented Jul 26, 2021

How to deal with nested objects in redux in a way that facilitates code re-use? E.g. imagine there is a Person entity on the back-end which has an Address property. Address itself is an embeddable (value object) and appears in many different entities in the domain. Naturally on the front-end this results in a nested JSON but how would you suggest to effectively structure the reducers and the functions processing the event in this case?

@Endilicam

This comment has been minimized.

Copy link

@Endilicam Endilicam commented Jul 28, 2021

Do you recommend using Java9 modules (module-info.java) in any application or microservice?

I have developed my own framework and an application that uses it, all with modules, the problem is in the combination of test + modules, also when adding Visual Code. The only solution I can find is to put the unit tests in another project, in my case, in another Maven module, similar to how you do in the integration tests.

I see that in your examples you never use Java modules, what do you think about it?

Thanks!

@ahofmeister

This comment has been minimized.

Copy link

@ahofmeister ahofmeister commented Jul 30, 2021

Hi Adam.

I watched your "A Note On Java EE Testing" a couple of times (yes, really) and followed https://adambien.blog/roller/abien/entry/blackbox_system_tests_with_quarkus this article.

And I followed Sebastian Daschners Version of System Tests (https://blog.sebastian-daschner.com/entries/efficient-testing-video-course).

I have some questions left:

  1. How do you setup/reset the database for system tests before/after each tests?
    a. eg after posting a unique membership for test 1, and post another in test 2
    b. Should there be an API endpoint to delete it, even though it is not used in production?
    c. as I write this: What about an endpoint to clear all data (eg with flyway), which is just for tests?
  2. What tests would you recommend for Entity Views within Blaze Persistence?
  3. How do you setup Quarkus like https://www.adam-bien.com/roller/abien/entry/cloud_ready_configuration_for_jpa ? Is that needed? What's your opinion?
  4. Would you write a test case for each and every property and it's annotation for an entity?
    a. eg. @NotNull, @Min, @Max or would you cover this via system test's as well? Or both?
    b. Would you use the Hibernate Validator or just persist the entity?
  5. Would you write tests for services classes methods like this? Or would you cover this via an system test case? Or both?
 public boolean isOwner(UserAccount user, String foodId) {
    long count = criteriaBuilderFactory.create(entityManager, Food.class).where(Food_.ID).eq(foodId)
        .where(Food_.OWNER).eq(user).getCountQuery().getSingleResult();
    return count == 1;
  }
  1. How do you measure the code coverage with Quarkus and system tests?
  2. What tests would you write for a Quarkus based Service with Blaze Persistence Views? (You may have covered it, but maybe you can sum up). :)

Thanks and cheers, Alexander

@thatsIch

This comment has been minimized.

Copy link

@thatsIch thatsIch commented Jul 30, 2021

I try to keep the deployments as lean as possible.

In case of Apache POI you recommended to patch the application server (like Wildfly) to provide the maven dependency and mark it as provided in the pom.xml.

  • How do you do this with Primefaces and Wildfly? It seems JSF extensions must be included in the deployment.
  • Does the same limitation exist with Quarkus?
@AdamBien

This comment has been minimized.

Copy link
Owner Author

@AdamBien AdamBien commented Aug 2, 2021

airhacks.fm podcast conversation with Cagatay Civici: https://airhacks.fm/#episode_150 of PrimeFaces

@anbusampath

This comment has been minimized.

Copy link

@anbusampath anbusampath commented Aug 2, 2021

Recently I was looking at various Jakarta EE components implemented by servers then found out underlying nio libraries like grizzly, xnio, Apache mina and Netty. I know Netty is popular among them. Read Blog post that Undertow 3 wants to replace xnio with Netty as well. Do you think we need give some focus on Jakarta EE space for underlying frameworks other than API spec. Idea I had in my mind only if I need simple servlet application which can be interchangeable with various nio frameworks with custom Java runtime image, not needed full Jakarta EE web profile.

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