3 ms·
Spring relies heavily on the more powerful features of the Java runtime which aren't available in Go, it wouldn't be possible to port it as-is. You could defini
by jpgvm 5y ago
Spring relies heavily on the more powerful features of the Java runtime which aren't available in Go, it wouldn't be possible to port it as-is. You could definitely come up with a set of existing Go libraries that implement all the core functionality of a Spring up in a cohesive way. Almost every large company I have been at has done exactly that however none has caught on in the same way Spring has.
Spring hasn't "fixed" Java development however but rather provided a consistent framework that has stood the test of time. It still has flaws but it's been around for long enough that nearly every conceivable issue you could run into already has a well known solution.
The end result is you spend very little time fixing Java or Spring problems.
In Go land however there isn't much in the way of consistent and/or well integrated ecosystems. You end up stitching everything together yourself and as a result can run into all sorts of combinatorial set of dependencies that can present effectively un-Google-able problems. Thus you spend a lot more time working out how to integrate your HTTP server, router, middlewares, tracing, logging, etc all of which are pre-solved problems with are large framework like Spring.
It wouldn't be possible to "fix" the same problems in Go unless either a new framework was developed from scratch that really took off or one of the collections of libraries was able to achieve dominance.
- AtlasBarfed 5y agoWhat runtime does Spring utilize that Go doesn't have from ... say .. the XML conf files era of Spring? I understand annotations and classpath scanning are entirely different animals. I guess AOP magic doesn't exist either. Json/Yaml versions of the xml era should be possible. I guess no xml namespace magic (which I hated)...but a consistent object graph specification would seem useful.
- jpgvm 5y agoYeah I think if you can come up with a good IoC implementation the rest would fall into place.