2
donuts
3y

The more I learn about Spring... It feels like it just hides complexity.... And thus allows developers to make their apps more complex?

I can imagine there will be a Component class with like 20 references to other components either directly or indirectly... But then when something crashes or some error in output data is noticed in prod for some reason...

You cant tell exactly what cause the error because the objects' state is so complex, not sure which component or combination actually causes the issue.

Essentially makes a lot of black boxes?

Comments
  • 1
    software: a lot of black boxes

    aka an api
  • 2
    Yes. Always reading a poem when I get an stack trace.

    Literally most of our time is reading the god damn errors.
  • 0
    ABSTRACTION!
  • 1
    Honestly, I have amazing experience with Spring.

    Sure, it's a huge beast under the covers and I have read a lot of the code for Spring while debugging a lot of issues.

    but at the same time, once you learn to "dance" with it you can spit out the most readable beautiful code that just works without any problems.

    At first I struggled a bit because it really is a lot of magic... you're no longer using Java, you're using the framework itself... but it has so many great functionality already built in that *most* things make sense out of the box!

    and then there's the FilterChain, fuck the FilterChain and CORS specifically... but otherwise it's mandy dandy
  • 1
    Assuming spring boot here - it aims to reduce boilerplate. Just whack an annotation or two here or there to set up a controller, or a repository. Just whack another annotation there to handle filtering. Whack another one to handle errors.

    Now granted, it's easy to screw up, miss an error handler, miss a filter, etc. and be left with gibberish or corner cases that are hard to debug and make no sense. But on the whole, if you know the library, it's easy enough to work with. You just have to know the beast to tame it :-)

    ...then when you think you know all there is to know, out comes spring webflux which is a wholly different kettle of fish 😂
  • 1
    @Hazarth @AlmondSauce so how do you learn it? How long did it take you to tame the beast?
  • 1
    @donuts To just use it successfully for basic projects, not long at all. Month or so maybe.

    To pick up all that I needed to know, maybe a year or so. That was doing it as part of work though, not studying intently for a year or anything like that.

    To learn webflux and reactor? Heh. Still going, but that's taken a good few months of deliberate study to get a reasonable knowledge of it all.
  • 1
    @AlmondSauce I've seen it at work for years now but only used it when I had to. Now looking into it, starting fresh... seems like we've been using it wrong anyway...

    How a team of experienced Spring devs could screw up so badly and not fix it....I dunno
  • 0
    Then again they started with XML Spring... Probably why... Doing it wrong was easier back then then doing it right I guess.
  • 2
    @donuts It was pretty easy to pick up, I went from 0 knowledge about spring even existing to being able to use it for whatever tasks I was given in about a 2-3 months

    I was taught a lot of the things incorrectly by my colleagues and seniors though and as time went on and I kept delving deeper into it I realized just how many things we've done wrong or misunderstood. Pretty much all the code I checked from past company projects was very naively written and the config was all over the place

    It prolly took me all together about a year to be efficient with spring-boot and let's say 2 years until I was actually considered somewhat of an "expert" when it came to spring problems and questions.

    now, I don't consider myself such, It's a huge framework, but I had my fair share of writting custom modules and some deep reflection for Spring by now with several unique projects under my belt so I'd say I'm capable at least

    my total experience with SB is about 3 years
Add Comment