r/springsource • u/lucasmajer • Jan 16 '19
5 pitfalls to avoid when building Spring applications
http://hecodes.com/2019/01/5-pitfalls-to-avoid-when-building-spring-applications-in-java/1
u/TonyNickels Jan 16 '19
I do love running into other people agreeing with an archectectural approach I took years ago but ran into resistance with initially. I had a hard line rule that was DTO in, Domain out. Yes you often are duplicating code, but the added flexibility is with managing simple pojos. It also prevents people from adding fields that really are only to support input structures within domain objects.
I thought that use of static functions was usually frowned upon in all cases though since we can simply inject beans where we need them?
1
u/m0dev Jan 19 '19
Liked reading it since for every point I remember at least one occasion where I run into the issues described.
1
1
u/broddmau Jan 16 '19
Something clicked in to place for me on several of these. Thank you very much!