hyeffie / juice-maker-ios Goto Github PK
View Code? Open in Web Editor NEWThis project forked from andyanappdev/juice-maker-ios
[SeSAC x 맛있는코드] '쥬스메이커' 프로젝트의 개인 저장소입니다.
This project forked from andyanappdev/juice-maker-ios
[SeSAC x 맛있는코드] '쥬스메이커' 프로젝트의 개인 저장소입니다.
지금까지 템플릿으로 제공되었던 main 스토리보드 파일을 활용해 구현을 하고 있었다.
Main 안에 화면에 view가 추가되어 있고, 해당 view controller 인스턴스를 생성할 때는
이때 vc 타입의 이름을 하드 코딩하는 방식이 적절하지 않다고 생각해서 StoryboardIdentifiable 프로토콜과 기본 구현을 만들어서 타입으로 접근할 수 있도록 했다.
그런데 여전히 스토리보드를 사용함에 있어서 crash 발생 가능성은 존재했고, 리뷰어한테 이 부분에 대해 조언을 구했다.
리뷰어는 다음과 같은 조언을 해주셨다.
결과적으로 API 내부적으로 발생하는 에러를 막는다기 보다는.. 구현으로서 위험을 최대한 방지하는 쪽의 구현을 추천해주신 것 같다.
암튼 최대한 에러를 프로젝트 시스템적으로 막을 수 있도록 구현해보자.
실질적인 문제는
커스텀으로 초기화할 수 밖에 없는데 이게 init 에서 안 된다는 것이다.
왜 안되냐면 ...
// TBD
과일을 store에서 제거하고나면 끝인 프로세스. 리턴하거나 리턴 받는 과일들을 전달하지는 않는 것 같다.
어떤 Use Case가 있을까
StockDisplay
valueChanged
이벤트 발생하면 해당 과일 재고 레이블 업데이트 → StockModifier
use case 분석
fetch
: 전체 현황을 참조해 해당 레이블만 바꾸기update
: 레이블을 위한 데이터를 전달해 해당 레이블을 업데이트 ✅지금 EachFruitStore 로 구현되어 있는 속성을 딕셔너리로 바꿔보기
재활용할 수 있는 메서드 만들기, 라우터
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.