3
votes
Is it good practice to return ApiResponse from a Spring service layer?
Let me change your question a little bit, as it could be general instead of Spring based.
Is it good practice to return an API Response from a service layer?
There is going to be multiple comments ...
2
votes
Are there any good and modern approaches, to have variables that feel global (no need to pass them around explicitly), yet are local to an instance?
As the experts in this community point out, the solution is obvious: use OOP, enclose the state in objects and live a happy life:
import {F} from './f';
...
// myLibrary/index.ts
export class ...
1
vote
Is it good practice to return ApiResponse from a Spring service layer?
To be short, the answer is clearly no, but I will use many approach to argument this answer:
programmatic and pragmatic approach:
You are using Spring ApiResponse, and what if you use @Controller ...
1
vote
Is it good practice to return ApiResponse from a Spring service layer?
Is it good practice to return ApiResponse from a Spring service layer?
David Parnas proposed about modularization, and in particular the benefits of choosing your module boundaries so that the ...
1
vote
why would one use the "Functional Options" pattern in go?
The primary advantages are that
It's a very clean constructor signature
type optfunc func(*MyObject)
func NewMyObject(opts ...optfunc) *MyObject {...}
It's infinitely scalable. You can pass in as ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
design-patterns × 4520design × 912
object-oriented × 694
object-oriented-design × 606
c# × 546
java × 510
architecture × 464
c++ × 198
mvc × 192
domain-driven-design × 191
php × 190
python × 132
dependency-injection × 126
programming-practices × 123
javascript × 111
patterns-and-practices × 111
architectural-patterns × 107
.net × 101
interfaces × 96
database × 94
api-design × 86
anti-patterns × 83
database-design × 80
refactoring × 80
inheritance × 78