5 ms·
Spring Boot is simply exceptional; it makes web application development fast, as it's said to be with Django and Rails, but retains a lot functionality from the
by alanfranzoni 9y ago
Spring Boot is simply exceptional; it makes web application development fast, as it's said to be with Django and Rails, but retains a lot functionality from the Spring environment. I can't recommend it enough - things like Django and Rails just feel "old" after using Spring boot - even tough a good part of Spring power comes from the language and the tooling - some features (like automatic json-to-object conversion with correct typing, or object-to-object mapping) are just very hard to implement in a dynamically typed language.
- ddorian43 9y agoDoesn't look very fast on benchmarks: https://www.techempower.com/benchmarks/#section=data-r14&hw=ph&test=plaintext https://www.techempower.com/benchmarks/#section=data-r14&hw=... .
- jrs95 9y agoIt's rather bloated, and constantly throws exceptions for control flow. It can be convenient, but it's not really worth it in my opinion.
- ddorian43 9y agoWhich is in your opinion ?
- jrs95 9y agoI guess it's all my opinion, other than exceptions for control flow. Set your debugger to pause on all exceptions and then hit a hello world endpoint...it's terrifying.
- le-mark 9y agoI sometimes see people object to exception based control as you do here. I get it; it's essentially goto in diguise. But I've never read anyone discuss the pros and cons, or definitively call it out for what it is. Do you have any references on this topic?
- peoplewindow 9y agoExceptions for control flow are a performance problem in most environments. The JVM does a good job of optimising exceptions very aggressively but throwing one is a relatively expensive operation if the JIT compiler wasn't able to fuse the throw/catch together. It's a bit weird to use exceptions for control flow for this reason.
- jrs95 9y agoI don't, but the when exceptions become the norm it makes debugging much more difficult. I'm not an expert on the subject, but it seems to have a negative impact on performance as well. And in the case of a simple web app, it just shouldn't be necessary. Maybe it makes sense for Spring to do it, but that would indicate that it's more complex than it needs to be.
- alanfranzoni 9y agoI don't understand the benchmark completely (there seem to be some web server or "network programming framework" mingled with web frameworks? wut?), by the way I'm sure that pure speed is not Spring best virtue, and it's not Java's either, unless you take care at pre-warming the JIT and you've got enough RAM (and I suppose that, even then, Spring would be slower than other, 'shallower' frameworks). Spring makes it easy and fast to develop web applications, AND evolve them in time. A lot of things are ready out of the box, but you can easily customize many, many parts of your application when and if you actually need it, substituting what the framework would do for what YOU actually need. I haven't found anything like that, yet, in other web frameworks (admittedly: there's tons out there, so I probably tried 1% of them).
- kod 9y ago> I'm sure that pure speed is not Spring best virtue, and it's not Java's either Go look at those benchmarks again. Over half of the top 10 are JVM servers.
- alanfranzoni 9y agoYes... SERVERS... not frameworks. Usually Java-based frameworks are a bit more complex than Python/Ruby/Javascript based ones.
- kod 9y agoPlain old java servlets are the #1 result on the json benchmark, at over half a million requests per second. The implementation is less than 40 lines, most of which is imports / comments / curly braces. I have no idea what point you're trying to make with regards to complexity or some kind of server vs framework distinction.
- cutler 9y agoIsn't Hibernate still the default ORM in the Spring community? If so, what's changed? Hibernate is a monstrosity. Then again, so is Java so I'm still scratching my head trying to understand how anyone is jumping ship from Rails to Spring when Rails was originally an oasis for Java refugees.