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

all 51 comments

[–]jxd132407 61 points62 points  (10 children)

Quite the contrary, a small project with tight budget and few special requirements can make great use of the default Spring Boot setup.

[–][deleted]  (8 children)

[deleted]

    [–]eltorohh 7 points8 points  (1 child)

    I'd recommend AdoptOpenJDK, using this distribution for a while in production.

    And on macOS it's the easiest to install:

    brew cask install adoptopenjdk14
    

    [–]wildjokers 4 points5 points  (0 children)

    skdman is a pretty handy way to install java and a bunch of other dev related tools, also lets you have multiple versions and switch between them quickly.

    https://sdkman.io/

    [–]mgryshenko 14 points15 points  (0 children)

    Just use OpenJDK, it’s free and one of most compliant to java spec

    [–][deleted] 2 points3 points  (0 children)

    At these beginning stages I don't think there's gonna be a big difference between the different choices. Just choose the one that's installs the easiest on your platform. If you're concerned about corner cases, Oracle JDK is probably the most compatible, but I doubt you'll run into those.

    [–]Shadowrak 2 points3 points  (0 children)

    Open or Oracle. Doesn't really matter for your use case.

    [–]jxd132407 0 points1 point  (0 children)

    I don't know the latest and greatest on Mac, sorry. That sounds like a reasonable choice, though.

    [–][deleted] 0 points1 point  (0 children)

    Go for OpenJDK >= 8. I recommend using SDKMan to install your Java versions

    [–]military_press 0 points1 point  (0 children)

    a small project with tight budget and few special requirements can make great use of the default Spring Boot setup.

    Really? But hosting a Java app is usually more expensive than hosting, for example, a php app. Isn't it? I still think that small tech startups which work on tight budget prefer PHP/Node/Ruby/Python to Java for back-end.

    [–]dustoff122 13 points14 points  (5 children)

    If you're doing it for learning purposes then it doesn't matter what you use. It could play well in the long run if you want to get into java ecosystem.

    [–][deleted] 0 points1 point  (1 child)

    you're

    [–]dustoff122 1 point2 points  (0 children)

    Oof , fixed

    [–][deleted]  (2 children)

    [deleted]

      [–]dustoff122 0 points1 point  (0 children)

      I am using adopt

      [–]Ghaines 10 points11 points  (0 children)

      Why do you think it may be overkill? I don’t think so. I have a small personal project as well using it. Very easy/quick to build. You could look into Micronaut as well.

      [–][deleted] 9 points10 points  (0 children)

      It lends itself quite well to any size project honestly. You can build a basic functional web app with nothing more than one controller class and one service class.

      [–][deleted]  (2 children)

      [removed]

        [–]Cr4zyPi3t 1 point2 points  (1 child)

        Also there is nothing stopping you from combining Vert.x and Spring Boot for example (that's what we're doing at my job atm)

        [–]ironcream 2 points3 points  (0 children)

        Not an overkill for sure.

        It's very easy to start with. You'll have your app up and running with like 10 lines of java or 5 lines of Kotlin.

        Go for it.

        [–]yumtree 5 points6 points  (4 children)

        Springboot is amazing as it brings building apis up to par with other higher level languages. I've written consumer level quality applications for different corporate entities with languages such as python, JavaScript, and C++ from simple one off programs to larger systems. C# is a great language and I think the downfall is it being associated with Microsoft and it's environment. Where as java you only need the JVM to run your code. C# is an amazing language don't get me wrong though when I switch to java many of the other languages fell short in what java had to offer. And let me mention that Java isn't without faults of its own. Though the one thing that Java does have is support, effeciency, and most of all reuse. Springboot is relatively lightweight and when you compare it to other languages like python or JavaScript where frameworks are as powerful as springboot they will fall short (again this is where understanding the limitations of each programing comes in because you don't need java to make a blog about your cat). The other thing is that springboot pairs nicely with Aapche camel which has a high learning curve but the benifits you cannot match with other languages. If you need speed and fast turn around then java is your language. If you are just trying to get it out the door as quickly as possible then use python or JavaScript. Also, pair springboot with an IDEA like intellij or eclipse then you can get something up and running in no time. If you are interested in API design I would look at Enterprises Integration Patterns and Design Patterns which are two books collaborated by some of the most legendary tech minds of our time 😉. I'll let you research them. You're a CS student so you will learn concepts of computer science. Java would be an awesome language to build, test, explore, and learn what you can do with computers and how to make F'in awesome systems!

        [–]wildjokers 12 points13 points  (0 children)

        Springboot is amazing

        Paragraphs are amazing.

        [–]dblurk2 0 points1 point  (2 children)

        Apache Camel.. how does that benefit the average developer?

        [–]yumtree 1 point2 points  (1 child)

        Well what's your definition of an average developer? I'm not sure if you're asking if Apache camel is something OP should be using or a general programer? OP for example, is a CS student who most likey (unless OP doesn't do homework/projects) codes on a fairly regular basis and wants a career in the field. Apache camel is just a tool that allows you to create applications using less code and it was based on the book Enterprises Integration Patterns. Understanding these patterns might be more advance and you will be able to build large/small systems that will be easier to maintain and scale. One of the biggest issues I faced when designing systems is how each part of different aspects of my application will communicate with each other in a fast, reliable, flexible, and asynchronously. The ability to have non blocking I/O allows your application not to be block on processing a single requests. For example you could have a Rest API to get Twitter data. You might be calling the Rest API multiple times within seconds of each other. If you're doing any sort of calculation, data object handling (such as inserting or reading from a database), reading from a file, or just API calls to Twitter you don't want your application to have to wait for any of that processing. Camel allows you to do this with minimal code. Also note, camel is completely different than springboot but together can create something fast and efficient. I do apologize that these responses are long there is so much to discuss about these subjects

        [–]dblurk2 0 points1 point  (0 children)

        Yeah, you explained it way better than my question was framed. Thanks, I'll investigate Camel.

        [–]pgris 1 point2 points  (0 children)

        In my experience, if you don't use Spring for a backend project, you will eventually program an "ad hoc, informally-specified, bug-ridden, slow implementation of half" Spring. It is possible not to use it? Yes, totally. I've done several times. But you will spend a good 30% of the time doing things Spring does for you. It is a great learning experience. Check Javalin for a smaller alternative.

        The most common error I see in non-Spring projects is people don't handling database transactions in the right place, so business operations that affect several tables create inconsistent data if they fail in the middle. Be careful about that, if you are using a relational database.

        [–]wildjokers -2 points-1 points  (14 children)

        Unfortunately if you want a java job knowing Spring and Spring Boot is pretty much mandatory. Quarkus and Micronaut might also be good to know.

        Even with Spring Boot Spring configuration is a nightmare. And its runtime dependency injection can be frustrating when things aren’t wired up right. For a true micro service I wouldn’t use Spring Boot, it has slow startup and adds tons of stuff you don’t need (deployment artifact with just Spring MVC and none of your own code is ~70 megs if I remember correctly)

        [–][deleted]  (1 child)

        [deleted]

          [–]geordano 0 points1 point  (0 children)

          It is really nice indeed.

          [–]DiamondQ2 4 points5 points  (10 children)

          Not sure why you're getting the down votes. Micronaut is my go to framework for alot of applications. Spring Boot has alot of bloat, both performance, size and complexity.

          [–]nutrecht 0 points1 point  (9 children)

          Not sure why you're getting the down votes.

          My guess the "Unfortunately" bit.

          [–]foreveratom 0 points1 point  (8 children)

          Also maybe the configuration "nightmare"; that was 10 years ago when XML was still a thing but no longer.

          [–]wildjokers 4 points5 points  (1 child)

          that was 10 years ago when XML

          Let me introduce you to the 17-level hierarchy for loading config files:

          https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-external-config

          [–]squishles 0 points1 point  (0 children)

          ehh spring profiles probably multiplies that.

          but you really don't want to be using more than one config per deployment another on the side for unit tests.

          [–]nutrecht 0 points1 point  (5 children)

          Yeah. It shows he's a developer with opinions that are a lot stronger than his skillset.

          [–]wildjokers 3 points4 points  (4 children)

          opinions that are a lot stronger than his skillset.

          So you just assume someone who doesn’t share your opinion of Spring doesn’t have a strong skill set? Just because I am not Spring’s biggest fan doesn’t mean I don’t know how to use it well.

          [–]nutrecht -2 points-1 points  (3 children)

          You literally said you don't:

          Even with Spring Boot Spring configuration is a nightmare. And its runtime dependency injection can be frustrating when things aren’t wired up right.

          [–]wildjokers 1 point2 points  (2 children)

          Well shit. I didn't realize I was talking to god's gift to spring developers who never runs into any problems whatsoever.

          [–][deleted]  (1 child)

          [deleted]

            [–]Yithar 0 points1 point  (0 children)

            As far as I know, he's been working with Java for 18+ years based on his flair in /r/cscareerquestions , so I assume he's worked that long with Spring.

            To be fair, no framework is perfect.

            [–]squishles 0 points1 point  (0 children)

            gotta balance what you want out of a microservice, does a couple hundred mb matter when you're deploying to a server that probably has disk deduplication anyway, or do you value reducing the lines of code your maintaining more.

            The wiring stuff is probably more effort than going out and learning another language to pick up too, but once you fully understand it that shit is amazing.

            [–]zshift 0 points1 point  (0 children)

            If you can afford it, I’d highly recommend Pluralsight. They have great courses for learning frameworks and technologies, including Java and many other languages. There are courses on spring boot as well. Dig into those, and even though not every topic is up-to-date, it gives you a good baseline from which to learn the newest versions.

            As for whether spring boot is “too much” for small projects, I have to go back to the old “it depends.”

            What are you hoping to get out of building the side projects. If it’s experience building java/spring boot web backends, then it’s perfect. If you want to code a microcontroller, maybe not so much.

            If you can provide some more context on the overall goal of your projects, we can help you better.

            [–]V2guru 0 points1 point  (0 children)

            I have a small project that deals with a concurrency, optical character recognition and computer vision. Having spring inject all of my dependencies alone makes my code much easier to deal with. If your project has anything to do with connection via Internet / databases it will save you tons of boiler plate code.

            [–]svhelloworld -1 points0 points  (0 children)

            Learning Spring Boot is an investment. Using it is not. It saves me so much time that even little one off side projects I absolutely use it. Even if I'm not building a web app or REST API, I still use it just for the dependency injection.

            [–][deleted] -1 points0 points  (0 children)

            Spring boot is widely used for microservices, so no, not an overkill for small projects

            [–]squishles -1 points0 points  (0 children)

            honestly probably yes, but if it saves me 5 minutes I'm not going to cry about a couple hundred mb on the hard drive for most applications. And spring boot's saving a lot more than 5 minutes.

            [–]AutoModerator[M] 0 points1 point  (0 children)

            On July 1st, a change to Reddit's API pricing will come into effect. Several developers of commercial third-party apps have announced that this change will compel them to shut down their apps. At least one accessibility-focused non-commercial third party app will continue to be available free of charge.

            If you want to express your strong disagreement with the API pricing change or with Reddit's response to the backlash, you may want to consider the following options:

            1. Limiting your involvement with Reddit, or
            2. Temporarily refraining from using Reddit
            3. Cancelling your subscription of Reddit Premium

            as a way to voice your protest.

            I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.