As I develop APIs for my application, I've been curious about the difference between defining functionality methods like this:
class Foo {
static method1(req, res) {}
static method2(req, res) {}
}
and
class Foo {
method1(req, res) {}
method2(req, res) {}
}
I understand that static methods are attached directly to the class and cannot be called on instances of the class. They are typically used for creating utility functions. However, I am wondering if there are any disadvantages or effects of not using static when implementing functionalities in my application.