aws-samples / serverless-java-frameworks-samples

MIT No Attribution
150 stars 36 forks source link

Add dagger example #11

Closed jeromevdl closed 1 year ago

jeromevdl commented 1 year ago

Issue #, if available: #8

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

dmahapatro commented 1 year ago

Thank you for the PR @jeromevdl.

alvarosanchez commented 1 year ago

Dagger is no near comparable to any Java framework. Presenting as if it were apples to apples is quite unfair, IMHO

jeromevdl commented 1 year ago

Dagger is no near comparable to any Java framework. Presenting as if it were apples to apples is quite unfair, IMHO

I agree Dagger does not provide all the features the others provide and is mainly a DI framework.

But looking at the other examples here, this is the main feature we showcase (and maybe the specific Handler provided by some of them). DI is also probably the feature people are looking for first. And for this, Dagger is really good, really lightweight and not based on reflection, which makes it really performant.

Other thing, there is no or very few examples of Lambda using Dagger, although everyone is looking for a way to reduce the cold start. Android developers massively rely on Dagger for his speed, and I think it makes sense for Lambda too. Even if not fully comparable, I think it makes sense to have a sample of it. Maybe we can add a disclaimer or something to avoid any confusion / misunderstanding.

alvarosanchez commented 1 year ago

I find reasonable to add a Dagger example. But perhaps its performance results should be displayed in a separate table

muraria commented 1 year ago

@jeromevdl Thanks for making this PR. May be you can put an asterisk next to Dagger and add a note/disclaimer below the table calling out the difference in frameworks.

muraria commented 1 year ago

Other samples has GraalVM equivalent applications. Can you add that as well please?

jeromevdl commented 1 year ago

Other samples has GraalVM equivalent applications. Can you add that as well please?

I tried but it's not as simple as the others... I'll have to come back to this later.