Service 구현 과정 중 static / class method 에 대한 고찰 #266
seongmin221
started this conversation in
General
Replies: 1 comment
|
먼저 스스로 드는 생각은 아래와 같습니다
이런 생각대로라면 KeychainService는 인스턴스로 만들 필요가 없고, 내부에 정보를 담을 필요가 없기에, |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
저희 서비스에서 토큰과 같이 안전하게 보관되어야 하는 요소들은
Keychain에 저장하고 있습니다리팩토링 이전에는 단순히
static func로 선언하여 손쉽게 사용할 수 있었는데,이번에 리팩토링 하면서
static func를 쓰는게 좋을까? 에 대한 의심이 생기더라구요 ??그래서 이 discussion을 열게 되었고, 구글링하면서 찾아본 것들을 아카이빙 해 둘 생각입니다 !
언제
static을 쓰면 좋을지, 언제 쓰면 안좋을지를 생각해보려구요 !!All reactions