3 Replies - 479 Views - Last Post: 20 March 2018 - 11:10 AM

#1 wtp   User is offline

  • D.I.C Regular

Reputation: 28
  • View blog
  • Posts: 338
  • Joined: 08-December 11

Do you use Spring?

Posted 20 March 2018 - 07:55 AM

Every time I try to use Spring I end up spending all day trying to solve an error, and can't resolve it. Since Spring is an inverse of control container I can't see what line the error occurs. The error messages usually aren't bad but they hardly have any javadocs. In my experience it doesn't seem valuable to save a few lines of code while adding hours of debugging. I'd rather use JDBC and servlets.

Do you use Spring in your projects? If do you have any advice when working with Spring so debugging isn't so miserable.

Is This A Good Question/Topic? 0
  • +

Replies To: Do you use Spring?

#2 astonecipher   User is offline

  • Senior Systems Engineer
  • member icon

Reputation: 2791
  • View blog
  • Posts: 11,000
  • Joined: 03-December 12

Re: Do you use Spring?

Posted 20 March 2018 - 08:20 AM

start basic and work your way up, testing often... It is far easier to know what caused the problem if you can trace it beck to a few lines of code rather than huge chunks.
Was This Post Helpful? 2
  • +
  • -

#3 ndc85430   User is offline

  • I think you'll find it's "Dr"
  • member icon

Reputation: 976
  • View blog
  • Posts: 3,849
  • Joined: 13-June 14

Re: Do you use Spring?

Posted 20 March 2018 - 10:03 AM

View Postwtp, on 20 March 2018 - 02:55 PM, said:

Do you use Spring in your projects?


No - there's no Spring on any of the projects on our team. I used to think the dependency injection stuff was quite useful, but in a way it gives you some "magic": the dependencies get instantiated and wired up, but if something goes wrong you're having to try and work out where that's happened. I much prefer the approach of wiring up the dependencies manually, which just makes everything explicit. We have some quite big projects where we do just that and even then, I don't see any problems doing so. If anything, you'll at least get compile time failures if you forget to wire up a dependency.
Was This Post Helpful? 1
  • +
  • -

#4 wtp   User is offline

  • D.I.C Regular

Reputation: 28
  • View blog
  • Posts: 338
  • Joined: 08-December 11

Re: Do you use Spring?

Posted 20 March 2018 - 11:10 AM

@astonecipher
Good advice. I should always do this trying to learn something.

@ndc85430
Those are pretty much my thoughts as well. It's good to hear it from someone experienced and that you're fine without spring in large projects.

This post has been edited by wtp: 20 March 2018 - 11:10 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1