Timeline for Can I use a static Service class if I'm not using DI?
Current License: CC BY-SA 4.0
7 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Mar 30, 2022 at 17:46 | answer | added | freakmind | timeline score: 0 | |
| Mar 28, 2022 at 23:51 | vote | accept | user648336 | ||
| Mar 28, 2022 at 9:28 | answer | added | Flater | timeline score: 1 | |
| Mar 28, 2022 at 6:28 | comment | added | Alexei Levenkov | Use service locator pattern with your favorite DI framework in your UI layer and resolve next layers through it... There generally should be no code in UI layer of web service (just return JSON version of response from "service layer") - so should not impact ability to test much. | |
| Mar 28, 2022 at 5:53 | comment | added | Rik D | When you make something static, you can no longer (easily) test the client of that thing in isolation. | |
| S Mar 28, 2022 at 5:38 | review | First questions | |||
| Mar 28, 2022 at 12:40 | |||||
| S Mar 28, 2022 at 5:38 | history | asked | user648336 | CC BY-SA 4.0 |