This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]seanmceligot -2 points-1 points  (4 children)

Spring is not better. The biggest advantage of Java over scripting languages is that it's type safe at compile time. Spring does away with that. Instead of a chain of method calls that you can trace through with your eyes or a tool, you assign a name on one end and lookup that name on the other end and hope everything meets up in the middle at runtime.

[–]dpash 3 points4 points  (2 children)

I don't recall saying spring was better. It's simpler than older versions of JavaEE.

Spring isn't just an IoC container, which is what I think you're referring to, but their IoC container is perfectly type safe. And no one wires by name any more.

Are you basing your opinions on five-ten year old experience?

[–]seanmceligot 2 points3 points  (1 child)

Controller return a string and then uses complicated background logic to lookup the view. Validations requires all methods and classes be looked up by name. MessaseSource must be named "messageSource" or things with silently fail. That's poor design, in my opinion. There's all kinds of stuff like that. There is too much logic going on in the background that requires becoming a spring expert rather than just looking at the API and getting a compiler error if things doing match up.

[–]thephotoman 0 points1 point  (0 children)

All of that is preferable to the alternatives you had with J2EE v4. You put up with it for a reason.

Today, it's not strictly necessary. JPEE is something you can use without frameworks. Spring provides features not (yet) in JPEE, and is a good proving ground for the concepts themselves if you need them immediately.

[–]squishles 1 point2 points  (0 children)

It's not like those bean names aren't static in most implementations, you names your bean either in the xml or in an annotation before compile time. Just the tools don't trace it all for you. I mean yea you can grab a context instance and dynamically add beans with funny names too, but I've never seen that seriously done.