Spring Tips: Spring Modulith

Spring Tips: Spring Modulith

SpringDeveloper

2 недели назад

14,935 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@augustoangelvivaldelli6975
@augustoangelvivaldelli6975 - 03.07.2024 16:04

ApplicationModuleListener is being deprecated

Ответить
@hansmuster5291
@hansmuster5291 - 30.06.2024 16:21

multiple classes in 1 file, my eyes are bleeding 😱

Ответить
@djxak
@djxak - 29.06.2024 10:16

I think "relyable even bus" deserves its own project, unrelated to Modultith. It would be wonderful to be able to just add a starter to the project and have fault-tolerant ApplicationEvents out of the box.

Ответить
@Ant-s3b
@Ant-s3b - 28.06.2024 17:34

Can you fit in Webflux in a meaningful way? Let's say you have a handler module with a listener that has a reactive complex flow, do you gain any benefits from that? A new event will start a new reactive chain so probably we don't gain anything?

Ответить
@kid1412621
@kid1412621 - 26.06.2024 04:12

Micro services in monolith?

Ответить
@TheFutureSKOOL
@TheFutureSKOOL - 24.06.2024 09:07

"OrdersController" would make the name more searchable in code easily with IDE's help.

Ответить
@prdoyle
@prdoyle - 23.06.2024 17:20

Great stuff!

Ответить
@arnaudpoutieu1331
@arnaudpoutieu1331 - 22.06.2024 23:32

Many thanks Josh for such lovely content! 🙏🏿

Ответить
@anisulislam306
@anisulislam306 - 22.06.2024 19:31

What about separate datasource per module? Would be nice to have per module decoupled and isolated datasource configuration.

Ответить
@SwapnilNakate7
@SwapnilNakate7 - 22.06.2024 10:38

nicely put

Ответить
@ValdemarFerreiraDeBarros
@ValdemarFerreiraDeBarros - 21.06.2024 17:15

I use @RestController annotation which have @ResponseBody in it. Are there any reason for not use this annotation stead? Love your content

Ответить
@LaserowyWódz
@LaserowyWódz - 21.06.2024 10:10

How to handle pressure in Scrum Sprints as a Java Developer

Ответить
@xenoterracide
@xenoterracide - 20.06.2024 22:32

Now having watched this whole thing. I feel like the only convincing usage of it is for the documentation purposes. I'm actually a bit concerned about how smart it is since you were showing it throwing errors on internal packages. Arguably makes using jpms for more control harder. Jpms will enforce only exported packages be be accessible. In other words an internal package is always an internal package and you can't access it outside of that jar as long as you don't export the internal package. Perhaps another video covering modulith with jpms And enforcing that things like jpa annotations aren't accessible on your controller... Of course this assumes that you can get jpms working. I'm about to take another pass on that and my code and see what spring boot is throwing these days.

Ответить
@xenoterracide
@xenoterracide - 20.06.2024 21:56

If you want to call them the same name you could put them in a different package... And then use jpms to control what you export... 😂 And then you'll have to fully qualify your package name. I wish Java had type aliases... Because every library has a Component class... You say that you want that but if you actually did it you'd realize on any significantly large code base you would run into the problem of trying to open the right type with your IDE and being frustrated with your auto completion. So that's not only about Java but your IDE and general human readability.

Ответить
@xenoterracide
@xenoterracide - 20.06.2024 21:37

The reason why you also support a layered architecture in addition to a vertical architecture is because, and I've seen people do this, they access certain types of code in the wrong spots because their compiler gave them access to it. Also you can have layered code that you don't want to expose to a higher level of module. Not everything in my model needs to be accessible at the controller level. Here's a good example, It is a good design to use getters and setters with hibernate in order to facilitate appropriate lazy loading when dealing with collections and joins, hibernate has yet to support fully immutable objects. So I make package protected setters, I do not want my controller calling my setters... They are simply there to facilitate hibernate. If I need to set something I should use a more domain oriented method.

Now, should everything go into a top-level controller package with no sub packages? No that's not a good idea.

I think we should be doing both vertical and horizontal slicing. A decent question is though... Should it be, say, registration.controller or controller.registration?

As far as other concerns with public types... There's JPMS and it should be getting used. If you really really want to hide your public types you should be using jpms. If you can't use JPMS please go open bugs with the relevant projects or comment on the existing ones that you want this because they seem to be under the impression that people don't want compile time safety and non-transient dependencies Only. Which spring modulus doesn't appear to deal with? The problem of transient library dependencies getting pulled on to my compile time class path which I've seen in the real world result in people directly using code that later broke because they depended on something directly that we didn't intend to depend on directly. Probably because their IDE suggested it.

Ответить
@ronaldgarciavazquez8232
@ronaldgarciavazquez8232 - 20.06.2024 19:06

Muchísimas gracias, aunque no entiendo porque tantas dependencias pero sigo aprendiendo el modulith.. Saludos

Ответить
@cbmeeks
@cbmeeks - 20.06.2024 18:19

Would Spring Modulith be a good fit for a small workflow type project?

Ответить
@khalildureidy
@khalildureidy - 20.06.2024 16:31

as always, super amazing!! 🇵🇸🇵🇸🇵🇸

Ответить
@parthokr
@parthokr - 20.06.2024 16:19

Java ecosystem is thriving with spring lately.

Ответить
@sandrodelacruz8125
@sandrodelacruz8125 - 20.06.2024 12:18

Decoupled, not decomposed.

Ответить
@pr0master
@pr0master - 20.06.2024 10:53

Why is the Java Jigsaw module system completely ignored?

Ответить
@SonysonyYnos
@SonysonyYnos - 20.06.2024 08:27

it was so damn nice !

Ответить
@danielmachadovasconcelos877
@danielmachadovasconcelos877 - 19.06.2024 23:37

It's a pretty nice video! It's nice to see spring boot evolution.

Could this also work with Apache Kafka?

Ответить
@jameskimani3574
@jameskimani3574 - 19.06.2024 12:35

what a loaded 38 minutes!

Ответить
@Skiamakhos
@Skiamakhos - 19.06.2024 11:10

How fault tolerant is message-driven architecture? Like, is there a confirmation sent back to the message sender saying the message was received & understood or is it more like UDP than TCP/IP where the sender sends the message & expects nothing by way of confirmation, transaction finished as far as it's concerned, meanwhile something's gone temporarily wrong with the connection, say a taxi drove past while tramsmitting on its radio just at the moment the message was supposed to go over your WiFi & it got garbled, jammed effectively by the more powerful radio signal, and the receiver just doesn't get the message.

This was a problem for me years ago with an SOA type app where we had 3 main actors, one collecting data to send to a centre where it would be processed - it was training an AI for pattern recognition so initially it was human operators going "Yes, that matches" & hitting a green button, or "No that doesn't match" & hitting red. Trouble was they'd go off on lunch together around 1pm & meanwhile the data-collection centre was experiencing a surge in use as people popped in to give their data on their lunch breaks. Message queues would get full, and cue us support staff wading through logs logs and more f**kin' logs trying to find the message for Mr X's data to prove it was either stuck in a queue or it had made it through. Absolute nightmare. And of course at no point did the receiver acknowledge receipt or successful unpacking of the data, which if that had been the end of transaction would have meant all was well. They could have had that plus a timeout that would have flagged up an unsuccessful send - and it could have been locally cached on a RAID array to be resent until successful.

This was of course in offices where the network infrastructure was largely wiring that had been repurposed from earlier token ring sh!t, I kid ye not.

Ответить
@epsig1507
@epsig1507 - 19.06.2024 09:00

Great video. But I am sure if I run modules.verify() on our enterprise monolith it would explode

Ответить
@ganeshbabu8263
@ganeshbabu8263 - 19.06.2024 08:30

What is your first fav place on the internet ?

Ответить
@Anderson-bz7fm
@Anderson-bz7fm - 19.06.2024 01:50

One little doubt. How to rollback the first part of transaction if needed?

Ответить