85
Software Maestro 3 rd Rest 3 Team 정정정 , 정정정 , 정정정 정정정정정정 정정정정 정정정정 정정정정정

안드로이드로 풀어보는 플러그인 패턴이야기

  • Upload
    eva

  • View
    526

  • Download
    3

Embed Size (px)

DESCRIPTION

Plug-In Pattern

Citation preview

Page 1: 안드로이드로 풀어보는 플러그인 패턴이야기

Software Maestro 3rd

Rest 3 Team

정승수 , 김동우 , 송태웅

안드로이드로 풀어보는플러그인 패턴이야기

Page 2: 안드로이드로 풀어보는 플러그인 패턴이야기

Contents

Patterns for Plug-Ins Introduction

Android App Management &

Organization

Chapter 1 : General Plug-In

Techniques

Page 3: 안드로이드로 풀어보는 플러그인 패턴이야기

Contents

Patterns for Plug-Ins Summary

Chapter 2 : Organisation And

Process

Conclusion

Page 4: 안드로이드로 풀어보는 플러그인 패턴이야기

Patterns for Plug-Ins Introduce

“ WHAT IS PLUG-IN ? ”

“ WHAT IS PATTERNS FOR PLUG-INS ? ”

Page 5: 안드로이드로 풀어보는 플러그인 패턴이야기

Patterns for Plug-Ins Introduce

조금 더 유연한

“ 소프트웨어 ”

“ 하드웨어 ”

Page 6: 안드로이드로 풀어보는 플러그인 패턴이야기

Patterns for Plug-Ins Introduce

“ ANDROID PLATFORM ”

“ ANDROID APP ”

Page 7: 안드로이드로 풀어보는 플러그인 패턴이야기

Patterns for Plug-Ins Introduce

어떻게 소프트웨어의 유연함을 성취 했을까 ?

Careful design

Configurable

Using software component

선택적 실행

변화종류 예상

설정에 따른

가변 & 불변 구분

기능 분리독립성 , 교환성

Page 8: 안드로이드로 풀어보는 플러그인 패턴이야기

Android App Management & Organization

Page 9: 안드로이드로 풀어보는 플러그인 패턴이야기

Android App Management & Organization

“ ANDROID 제공되는 개발 환경 ”

Page 10: 안드로이드로 풀어보는 플러그인 패턴이야기

Android App Management & Organization

Page 11: 안드로이드로 풀어보는 플러그인 패턴이야기

Android App Management & Organization

Page 12: 안드로이드로 풀어보는 플러그인 패턴이야기

Android App Management & Organization

Application Framework

Page 13: 안드로이드로 풀어보는 플러그인 패턴이야기

Android App Management & Organization

Activity Life cycle

Page 14: 안드로이드로 풀어보는 플러그인 패턴이야기

지정된 폴더로 Apk 의 설치

Android App Management & Organization

Page 15: 안드로이드로 풀어보는 플러그인 패턴이야기

Android App Management & Organization

Apk 의 구성 , 설치

Page 16: 안드로이드로 풀어보는 플러그인 패턴이야기

Chapter 1 : General Plug-In Techniques

Page 17: 안드로이드로 풀어보는 플러그인 패턴이야기

Pattern 1. Plug-In

Page 18: 안드로이드로 풀어보는 플러그인 패턴이야기

Pattern 1. Plug-Incontext

이식성

확장성

소프트웨어 제품 배포 이후에 ..

Page 19: 안드로이드로 풀어보는 플러그인 패턴이야기

Pattern 1. Plug-InProblem

어떻게 소프트웨어 제품 배포 이후에 기능을 수정 및 추가 할 수 있을까 ?

기능

기능기능

기능기능

Page 20: 안드로이드로 풀어보는 플러그인 패턴이야기

Pattern 1. Plug-InForces

미래에 필요할 기능 예측 불가 !! 배포는 많은 비용

Page 21: 안드로이드로 풀어보는 플러그인 패턴이야기

Pattern 1. Plug-InSolution

Platform

기능

기능기능

기능기능

기능기능

기능

기능

기능

기능을 밖으로 빼라 !

Page 22: 안드로이드로 풀어보는 플러그인 패턴이야기

Pattern 1. Plug-InSolution

Platform

그리고 분리된 COMPONENT(PLUG-IN) 에 위치시켜라 !

Plug-In

Plug-In

Plug-In

Plug-In

Plug-In

Plug-In 인터페이스

( 인터페이스는 플러그인의 연결고리 )

Page 23: 안드로이드로 풀어보는 플러그인 패턴이야기

배포된 이후에 기능이 개발되어 추가 가능 !!

기능 추가시 플랫폼은 영향 받지 않는다 .

Pattern 1. Plug-InSolution

Page 24: 안드로이드로 풀어보는 플러그인 패턴이야기

완제품보다 기능을 밖으로 뺀 소프트웨어가 시장 진출이 빠르다 .

만능 소프트웨어

Pattern 1. Plug-InConsequences

Page 25: 안드로이드로 풀어보는 플러그인 패턴이야기

Plug-In

registers

itself

conforms to

Plug-In Lifecycle

Plug-In Contract Plug-In Registration

Plug-In Package

Framework-ProvidingPlatform

One Plug-In per Task

Pattern 1. Plug-InRelation Pattern

Page 26: 안드로이드로 풀어보는 플러그인 패턴이야기

Pattern 2, 3. Plug-In Contract ,

Framework-Providing platform

Page 27: 안드로이드로 풀어보는 플러그인 패턴이야기

Platform

Plug-In

Plug-In

Plug-In

Plug-In

Plug-In

Plug-In 인터페이스

PLUG-IN 프로젝트 구조가 구축 !!

인터페이스 ? 연결고리 ?

Pattern 1. Plug-InContext

Page 28: 안드로이드로 풀어보는 플러그인 패턴이야기

어떻게 플러그인 INTERFACE 를 정의할까 ?

“ Android Platform ”

“ 구현된 Activity ”Interface

Pattern 1. Plug-InProblem

“ 구현된 Service ” . . .

Page 29: 안드로이드로 풀어보는 플러그인 패턴이야기

“ Plug-In Contract ” 이런 약속으로 의존관계를 구성하겠다 .

AndroidPlatform

AndroidFramework

Interface

AndroidPlug-In

(ex. Activity)

AndroidPlug-In

Definition

Plug-In 의기능 (function) 들을알고 활용한다 .

Plug-In 을 활성화 , 중지 ,교환 , 소통

가능하게 제시

Pattern 1. Plug-InSolution

Page 30: 안드로이드로 풀어보는 플러그인 패턴이야기

“ Plug-In Contract ”

Framework Interface

Plug-In Definition( Abstract classes

provided by Android SDK )“ Android Platform ”

“ 특정 Activity , Service 등”

Pattern 1. Plug-InSolution

Page 31: 안드로이드로 풀어보는 플러그인 패턴이야기

Platform

Plug-InPlug-In Definition

“ Interface ”

provide구현

Pattern 1. Plug-InConsequences

Page 32: 안드로이드로 풀어보는 플러그인 패턴이야기

Plug-InFramework Interface

“ Interface ”

though

Platform

Service

Class access

accesscontroll

though

Pattern 1. Plug-InConsequences

Page 33: 안드로이드로 풀어보는 플러그인 패턴이야기

Pattern 3.Framework – Providing Platform 의 예

Pattern 1. Plug-InConsequences

Page 34: 안드로이드로 풀어보는 플러그인 패턴이야기

같은 프레임워크를 제공하는 Platform 에 의해서

Plug-In ( 특정 Activity, Service) 은 재 사용될 수 있다 .

Pattern 1. Plug-InConsequences

Page 35: 안드로이드로 풀어보는 플러그인 패턴이야기

Plug-In ( 특정 Activity, Service) 이 플랫폼에 통합되기 쉬어진다 .

안드로이드 App

Pattern 1. Plug-InConsequences

Page 36: 안드로이드로 풀어보는 플러그인 패턴이야기

Plug-In Contract

Framework-Providing Platform 에 의해서Plug-In 이 이용되고 관리 된다 .

Ex) 안드로이드 Platform

Plug-In Contract 는 Plug-In 와 Framework-Providing Platform 의 관계를 정의

Plug-In 이 따라야할 추상클래스 (Definition) +Plug-In 을 관리할 인터페이스 (Framework) 를 규정

Framework-ProvidingPlatform

Pattern 1. Plug-InSummary

Page 37: 안드로이드로 풀어보는 플러그인 패턴이야기

Plug-In

defines

provides context for

conforms to

Plug-In Contract Plug-In Registration

Plug-In Package

Framework-ProvidingPlatform

One Plug-In per Task

Plug-In Lifecycle

Pattern 1. Plug-InRelation Pattern

Page 38: 안드로이드로 풀어보는 플러그인 패턴이야기

Pattern 4. Plug-In Lifecycle

Page 39: 안드로이드로 풀어보는 플러그인 패턴이야기

Plug-in

Platform

Plug-in

Plug-in

Plug-in

Plug-in

Plug-in

Plug-In Defini-tion

Framework Interface

Pattern 4. Plug-In Lifecyclecontext

Page 40: 안드로이드로 풀어보는 플러그인 패턴이야기

Platform

Plug-in

Plug-in

Plug-in

Plug-in

Plug-in

Plug-in

무거워 !어떻게 ?

Pattern 4. Plug-In Lifecycleproblem

Page 41: 안드로이드로 풀어보는 플러그인 패턴이야기

Platform Plug-in1. Load2. Activate3. Deacti-

vate4. Unload

Pattern 4. Plug-In Lifecyclesolution

Page 42: 안드로이드로 풀어보는 플러그인 패턴이야기

Plug-In Contract

Pattern 4. Plug-In Lifecyclesolution

Page 43: 안드로이드로 풀어보는 플러그인 패턴이야기

플랫폼이 ,라이프싸이클에 따라 실행

Pattern 4. Plug-In Lifecyclesolution

Page 44: 안드로이드로 풀어보는 플러그인 패턴이야기

플러그인 제어 가능상태 점검 가능

Pattern 4. Plug-In Lifecycleconsequence

Page 45: 안드로이드로 풀어보는 플러그인 패턴이야기

Plug-In

conta

ins

defines

provides context for

conforms to

Plug-In Lifecycle

Plug-In Contract Plug-In Registration

Plug-In Package

Framework-Provid-ing

Platform

One Plug-In per Task

Pattern 4. Plug-In Lifecyclerelated pattern

Page 46: 안드로이드로 풀어보는 플러그인 패턴이야기

Pattern 5. Plug-In Registration

Page 47: 안드로이드로 풀어보는 플러그인 패턴이야기

Plug-in

Plug-inPlug-in

Platform

Pattern 5. Plug-In Registrationcontext

Page 48: 안드로이드로 풀어보는 플러그인 패턴이야기

어디 ?

Platform

Plug-in

Plug-inPlug-in

Pattern 5. Plug-In Registrationproblem

Page 49: 안드로이드로 풀어보는 플러그인 패턴이야기

Platform

Directory

Pattern 5. Plug-In Registrationsolution

Page 50: 안드로이드로 풀어보는 플러그인 패턴이야기

DirectoryPlug-in

Plug-in

Plug-in

Plug-In Registra-tion

Pattern 5. Plug-In Registrationsolution

Page 51: 안드로이드로 풀어보는 플러그인 패턴이야기

Plug-in

Plug-in

Plug-in

Platform

경로 ,상태

리스트

Plug-In Registra-tion

Pattern 5. Plug-In Registrationsolution

Page 52: 안드로이드로 풀어보는 플러그인 패턴이야기

AndroidMani-fest.xml

Pattern 5. Plug-In Registrationsolution

Page 53: 안드로이드로 풀어보는 플러그인 패턴이야기

사용자가 편해짐

Pattern 5. Plug-In Registrationconsequence

Page 54: 안드로이드로 풀어보는 플러그인 패턴이야기

Plug-In

conta

insis part of

registers

itself

defines

receives

provides context for

conforms to

Plug-In Lifecycle

Plug-In Contract Plug-In Registration

Plug-In Package

Framework-Provid-ing

Platform

One Plug-In per Task

Pattern 5. Plug-In Registrationrelated pattern

Page 55: 안드로이드로 풀어보는 플러그인 패턴이야기

Pattern 6. One Plug-In per Task

Page 56: 안드로이드로 풀어보는 플러그인 패턴이야기

Pattern 6. One Plug-In per Taskcontext

Plug-inPlug-in

Plug-in

Plug-inPlug-in

Plug-inFunction

협력

Page 57: 안드로이드로 풀어보는 플러그인 패턴이야기

Pattern 6. One Plug-In per Taskproblem

Plug-in Plug-in

Plug-in

Plug-inPlug-in

Plug-in

협력 ? 원활한 통합 ?

Page 58: 안드로이드로 풀어보는 플러그인 패턴이야기

Pattern 6. One Plug-In per Tasksolution

Domain

Plug-InDefinition

CommonIdentifier

SingleResponsiblityPrinciple

단일 책임 원칙

ActivityClass

Intent Filter

Activity

Page 59: 안드로이드로 풀어보는 플러그인 패턴이야기

Pattern 6. One Plug-In per Tasksolution

Android Platform

Domain1 Domain2

인텐트필터정의명

인텐트필터정의명

데이터 교환 및 처리 , 컨트롤

Intent

Page 60: 안드로이드로 풀어보는 플러그인 패턴이야기

Activ-ity

Intent

Broad-cast Re-ceiver

Con-tent

Provider

Ser-vice

Android Application

Pattern 6. One Plug-In per Tasksolution

Page 61: 안드로이드로 풀어보는 플러그인 패턴이야기

모든 플러그인이 원활하게 통신 가능

SpecificData&Cla

ss

Plug-In Definition 이기능적으로 캡슐화

Plug-In

Plug-InDefinition Identifier

CommonIdenti-fier1

CommonIdenti-fier2

Platform

플랫폼은 식별자로 인식해야 한다 .

Pattern 6. One Plug-In per Taskconsequences

Page 62: 안드로이드로 풀어보는 플러그인 패턴이야기

Plug-In

consi

sts

of

corr

esp

ond-

ing

conta

insis part of

registers

itself

defines

receives

provides context for

conforms to

Plug-In Lifecycle

Plug-In Contract Plug-In Registration

Framework-Provid-ing

Platform

One Plug-In per Task

Plug-In Package

Pattern 6. One Plug-In per Taskrelated pattern

Page 63: 안드로이드로 풀어보는 플러그인 패턴이야기

Pattern 7. Plug-In Package

Page 64: 안드로이드로 풀어보는 플러그인 패턴이야기

Plug-in Plug-in

Plug-in

Plug-inPlug-in

Plug-inUser

Pattern 7. Plug-In Packagecontext

Page 65: 안드로이드로 풀어보는 플러그인 패턴이야기

Plug-in Plug-in

Plug-in

Plug-inPlug-in

Plug-in

리소스

도움말

버젼미국

중국

러시아

영국

한국

Pattern 7. Plug-In Packageproblem

Page 66: 안드로이드로 풀어보는 플러그인 패턴이야기

Pattern 7. Plug-In Packagesolution

Plug-in Plug-in

Plug-in

Plug-inPlug-in

Plug-in

리소스

미국

중국

러시아

영국

한국

Plug-In Package

도움말

버젼

CustomPlug-In Interface

패키지를 위한 인터페이스

Page 67: 안드로이드로 풀어보는 플러그인 패턴이야기

Pattern 7. Plug-In Packagesolution

ShippableCompo-

nent

Page 68: 안드로이드로 풀어보는 플러그인 패턴이야기

Pattern 7. Plug-In Packagerelated pattern

Plug-In

consi

sts

of

corr

esp

ondin

g

is s

hopped f

or

usa

ge

wit

h

conta

insis part of

containsregisters

itself

defines

receives

provides context for

conforms to

Plug-In Lifecycle

Plug-In Contract Plug-In Registration

Plug-In Package

Framework-ProvidingPlatform

One Plug-In per Task

Page 69: 안드로이드로 풀어보는 플러그인 패턴이야기

Patterns for Plug-Ins

Summary

Page 70: 안드로이드로 풀어보는 플러그인 패턴이야기

Patterns for Plug-Ins Summaryrelated pattern

conta

ins

Plug-In Lifecycle

Plug-In conforms to

Plug-In Contract

is part of

registers

itself

receives

Plug-In Registration

defines

provides context for

Framework-ProvidingPlatform

is s

hopped f

or

usa

ge

wit

h

Plug-In Package

contains

consi

sts

of

corr

esp

ondin

g

One Plug-In Per Task

Page 71: 안드로이드로 풀어보는 플러그인 패턴이야기

Patterns for Plug-Ins Summaryby Android App Management

“ ANDROID 제공되는 개발 환경 ”

Page 72: 안드로이드로 풀어보는 플러그인 패턴이야기

Patterns for Plug-Ins Summaryby Android App Management

Plug-In Contract

Plug-In

Page 73: 안드로이드로 풀어보는 플러그인 패턴이야기

Patterns for Plug-Ins Summaryby Android App Management

Framework-ProvidingPlatform

Page 74: 안드로이드로 풀어보는 플러그인 패턴이야기

Application Framework

Patterns for Plug-Ins Summaryby Android App Management

Framework-ProvidingPlatform

Page 75: 안드로이드로 풀어보는 플러그인 패턴이야기

Activity Life cycle

Patterns for Plug-Ins Summaryby Android App Management

Plug-In Lifecycle

Page 76: 안드로이드로 풀어보는 플러그인 패턴이야기

지정된 폴더로 Apk 의 설치

Patterns for Plug-Ins Summaryby Android App Management

Plug-In Registration

Page 77: 안드로이드로 풀어보는 플러그인 패턴이야기

Apk 의 구성

Patterns for Plug-Ins Summaryby Android App Management

Plug-In Package One Plug-In per

Task

Page 78: 안드로이드로 풀어보는 플러그인 패턴이야기

Chapter 2 : Organisation And Process

Page 79: 안드로이드로 풀어보는 플러그인 패턴이야기

“ Template Code ”

“ 개발자” “ Subproject ”

“ Customizing ”

Organisation And Process

Page 80: 안드로이드로 풀어보는 플러그인 패턴이야기

“ User ”

“ App ”

“ 안드로이드 마켓 ”

“ Sell Plug-In ”

Organisation And Process

Page 81: 안드로이드로 풀어보는 플러그인 패턴이야기

Conclusion

Page 82: 안드로이드로 풀어보는 플러그인 패턴이야기

Framework-ProvidingPlatform

What have we gained?“ A technique “

소프트웨어로 부터 custom part 를 분리

Plug-In

Plug-In

Plug-In

NewPlug-In New

Plug-In

“ 새로운 기능에 대한 확장성 , 이식성”

Page 83: 안드로이드로 풀어보는 플러그인 패턴이야기

Plug-In Pattern

Page 84: 안드로이드로 풀어보는 플러그인 패턴이야기

QnA

Page 85: 안드로이드로 풀어보는 플러그인 패턴이야기

Thank you