Earlier quoted context omitted.
Name just one alternative you have in-depth experience with. Not just pet projects but production code.
Sure, I used to work with Java EE in the enterprise. My team switched over entirely to working with Clojure over the course of the past 6 years. We build large applications for use at the hospital. For context, the projects I work on are typically implemented over several years by a team of 5-10 developers. We find that our projects now have drastically less code doing the same types of things. Not only that, but the…
Spring vs. Java EE
101–110 of 119 posts
Re: Spring vs. Java EE
#102I like Java, but I've never tried diving into the Spring or Java EE world. The little I've looked at it seem daunting and complex and I'm not sure what it really gives you at the end of the day. What functionality does it provide, what are the killer features? And is all this complexity justified?
I've spent multiple-year periods using each of Java EE, Spring, and no formal framework (in practice, Guice for DI, Tomcat/Servlets for web, lots of libraries, and lots and lots of homebrew stuff). I can say with confidence that if your goal is just to build a sophisticated application, there's no advantage to using the frameworks. They include a lot of functionality, but beyond demo-scale applications, you will spen…
Re: Spring vs. Java EE
#103Personally, I haven't heard anything about renewed debates related to Spring vs. JEE in many years. And if you read the Gartner report in question[1], it's not about that at all. Hmm. Maybe I'm just cynical, but when I saw he was part of the company behind Spring I thought maybe this was more of a contrived argument. The truth is, framing a debate as Spring vs JEE perhaps stands to benefit both technologies since in…
"lightweight" compared to traditional JEE, but so is everything! This isn't going to make me popular on HN but: I don't think this is actually the case. Back in the mid 2000s I built EJB services by defining simple interface and implementation classes. I consumed the service by by injecting the interface into my clients. I tested my consumers by mocking the interface. Now I build REST services. I have to define and d…
And REST now with tooling like Swagger is catching up with what SOAP already provided out of the box.
Kids, there are reasons why those features where there in first place.
Re: Spring vs. Java EE
#104Earlier quoted context omitted.
I'd recommend Grails. https://grails.org/ You use Groovy, but it's pretty similar to Java and there's plenty of resources to bring you up to speed.
Grails 2.x or Grails 3 ? Many sites using version 2.x haven't bothered upgrading to version 3 in the two years since it was released, nor are there many version 3 plugins converted. And very few new Grails projects are started.
I can't really comment on Grails 3, funnily because the applications were written before 3.x came out and we haven't bothered upgrading them yet... :) I've only taken a brief look at what's involved in upgrading them, but other stuff has always been higher priority.
It's probably worth being familiar with both versions, because Grails had plenty of adoption before 3.x came out and 2.x is still being maintained.
Re: Spring vs. Java EE
#105I like Java, but I've never tried diving into the Spring or Java EE world. The little I've looked at it seem daunting and complex and I'm not sure what it really gives you at the end of the day. What functionality does it provide, what are the killer features? And is all this complexity justified?
It is daunting for sure. I stewed myself in the ecosystem last year by writing a couple open source libraries and fell in love with it. Java was the sexy language of the 90's, ironic because The best way I can describe it is the exact opposite of the current sexy language, JavaScript. Java is great, the best, when I'm trying to build something creative. It's like having access to an entire parts warehouse vs a toolsh…
I saw plenty of overengineering even with C back in the 90's.
My biggest example was a server framework that used its own concept of opaque pointers all over the code, because they abstracted data access over shared memory to all instances of the server.
So any memory access to data structures storing server state required translating between handles and pointer all the time.
Re: Spring vs. Java EE
#106Earlier quoted context omitted.
> Constructor injection in Spring is more test-friendly These are my thoughts too. No reflection or @MoreAnnotations to inject dependencies. I have an aversion to setter/field based injection because it allows you to instantiate an object in an incorrect state.
> I have an aversion to setter/field based injection because it allows you to instantiate an object in an incorrect state. Oh yes. I recognise that JavaBeans had its reasons for being, but then you get to JPA and it's time for all the boggling.
Annotations are fine for intra-project code contracts, but using them for external validation means that if you, say, deploy on a application server with an older version of Jersey, you're suddenly SOL when none of your validation logic is executed.
Re: Spring vs. Java EE
#107Earlier quoted context omitted.
> I see two import aspects that Spring provide: first, dependency injection/inversion of control as basis and then a way to 1000+1 things "right". DI creates debugging nightmares by moving what used to be compile time checks to runtime. Fowler was wrong.
This is a discussion that I've occasionally tried to raise with colleagues. I usually find myself in a pretty isolated position, but anyway.. My viewpoint is, roughly: 1) DI, as described in the GoF book is a great pattern. You compose objects by passing other objects to its constructor as needed. These are the stored in final fields for the lifetime of the parent object. The pattern gives a lot of flexibility and ha…
Re: Spring vs. Java EE
#108Earlier quoted context omitted.
It is only generic if you completely drop the context of the discussion (Spring and dependency injection). My point is that Spring brings DI/IoC concepts which help build healthy projects.
There are so many counter-examples in the world of poorly built projects, that I don't really understand how did you came to this conclusion. DI/IoC is just a pattern, there's no way it could guide you to good architecture itself. Spring is just a tool, which adds some constraints, but which does not force you to make business decisions on scope of different domains or interaction between them that might lead to stro…
Re: Spring vs. Java EE
#109Earlier quoted context omitted.
Sure, I used to work with Java EE in the enterprise. My team switched over entirely to working with Clojure over the course of the past 6 years. We build large applications for use at the hospital. For context, the projects I work on are typically implemented over several years by a team of 5-10 developers. We find that our projects now have drastically less code doing the same types of things. Not only that, but the…
You are barking up the wrong tree. I am also a Clojure enthusiast and I also use it wherever I can. I was genuinely interested to hear about a Java alternative to Spring because I failed to find any. I don't use java in production anymore though, only Kotlin and Clojure.
Re: Spring vs. Java EE
#110Spring vs. JavaEE is a topic that stopped being relevant five years ago. I cant believe anyone seriously considering any of these heavy duty teach stack in 2017. There are much much better choices out there even for Java developers, and if they can come out of their comfort zone a bit there is Clojure, Scala, Kotlin etc with MUCH nicer fraemworks
What frameworks would you recommend or look to get started with?