MVVM概要 • アプリケーションをModel / View / ViewModel に分割するアーキテクチャパターン • MicrosoftのKen CooperとTed Petersが開発 • WPF/Silverlightで使われていたが、最近は他 のプラットフォームでも採用例が多い
![MVVMベストプラクティス](https://cdn-ak-scissors.b.st-hatena.com/image/square/c3d3f9a86e59afcfceb89dacb80c33dfaa50d433/height=288;version=1;width=512/https%3A%2F%2Ffiles.speakerdeck.com%2Fpresentations%2F41a7981af2694adba7ae40246f88c698%2Fslide_0.jpg%3F9378389)
MVVM概要 • アプリケーションをModel / View / ViewModel に分割するアーキテクチャパターン • MicrosoftのKen CooperとTed Petersが開発 • WPF/Silverlightで使われていたが、最近は他 のプラットフォームでも採用例が多い
2018/11/10 追記 かなり時間が経ってしまいましたが、当時の理解が甘かったところがあり、CleanArchitectureというよりも、レイヤごとに分離させたという方が適切な表現であると気がつきました。 では何をもってCleanArchitectureなのか?というのは、こちらの記事が参考になりました。 https://qiita.com/gki/items/f601afbfada85fd8624e —— 概要 自社サービスのアプリのアーキテクチャにMVVMを採用していたのですが、 ViewModelやModelが肥大化 Mの部分が上手く実装できておらず、データ層の取り回しやビジネスロジックまわりに不便を感じてきた などの課題があったので、CleanArchitectureを参考に「データレイヤを厚めにする+ビジネスロジックの分離」を行ってみましたという内容です。 各クラスの名前は
こんにちは、サービス開発部の森川 (@morishin127) です。主にクックパッドの iOS アプリの開発に携わっています。 日々アプリを開発する中で、近頃は最適なアーキテクチャとは何かを考えながら色々な形を試行錯誤しています。世の中で採用されているモバイルアプリのアーキテクチャには様々なものがあります。MVC, MVP, MVVM, VIPER, Clean Architecture などなど。開発している、あるいは開発しようとしているアプリケーションでどういったアーキテクチャを選択するかというのは難しい問題です。選択するためにはアーキテクチャに求める要件を定義する必要があります。この記事では私がアーキテクチャに求める要件と、それらをある程度満たすと考えた MVVM と Flux という2つのアーキテクチャで実装したサンプルを見つつその長所・短所について考えてみようと思います。 アー
About the content This content has been published here with the express permission of the author. MVVM is the critical design pattern for front-end engineers. There are so many ways that objects can talk to each other in an iOS App: delegates, callbacks, notification. In this Swift Language User Group talk, Max Alexander shows you how to streamline your development process in 3 easy patterns with
MVVMパターンは、GUIのアーキテクチャパターンの一種で、PresentationとDomainの分離(PDS)を目的としたパターンです。MVVMパターンを採用することによって、プラットフォーム依存なUIを実現するプレゼンテーション層をViewとViewModelに書き、その他すべてをModelに書くことによって、「複雑だしプラットフォーム依存でテストしにくいUIのコード」と「アプリケーションの挙動をモデリングしたコード」を分離することができます。 その一方で、MVVMは「モデルはこう設計しましょう」ということについては指針をくれません。これは、言い方を変えれば、MVVMを採用したからといってアプリケーション全体の設計が決まるわけではなく、MVVMは「プレゼンテーションとその他をどうやって分けるか」について指針をくれるだけ、ということです。 ところで、混乱が起きやすいポイントですが、PD
丸山です。ヤパチー、最高に楽しかったですね。スライドの公開はしたのですが、正直重要なことは全部口頭で説明していて、スライドには情報が少ない。しかし、動画を見るのは正直だるい。40分もPCの前で集中して映像を観れないですよね。知ってる。というわけで、受験参考書の「実況中継」シリーズ(知ってます?)方式で、プレゼンをブログで再現します。長いぞ。でも多分動画見るよりははやく読み終われる。ぜひ読んでいってください。 アバンパート 今日はこういうトークをします。 簡単に自己紹介すると、こういうものです。 息子紹介です。かわいいですね。 WEB+DB Press 91号では特集を、92号ではPerlHackersHubに記事を書かせてもらいました。もう原稿料いただいてるので、もうこれ買ってもらってもわたしには一銭も入らないんですけど、いい雑誌なので買ってないひとはぜひ買って読んでください。 まずMVW
MVVMのめんどくさいと感じてるところ ModelとViewModelのクラスのマッピング MVVMでアプリ組んでるとModelとViewModelで似た構造のクラスを作って、値の移し替えを行うことがあります。AutoMapperとか使ってもいいのですが、ReactivePropertyを使うことでも楽をすることができます。 以下のようなModelクラスがあるとします。(BindableBaseクラスはPrismのINotifyPropertyChangedを実装したクラスです) public class Person : BindableBase { private string name; public string Name { get { return this.name; } set { this.SetProperty(ref this.name, value); } } pr
こんにちは。 マイクロソフトの渡辺です。 アプリケーションのデザインパターンの1つである MVVM ( Model - View - ViewModel )。既に多くの実装例や MVVM パターンを採用した Framework が公開されています。 from Wikkipedia また、MVVM パターンは、C#/.NET/XAML の世界を中心に多く利用されてきましたが、最近では、JavaScript/HTML のアプリケーション開発で利用されることも多くなりました。 そして MVVM を理解する中で、また MVVM をサポートする Framework を利用する中では Model, View, ViewModel にとどまらず、Service, Command, Messenger, IoC, DI, Service Locator ..e.t.c といったキーワードに自然と出会うでし
The Progressive JavaScript Framework An approachable, performant and versatile framework for building web user interfaces. Why Vue Get Started Install Get Security Updates for Vue 2 Approachable Builds on top of standard HTML, CSS and JavaScript with intuitive API and world-class documentation. Performant Truly reactive, compiler-optimized rendering system that rarely requires manual optimization.
前提 会社(Quipper)で今からこういう風にしたい、と宣言した社内ドキュメントを公開する。 枯れてるわけではない。 coffeescript Backbone Backbone.stickit (データバインディング) Chapling.js(は、オマケなのでどうでもいいがサンプルコードはこう) backbone.stickitは安心と信頼のNYT製。(実質Backbone作ってるDocumentCloudと一緒のところ?) backbone.stickit 目的 データバインディングを全面的に使って再描画を最小限にし、コードの見通しをよくしたい。 モデルの役割を明示的にし、MVVMを導入する。 理想的なAPI 擬似コード # ビューモデルの定義 class TopicViewModel extends Model defaults: title: '' # たぶんここでパラメータ名(
Web の場合は View と Controller の違いははっきりしてます。 View は html ページとその作成を担当します。 CGI は アドレスとパラメーター(アドレスの ? の後など)を受け取り、処理を行います。 その受け取り部分が Controller です。 Model と View ではなく、なぜ MVC としたのでしょうか ? 『 GoF 本』 では Controller を分ける利点をいくつか挙げられています。 キーボードの応答を変えたり、メニューからの呼び出しに変更するとき、表示方法を変更しなくていい。 入力イベントを無視するといったことをコントローラーのインスタンスの入れ替えで可能。 その他にも "View を入れ替えれば、 PC アプリ、 Web アプリでも使えるように" という理由もあります。 ちょっと無理そうな話ですが、例えば、 PC アプリが次のような
You Will Learn What the motivations are for implementing an application using MVVM. What the MVVM pattern is. The benefits that the MVVM pattern provides. Applies To Silverlight for Windows Phone OS 7.1 On this page: Download: The MVVM pattern lends itself naturally to XAML application platforms such as Silverlight. This is because the MVVM pattern leverages some of the specific capabilities of Si
This is part of the Further Enterprise Application Architecture development writing that I was doing in the mid 2000’s. Sadly too many other things have claimed my attention since, so I haven’t had time to work on them further, nor do I see much time in the foreseeable future. As such this material is very much in draft form and I won’t be doing any corrections or updates until I’m able to find ti
Update: This article has been updated to reflect the changes in the latest stable ReactiveCocoa v2 MVC - One Pattern to Rule them all The MVC design pattern has existed since the late 1970s and has been in use in the Foundation, AppKit & UIKit Frameworks for a long time now. At its heart is a very simple design and a good idea. The Design is this As you can see we have 3 components Model - The Dat
I'm working on integrating RAC into my project with the goal of creating a ViewModel layer that will allow easy caching/prefetching from the network (plus all of the other benefits of MVVM). I'm not especially familiar with MVVM or FRP yet, and I'm trying to develop a nice, reusable pattern for iOS development. I have a couple of questions about this. First, this is sort of how I've added a ViewMo
April 10, 2012 MVVM (Model View ViewModel) is an architectural pattern based on MVC and MVP, which attempts to more clearly separate the development of user-interfaces (UI) from that of the business logic and behaviour in an application. To this end, many implementations of this pattern make use of declarative data bindings to allow a separation of work on Views from other layers. This facilitates
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く