이시원
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # MVVM, MVC, MVP 등 자신이 알고있는 아키텍쳐를 설명하시오. ## 서론 아키텍처로는 MVC, MVP, MVVM, VIP 등이 있습니다. 아키텍처를 설명하기 전, 모든 아키텍처에 공통으로 나오는 View와 Model 먼저 말씀드리겠습니다. View는 말 그대로 사용자에게 보여지는 역할 즉, UI를 뜻합니다. 추가적으로 사용자로부터 액션을 받는 역할 또한 합니다. Model은 Entity라고도 불리며, 비즈니스에 사용되는 데이터를 가진 객체입니다. ## MVC > 핵심 키워드: Controller에 로직이 집중될 수 있다, MVC는 UIKit 특성상 testable 한 코드를 작성하기 힘들다 MVC는 Model과 View 사이에 Controller가 추가되어 View를 통해 들어온 액션을 처리하고, Model을 업데이트하는 등 View와 Model 간 중간 브릿지 역할을 합니다. 때문에 대부분의 로직이 Controller에 집중되고, UIKit 특성상 View와 Controller의 의존성이 높아 testable 한 코드를 작성하기 힘들다는 단점이 있습니다. ## MVVM > 핵심 키워드: 옵저버 패턴을 이용하여 V와 VM을 연결시킨다, VM은 V와 독립되어 있어 testable한 코드를 작성하기 용의하다. MVVM은 Controller 대신 ViewModel이 중간 다리 역할을 합니다. 두 패턴 중 가장 큰 차이점은 Controller과 다르게 ViewModel은 View와 완전히 독립되어 있는 객체입니다. 때문에 testable한 코드를 작성하기 용의합니다. 옵저버 패턴을 이용하여, View와 ViewModel을 바인딩합니다. View가 액션을 받으면 ViewModel에게 요청을 보내고, ViewModel은 Model을 가공하고, View에게 필요한 데이터를 제공합니다. ## MVP > 핵심 키워드: View와 Presenter는 Interface를 통해 연결되어 MVC와 다르게 testable한 코드를 작성할 수 있다, 하지만 의존성이 완전히 독립된 것은 아니다. MVP는 MVC와 매우 유사한 패턴입니다. Controller의 역할을 Presenter가 하도록 구현합니다. 하지만 Presenter와 Controller의 가장 큰 차이점은 View와의 연결입니다. View와 Presenter는 Interface를 통해 연결되어 MVC와 다르게 testable한 코드를 작성할 수 있습니다. 하지만 Controller와 같이 로직이 집중되어 Presenter가 비대해질 수 있다. 또한 MVVM 패턴과 같이 View와 Presenter간 의존성이 완전히 독립된 것이 아니기 때문에 프로젝트가 커질 수 록 의존성 또한 높아질 수 있습니다. ## VIP > 핵심 키워드: VIP의 정의, Clean Swift, VIPER 등이 VIP패턴에 해당한다. VIP는 View-Interactor-Presenter의 약자로 Interactor는 비즈니스 로직을 관리하는 계층이며, Presenter는 Interactor에서 얻은 응답을 ViewModel를 통해 가공하여, View에게 전달하는 역할을 합니다. Clean Swift, VIPER 등이 VIP패턴에 해당합니다. # 꼬리질문 ## Clean Swift, VIPER의 차이는 무엇인가요? > 핵심키워드: Clean Swift와 VIPER의 Presenter 차이, 문제해결 Clean Swift, VIPER는 Clean Architecture(Uncle Bob)를 iOS스럽게 디자인한 패턴이면서, VIP패턴을 채택했다는 공통점이 있습니다. 하지만, VIPER같은 경우 Presenter가 View와 Interactor모두에게 의존하고 있습니다. 때문에 Presenter의 역할이 많아지는 단점이 있습니다. 이를 보안한 것이 Clean Swift입니다. Clean Swift는 View -> Interactor -> Presenter -> View로 의존성을 분리하고, 단방향으로 연결시켜 VIPER의 문제인 메모리 누수 및 Presenter의 역할 문제를 해결하였습니다. ## Clean Architecture는 무엇인가요? > 핵심키워드: Presentation영역, Data영역, Data영역 각 정의, 개층간 의존성 Clean Architecture(Uncle Bob)는 크게 View와 ViewModel이 있는 Presentation영역과 비즈니스 로직이 있는 Domain, 네트워크 및 로컬, 리모트 저장소를 관리하는 Data영역이 있습니다. Clean Architecture의 특징인 Domain영역을 독립시켜 유지보수를 용의하게 하는 것이 특징입니다. 때문에, Presentation영역과 Data영역만이 Domain영역을 의존하고 있습니다. # 출처 및 링크 [VIPER](https://saad-eloulladi.medium.com/clean-architecture-for-ios-viper-vip-c19de40b71e2) [Clean Architecture](https://tech.olx.com/clean-architecture-and-mvvm-on-ios-c9d167d9f5b3) [Clean Swift1](https://ios-development.tistory.com/340) [Clean Swift2](https://eunjin3786.tistory.com/165)

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully