4 ms·
srch is namespace: I think it was about line 8 in this file: https://github.com/Clay-Ferguson/meta64/blob/master/src/main/resources/public/ts/search.ts https:
by ClayFerguson 10y ago
srch is namespace:
I think it was about line 8 in this file:
https://github.com/Clay-Ferguson/meta64/blob/master/src/main/resources/public/ts/search.ts https://github.com/Clay-Ferguson/meta64/blob/master/src/main...
That's funny that you don't like singletons. Not sure how you got brainwashed about them, but they are good and VERY widely used today by all major codebases. Singleton is literally the "default scope" for all Spring Beans, so you are so completely clueless about that.
- Kiro 10y agoYou need to learn how to deal with dependencies properly. When reading a file it should always be obvious where the dependency comes from. There are a few use cases for singletons but using them as globals to avoid passing dependencies around is simply bad practice. Your code is a tightly coupled and untestable mess at its current state. It's funny that you arrogantly just dismiss every single person in this thread as idiots. You need to take a step back and consider that you might actually be wrong.
- ClayFerguson 10y agoSo it's not obvious to you that 'podcast.open()' is implemented in 'podcast.ts'? There is a naming-convention in effect.
- Kiro 10y agosrch is defined in search.ts so no, that's not obvious at all. Having a naming convention is no reason not to do proper dependency management. This global approach just obscures things and makes it untestable.
- ClayFerguson 10y agohaha. There is ONE variable that violates the naming convention. srch!=search.ts. I had a reason for doing that but just never changed it back. The code will easily convert to modules if I ever decide to. For now I'm just keeping it simple. (i.e. no circular-reference risk, etc) It's easy to throw rocks at a design, but if you spent a day working in meta64 you'd realize how intuitive it is. Obscure is never the word you'd use.