Comment by bdangubic

Comment by bdangubic 3 days ago

19 replies

never had any issues debugging as I am never debugging the scheduler (that works :) ) but my own code.

and what exactly is “cronService”? you write in each service or copy/paste each time you need it?

vbezhenar 2 days ago

`cronService` is an injected instance of some class, probably provided by framework. My point is to demonstrate alternative, imperative way of defining cron tasks, as compared to declarative one.

  • vips7L 2 days ago

    A better name would probably be CronScheduler or something else. “Service” is always overused and doesn’t actually describe or mean anything.

alex_smart 3 days ago

You can write your own libraries?

My goodness. What a question!

  • throwaway7783 3 days ago

    Whole point of spring is so you don't have to write your own libraries. Batteries included and all.

    • alex_smart 2 days ago

      What if I told you - you can use a batteries-included framework, and still write your own libraries specifically only for things you want your own version of and want to share across projects?

      The problem isn't that I don't know how to use a batteries included framework. The problem is that you guys don't know there is even an option to reuse your code by writing libraries.

      • throwaway7783 2 days ago

        Why are you assuming you cannot write your own library and use it with Spring? It's not an either/or, just like most frameworks are. You are framing it as if there is only one way to do it in spring.

        Please do not project things like "you guys don't even know..". I'm one of "you guys" , and have built production code in a variety of languages and frameworks. So this "you guys" knows exactly what he/she is talking about.

  • bdangubic 3 days ago

    you write your own database driver? encryption?

    • alex_smart 2 days ago

      Why would I write my own database driver or encryption just because I wanted to implement my own "cronService"?

    • blackoil 2 days ago

      If you want to build an application from scratch, you must first create the universe.

      • alex_smart 2 days ago

        All this because I told one guy who asked "what exactly is “cronService”? you write in each service or copy/paste each time you need it?" that they can reuse code by writing a library instead of copy/pasting it?

        If this is the level of incompetence encouraged by a framework, I would avoid using it just to avoid the chance of hiring people like you.

        Just kidding. Spring boot is great. But yeah, I would fire people with this attitude without blinking an eye.