Announcement Announcement Module
Collapse
No announcement yet.
Why Spring was dropped from my project... Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Why Spring was dropped from my project...

    Spring was dropped from a project I'm on because developers got frustrated trying to hunt down exceptions. I wonder if this is a common story.

    The project has been in development for at least 4 years, using EJB, WebServices, JMS, JSP and a homegrown ORM. Developers started using Spring a year or so ago, mostly for web-MVC and JNDI-lookup/service wrappers. Everyone was impressed with the flexibility of Spring. But over time they had trouble tracking down exceptions either because they were (apparently) swallowed by spring exceptions or because they were so far down the stacktrace they were past the "and 23 more..." markers. So Spring's been removed from most places. I think the web-MVC might be the only part remaining, and it is under attack because there are too many redirects happening.

    Maybe the redirects can be designed out. Maybe also there is just a development style culture-clash going on. In any case, I'm not attacking Spring. I just wonder if others have seen this sort of thing happen.

    ???
    ,boz

  • #2
    Is there any chance you could give more detail about the problems you faced and the other negative experiences you had with Spring? I've not faced them personally, but I'd be quite interested to hear a different view. You've explained what the old architecture was, but what did you end up with? Which parts of Spring were you using? What are you using now? Did you ever JIRA any of the issues? Have you turned your back on Spring for good?

    As you can see from my questions, I'm quite interested .

    Comment


    • #3
      These weren't my problems. I've been working on another project for a while now that doesn't use Spring. I've been a fan of Spring for years and don't think I'm turning my back on it, but I might not be in a position to use it for a while. I'm now about to move back to working on the project that tried and removed Spring, so I'm just hearing some war stories.

      Anyway. In my opinion the project that tried and removed Spring maybe just has a different culture. Automated tests are not part of the build, for example. But the main issue I've heard from the lead developer is that it was too hard to figure out exception root causes. Another issue was that part of the team used Spring 2 and ran into conflicts with Weblogic's version of Spring. ... Again, I think this points to culture clash since no one is trying to avoid the heavier containers anyway.

      Comment


      • #4
        Originally posted by boz View Post
        But the main issue I've heard from the lead developer is that it was too hard to figure out exception root causes.
        That's very interesting to me. I'm not a huge Spring-MVC fan, but I really do like the whole Spring approach to exception handling. I've consulted in too many environments where each layer inconsistently chooses to catch-log-rethrow or catch-swallow exceptions. This leads to multiple stacktraces on a single error, none of which necessarily contain the root cause.

        Spring, on the other hand, encourages the passing of unrecoverable exceptions as Runtime Exceptions with meaningful names. For me, this results in a single stacktrace per error. It may be a long trace, but it's the correct one.

        I'm curious as to whether Spring is the real culprit in the stacktrace problems, just because my personal experience is that it solves more problems than it creates.

        Comment


        • #5
          Sound like good questions to me. I'll ask for a concrete example and post back.

          ,chris

          Comment


          • #6
            I'm in the same boat at the minute with regards to a few of your points. No Spring, no automated test, no CI, etc...... I'd trade places any day . It is interesting to hear the culture clash angle. I've worked with quite a few people who think they could do better and for them it's the standard option. The other end of the scale, go for the biggest hammer available for every problem. There must be a happy place somewhere in between . It would be good if you could do some more digging, quite interested to hear more! Like Corby, I've found Spring to be a very positive experience.

            Comment


            • #7
              Originally posted by boz View Post
              Spring was dropped from a project I'm on because developers got frustrated trying to hunt down exceptions. I wonder if this is a common story.
              Personally I'd try and turn it around by trying to get Interface 21 in to give a Spring course. One of the great strengths of Spring is its exception handling paradigm, so to ditch it because of this shows a certain lack of understanding.

              It also seems that the developers were fighting the framework rather than adopting it, again this is probably due to a lack of knowledge.

              Has anyone at your company had any explicit training, or is everyone self taught ?

              Comment


              • #8
                Originally posted by karldmoore View Post
                I'm in the same boat at the minute with regards to a few of your points. No Spring, no automated test, no CI, etc...... I'd trade places any day .
                How incredibly frustrating. All the Java developers I work with have just been on a 4 day Interface 21 taught Spring course, and despite me having used Spring for a couple of years I learnt loads.

                It does seem very much to be an education issue - I personally add in Spring to any project I work on now, I guess I'm just lucky to be in a senior enough position to do that.

                Comment


                • #9
                  Originally posted by Paul Newport View Post
                  Personally I'd try and turn it around by trying to get Interface 21 in to give a Spring course.
                  ... not gonna happen. I'd love it. But it ain't gonna happen. (Maybe I should practive positive thinking here, eh? )

                  Originally posted by Paul Newport View Post
                  One of the great strengths of Spring is its exception handling paradigm, so to ditch it because of this shows a certain lack of understanding.
                  I agree. Exception handling is one of the reasons I like to use Spring too. I wasn't around when the problems came up so it'll be interesting to learn more.

                  Originally posted by Paul Newport View Post
                  Has anyone at your company had any explicit training, or is everyone self taught ?
                  Self taught. Including me, though I've been to a couple of TheServerSide conventions.

                  DI is really not the way work is done on the project, and the project is successful, so ... it's not a big deal. Also, the developers range from 20+ years to 3+ years of experience. I'm at about 8 years now myself. I've also had some success getting Spring into a few projects over the years. In the end though the project is more important than any particular technology so if whoever is the lead at the moment decrees it can't be used then so be it. Time will offer many opportunities.

                  Comment


                  • #10
                    Originally posted by Paul Newport View Post
                    How incredibly frustrating. All the Java developers I work with have just been on a 4 day Interface 21 taught Spring course, and despite me having used Spring for a couple of years I learnt loads.

                    It does seem very much to be an education issue - I personally add in Spring to any project I work on now, I guess I'm just lucky to be in a senior enough position to do that.
                    You're making things worse! Your developers have had Spring training......... maybe one of these days . I've spoken to a few people who are quite surprised about how much they actually learn.

                    As Spring is so modular I do see plenty of chances to use the many aspects of Spring. One of these days I might get the chance .

                    Originally posted by boz View Post
                    ... not gonna happen. I'd love it. But it ain't gonna happen. (Maybe I should practive positive thinking here, eh? )
                    I feel your pain!

                    Comment


                    • #11
                      Spring was dropped from a project I'm on because developers got frustrated trying to hunt down exceptions
                      Wow. I think our project would self-destruct if we tried to remove Spring.

                      Having used Spring since 1.0x, I've never seen exceptions being swalled by Spring. I'd be interested to clarify if this is actually something Spring is doing for you, or whether its the result of your own code swallowing the exceptions.

                      Comment


                      • #12
                        Your problem seems like it'd be more of a corporate architecture issue than Spring itself. Spring in of itself does a fantastic job with exceptions. Perhaps in creating the surrounding structures that used Spring, your architecture team created a nightmare scenario that ultimately caused the removal of Spring (since, naturally, they wouldn't admit -- or possibly even realize -- that they'd made a mistake).

                        Just a thought.

                        Dan

                        Comment


                        • #13
                          Originally posted by cepage View Post
                          I've consulted in too many environments where each layer inconsistently chooses to catch-log-rethrow or catch-swallow exceptions. This leads to multiple stacktraces on a single error, none of which necessarily contain the root cause.

                          Spring, on the other hand, encourages the passing of unrecoverable exceptions as Runtime Exceptions with meaningful names. For me, this results in a single stacktrace per error. It may be a long trace, but it's the correct one.

                          I'm curious as to whether Spring is the real culprit in the stacktrace problems, just because my personal experience is that it solves more problems than it creates.
                          I asked for more detail. I didn't get much but...

                          This may be oversimplified and it is second-hand (from me), but essentially the app uses SpringMVC --> bizEJB --> daoEJB. Spring connected the EJBs to their clients. If an exception happened in daoEJB, for example, it would get wrapped and sent up the chain. Nothing in the SpringMVC layer dealt with the exception other than logging it. The log would then show only the stacktrace up to some Spring invocation object but not the root cause of the remote exception. ... Since Spring exceptions do their best to keep the root cause, this all sounds weird to me. Maybe the logger just needed some more configuration???

                          Also, some pages incur two redirects from the browser, meaning three SpringMVC invocations. So tracking down the cause of an exception also meant figuring out which invocation. As said before, maybe the redirects can be designed out. In any case I think that's a side issue.

                          Comment

                          Working...
                          X