Upgrade to Pro — share decks privately, control downloads, hide ads and more …

10分で振り返るソフトウェアアーキテクチャの歴史2017

 10分で振り返るソフトウェアアーキテクチャの歴史2017

CAMPFIRE iOS #1 - connpass
https://yj-meetup.connpass.com/event/51735/

での発表資料です。

(2017/3/23追記):
各所からいただいたフィードバックに基づき、不正確な記述を修正しました。(Nyohoさん、あんざいゆきさん、かとじゅんさん、ありがとうございます)
また、参考リンク集を追加しました。

## 参考リンク

■ MVC Pattern
http://heim.ifi.uio.no/~trygver/2003/javazone-jaoo/MVC_pattern.pdf
■ Understanding JavaServer Pages Model 2 architecture | JavaWorld
http://www.javaworld.com/article/2076557/java-web-development/understanding-javaserver-pages-model-2-architecture.html
■ The DCI Architecture: A New Vision of Object-Oriented Programming
http://www.artima.com/articles/dci_vision.html
■ PHP Mentors -> Beyond MVC
http://phpmentors.jp/post/69076928673/beyond-mvc
■ Model-View-Controller
https://developer.apple.com/library/content/documentation/General/Conceptual/DevPedia-CocoaCore/MVC.html
■ Martin Fowler: eaaDev
https://martinfowler.com/eaaDev/
■ GUI Architectures
https://www.martinfowler.com/eaaDev/uiArchs.html#Model-view-presentermvp
■ THE MODEL-VIEW-VIEWMODEL (MVVM) DESIGN PATTERN FOR WPF
https://msdn.microsoft.com/ja-jp/magazine/dd419663.aspx
■ Flux | Application Architecture for Building User Interfaces
http://facebook.github.io/flux/docs/in-depth-overview.html#structure-and-data-flow
■ Alistair.Cockburn.us | Hexagonal architecture
http://alistair.cockburn.us/Hexagonal+architecture
■ The Onion Architecture : part 1 : Jeffrey Palermo (.com)
http://jeffreypalermo.com/blog/the-onion-architecture-part-1/
■ The Clean Architecture | 8th Light
https://8thlight.com/blog/uncle-bob/2012/08/13/the-clean-architecture.html
■ Onion Architecture と Clean Architecture - 騒音のない世界 BLOG
http://noiselessworld.hatenablog.jp/entry/2016/12/31/231632
■ Introduction to VIPER - Mutual Mobile Engineering Blog
http://web.archive.org/web/20160111142228/http://mutualmobile.github.io/blog/2013/12/04/viper-introduction
■ MVVM-C In Practice // Speaker Deck
https://speakerdeck.com/macdevnet/mvvm-c-in-practice
■ Minimum Viable Architecture -- Good Enough is Good Enough in a Startup
https://www.slideshare.net/RandyShoup/minimum-viable-architecture-good-enough-is-good-enough-in-a-startup

takasek

March 16, 2017
Tweet

More Decks by takasek

Other Decks in Programming

Transcript

  1. ·ͣɺ֓೦ͷ੔ཧ ! GUI Architectures ɹ … MVC, MVP, MVVM, etc

    • ViewͱModel(=ϏδωεϩδοΫ)ͷ෼཭ • ର৅: αϒγεςϜ • ModelΑΓԞଆ͸஌ΒΜ ! System Architectures ɹ … Layered Architecture, ɹɹ Clean Architecture, ɹɹ VIPER, etc • ର৅: γεςϜશମ 5
  2. ΋͏ͻͱͭ༨ஊͰɺ MVC Model2(1999-) MVCΛJSP(JavaServer Pages)ʹద༻ͨ͠΋ͷ1 Model2Ͱ͸Observerύλʔ ϯ͸࢖ΘΕͳ͍ 1 Understanding JavaServer

    Pages Model 2 architecture | JavaWorld http://www.javaworld.com/article/2076557/ java-web-development/understanding- javaserver-pages-model-2-architecture.html 14
  3. ͦ͏Ͱ͢ʂ ࿩͸લޙ͢Δ͚Ͳ ෳ߹ύλʔϯͱͯ͠ͷ MVCʢCocoaʣ ैདྷͷMVCʹ΋ಉ͡໰୊͕͋ͬͨ ͳͷͰɺApple(ḪΕ͹NeXT)͸ ʮվྑܕͷෳ߹ύλʔϯMVCʯ ! Λਪ঑͍ͯ͠Δ •

    V͕MΛobserve͢ΔͷͰ͸ͳ͘ɺ ɹ C͕Mediatorʹ • VɾMΛ׬શʹ෼཭͠ɺ࠶ར༻ੑup https://developer.apple.com/jp/ documentation/CocoaEncyclopedia.pdf 21
  4. ͪͳΈʹMVPͱMVCͷҧ͍ • MVC͸ • ControllerͰinputΛड͚Δ • ViewͱController͸ϦονͳUIͰ͸݁߹͠΍͘͢ɺ Controller͕ViewͷϥΠϑαΠΫϧʹґଘ͢Δ • MVP͸

    • ViewͰinputΛड͚Δ ※Controller͸Viewͱ෼཭ࠔ೉ͳͷͰಉҰࢹ͢Δ • ViewͱPresenter͸෼཭͞Ε͓ͯΓɺ PresenterͷΈͰͷ୯ମςετ΋Մೳ 22
  5. ͓͞Β͍ ! GUI Architectures ɹ … MVC, MVP, MVVM, etc

    • ViewͱModel(=ϏδωεϩδοΫ)ͷ෼཭ • ର৅: αϒγεςϜ • ModelΑΓԞଆ͸஌ΒΜ ! System Architectures ɹ … Layered Architecture, ɹɹ Clean Architecture, ɹɹ VIPER, etc • ର৅: γεςϜશମ ͱ͍͏͜ͱͰޙ൒ઓ… 28
  6. Layered Architecture • ֤ϨΠϠ͸ࣗ෼ΑΓԼҐ૚ʹґଘ͢Δ • ্Ґ૚ʹରͯ͠͸ૄ݁߹ʹ ૚ͷ۠෼ʹ͸όϦΤʔγϣϯ͋Γ Eric EvansʮDomain Driven

    DesignʯͰ͸ • UI૚ • Application૚ • Domain૚ • Infrastructure૚ ͱ͍͏۠෼͕঺հ͞Ε͍ͯΔ 31
  7. ิ଍: DDD(Domain Driven Design)ͱ Layered Architectureʹ͍ͭ ͯ EvansͷDDDຊͰ͸Layered ArchitectureΛى఺ʹ࿩ΛਐΊ͍ͯ Δ͕ɺDDDͦͷ΋ͷ͸ΞʔΩςΫ

    νϟύλʔϯͰ͸ͳ͍ DDD͸ɺApplication૚ / Infrastructure૚ ͔ΒDomain૚ʹ ͋Δ΂͖ϩδοΫΛ෼཭͠ɺۀ຿஌ࣝ ΍ίϛϡχέʔγϣϯ΋ؚΊ࣮૷ͱҰ க͍ͤͯ͜͞͏ͱ͍͏ϞσϦϯάख๏ ※౰ॳʮDDD͸Layered Architecture͕લఏʯͱॻ͍͓ͯΓ ·͕ͨ͠ɺޠฐͷ͋ΔදݱͰͨ͠ɻ ! 32
  8. Onion Architecture(2008-) Clear MeasureࣾͷCEO Jeffrey Palermo͕ ϒϩάʹవΊͨ ᐌ͘ ʮLayered Architecture͸

    ɹ্૚ ➡ Infra૚ ɹ…ͬͯґଘ͕͋Δ͚Ͳ ɹ໼ҹͷํ޲ɺٯ͡Όͳ͍ʁ 37
  9. Clean Architecture (2012-) ΞδϟΠϧքͷڊਓ Robert C. Martin (Bob͓͡͞Μ)ʹΑΔఏҊ • Hexagonal

    Architecture • Onion Architecture • DCI ౳ʑΛɺͻͱͭͷ֓೦ʹ౷߹ 41
  10. VIPER (2013-) Mutual Mobile͕ࣾiOSͷͨΊʹߟҊɻ (۩ମతͳObj-C/Swiftͷίʔυꑤ΀΄ͽ ʮΞʔΩςΫνϟʯͱ͍͏ΑΓʮઃܭʯʁ) • View • Interactor

    • Presenter • Entity • Routing (Wireframe) ͷ಄จࣈΛऔ͍ͬͯΔɻ ը໘ભҠͷ੹຿Λ ViewController͔Β෼཭Ͱ͖Δͷ͕ಛ௃ɻ 43
  11. Minimum Viable Architecutre(2014-) eBay, GoogleΛܦͨ ελʔτΞοϓͷCTO Randy ShoupʹΑΔϓϨθϯ ࣄۀͷ੒௕ϑΣʔζʹԠͨ͡ ࠷௿ݶΞʔΩςΫνϟͰॆ෼

    ΠςϨʔςΟϒʹ ϘτϧωοΫΛݟ͚ͭͯ ௚͍͚ͯ͠͹͍͍ ͱ͍͏… ΞʔΩςΫνϟͱ͍͏͔… ϝλΞʔΩςΫνϟ…ʁ 46
  12. "If you don’t end up regretting your early technology decisions,

    you probably over engineered. Rearchitecting is a sign of success; if you never need to, either you overbuilt or nobody cares." -- Randy Shoup 47