Re:Ask HN: In modern Java, is AbstractFactoryFactoryAdapter ...
by PaulHoule on Wednesday December 07, 2022 @11:52PM
(#33904319)
Less than there used to be.
There are a lot of tools and frameworks that work on simple Java classes, you can write one with a few fields, then write another class that has a method tagged with some annotations like @πΏπΎππ, @πΆπ΄π and @πΏπ°ππ·.
A web server like Jetty will automatically generate the code to serialize JSON and other objects so you can write API endpoints in a style very much like Sinatra with a minimum of boilerplate code.
Dependency inversion frameworks like Spring and Guava (particularly big these days) manage to break the
π΅ππππππ’π΅ππππππ’π΅ππππππ’π΅ππππππ’ recursion by creating one super factory that initializes your application based on a map of which part goes where.
People are learning that Java is a great language for DSLs. Sometimes type erasure gets in the way but it is possible to implement very complex APIs with pretty good type checking, see
although it is still in preview. They are making small changes in each revision which is annoying on some level but it means they are tweaking it to work really well, together with
There are a lot of tools and frameworks that work on simple Java classes, you can write one with a few fields, then write another class that has a method tagged with some annotations like @πΏπΎππ, @πΆπ΄π and @πΏπ°ππ·.
A web server like Jetty will automatically generate the code to serialize JSON and other objects so you can write API endpoints in a style very much like Sinatra with a minimum of boilerplate code.
Dependency inversion frameworks like Spring and Guava (particularly big these days) manage to break the π΅ππππππ’π΅ππππππ’π΅ππππππ’π΅ππππππ’ recursion by creating one super factory that initializes your application based on a map of which part goes where.
People are learning that Java is a great language for DSLs. Sometimes type erasure gets in the way but it is possible to implement very complex APIs with pretty good type checking, see
https://www.jooq.org/
This feature is a huge amount of fun
https://openjdk.org/jeps/433
although it is still in preview. They are making small changes in each revision which is annoying on some level but it means they are tweaking it to work really well, together with
https://openjdk.org/jeps/432
you can do a lot of what you'd do with destructuring assignments in languages like Python and Javascript.