9

I regret moving to backend. I loved the days when I used to write lines of code and refresh my browser for the changes to be displayed on the screen. I loved seeing the output of my code, the code flow, the light weight text editor, the visual satisfaction and the chrome debugger.

Now I am fucked up, I am working on creating microservices for restful api. I am hating everything about it. The fact that I should compile the entire war, manually copy them to a webapp folder, restart my tomcat and wait for 5 minutes just to see my code, and the text editors are just a pain in the ass, the debugger sucks too.

I was so looking forward to being a backend Dev because I thought Java was cool and I also was fedup with cross browser optimizations on the front end. Now I would gladly write a streaming service foe ie6. Spring has fucked me up so hard

God save me from this mess.

Comments
  • 2
    I see your worries and understand, but as a fullstack developer I‘m actually feeling more joy seeing my microservices providing the right data fast and beautified for the actually „dump“ frontend. Even more better and exciting it is when complete independent services talk to each other and share data or act on events. Doing frontend was sometimes pain in the ass for me as I wasted hours by trying to allign things. Regarding debugging and deployment: I always develop and test first on localhost and debugging works perfect with the right tools...including IDE
  • 0
    @oxmox sounds like what I thought I would be doing when I started. Can you please share your stack.

    I make use of spring for creating rest services and MySQL for db and tomcat for server. I wish there was something that would let me replace only the code I have modified instead of the entire war each time I make a change. I thought Java would have had it because there are lots or javascript library that does that.

    Please share your tech stack. I would like to hear more about it.
  • 1
    If you are building microservices with Spring, then why not just use Spring Boot along with the embedded tomcat? That'll save you time from copying over stuff to a standalone tomcat. Moreover, you can do hot code reloading as well. Java 8 has pretty good support for that.

    And if your company can shell out some money, try JRebel.

    And honestly, you don't need to restart your tomcat to get quick feedback about your REST API. Just write proper unit test cases with proper mocks to test your services. You can also write contract tests and use cucumber for integration tests.

    I don't even restart my tomcat when doing development. Just write tests. Run them. Takes maybe 10 seconds for the entire suite to run.

    I started out with JavaScript too ;)

    I feel, the feedback loop is shorter with backend API development
  • 1
    And the term "microservice" would be contentious considering it takes 5 minutes to start up.

    I have worked on a number of monoliths. The fastest one took 7 minutes to startup. And that was a real monolith, albeit fairly modular.

    And having a dedicated tomcat instance is questionable during development. You should really look at embedded tomcat.

    If having a dedicated tomcat instance was mandated by some know-it-all fucktard, and you can't control the decision (although you could during development at least), maybe you should automate the process using your build tool, which I am guessing would be maven or Gradle. Hell, you could write a shell script to run the build, package the war, stop tomcat, delete the old deployment, extract the new one and restart tomcat. It would definitely shave off some time. And that time would add up if you are doing this a lot.
  • 1
    @noob-baker @badcoder just nailed it...nothing to add
  • 1
    If you were in node ecosystem, you would have been very happy in backend too, I dumped REST for GraphQL.
Add Comment