본문 바로가기
[Kotlin Tutorial] DSL construction - Chap 11. [Kotlin Tutorial] DSL construction - Chap 11. 참조 : Kotlin in action 11.1. From APIs to DSLs -DSL 을 작성하기 전에 생각해봐야 할 것이 있다. 우리의 (Kotlin?) 궁극적 목표는 가독성과 유지보수성을 최대로 늘리는 것.그것은 곧 좋은 API 를 설계하는 것으로 이어진다. 그렇다면 API 가 clean 하다는 것은 무슨 의미일까?1. 사용자가 읽기 좋은 것. 그것은 name 과 concept 을 잘 잡는 것이다.2. 의미없는 syntax 는 빼고, 최소한의 코드로 code 가 읽기 좋은 것. -Kotlin 에서는 clean API 를 위해서 extension function, infix calls, lambda syntax sh.. 2017. 9. 14.
[Kotlin Tutorial] Annotation 과 Reflection #2 [Kotlin Tutorial] Annotation 과 Reflection #2 참조 : Kotlin in action 10.2. Reflection: introspecting Kotlin objects at runtime -Kotlin 에서의 reflection 은 java.lang.reflect package 의 API 들과 kotlin.reflect package 의 API 들을 사용한다.Kotlin 의 reflection 은 Java 에 없는 nullable type 이나 properties 들의 접근을 가능하게 한다. -runtime lib 의 size 를 줄이기 위해, kotlin 의 reflection API 는 kotlin-reflect.jar 라는 별개의 jar 로 pakcage 되어 있.. 2017. 9. 12.
[android] ListView scroll 할 때 Toolbar 감추기 [android] ListView scroll 할 때 Toolbar 감추기 https://mzgreen.github.io/2015/06/23/How-to-hideshow-Toolbar-when-list-is-scrolling%28part3%29 -Design Support Library 의 CoordinatorLayout 과 Behavior 를 사용하여 쉽게 구현 가능하다. -Design Support Library 를 사용하기 위해 dependencies 에 compile 을 추가해 넣어야 한다. compile 'com.android.support:appcompat-v7:22.2.0'compile 'com.android.support:recyclerview-v7:22.2.0'compile 'com.an.. 2017. 8. 5.
[android] Material Support Library [android] Material Support Library http://code.hootsuite.com/tips-and-tricks-for-android-material-support-libraryhttps://android-developers.googleblog.com/2014/10/material-design-on-android-checklist.html -material support lib 을 사용하기 위해서는 build.gradle 에 dependency 를 추가해주어야 한다. dependencies { compile 'com.android.support:appcompat-v7:21.0.+'} -App theme 도 바꿔주자. -Activity 도 ActionBarActivity 를 상속받.. 2017. 7. 8.
[iOS Study] 병렬 프로그래밍 가이드 ( operation queue ) [iOS Study] 병렬 프로그래밍 가이드 ( operation queue ) https://developer.apple.com/library/ios/documentation/General/Conceptual/ConcurrencyProgrammingGuide/OperationObjects/OperationObjects.html#//apple_ref/doc/uid/TP40008091-CH101-SW1 Operation Object 에 대한 이야기 -Operation object 는 NSOperation class 의 인스턴스를 이야기한다.NSOperation class 는 abstract base class 로 subclass 를 구현해야 한다. -NSInvocationOperation 과 NSBlock.. 2017. 7. 2.
Class Diagram 에 대한 구체적인 내용들. Class Diagram 에 대한 구체적인 내용들. 참조 : http://www.nextree.co.kr/p6753/ > - UML 에서 제공하는 기본 요소 외 추가적인 확장요소. - 으로 class 이름에 앞서 마킹한다. - 주로 사용되는 stereotype 은 , , , 등이 있다. - interface 의 경우 interface component 가 따로 있어 stereotype 을 사용하지 않아도 되며, abstract 의 경우도 stereotype 보다는 {abstract} 를 class 나 method 뒤에 붙이는 형태를 사용하는 것이 일반적이라고 한다. ( 일반적인지 검증 필요 ) > - abstract 메소드들은 italic 체로 표기하거나, {abstract} 를 class 이름 다음 혹.. 2015. 6. 28.
Eclipse 에서 Android Studio 로 넘어가기. Eclipse 에서 Android Studio 로 넘어가기. Work spaces 와 Sub-Projects 여 안녕~ Eclipse 에서는 Workspace 와 library projects 개념이 친숙했을 것이다.Android Studio 에서는 projects 들은 Modules, library project 들은 Library Modules 이라는 개념으로 통한다. Module 안뇽~ 반가워~ : ) Module 은 독립적으로 실행 가능하고, 테스트 되고, 디버그 되는 녀석을 이야기한다.각 모듈은 각각의 gradle build file이 필요하다.gradle build file 은 android version range, dependency, meta data 등을 포함한다. 개선된 Interfa.. 2014. 3. 27.
반응형