Is MVVM dead in Windows 8 Store Apps?

前端 未结 4 753
不思量自难忘°
不思量自难忘° 2021-02-08 06:42

I have started learning about Windows 8 Store Apps.

I recall from Silverlight and WPF programming earlier that people adapted the MVVM concept and now I am not sure if

相关标签:
4条回答
  • 2021-02-08 07:03

    I recommend http://stylemvvm.codeplex.com, It's written from the ground up to support Metro projects (C#, C++/CX, HTML/JS). It includes a full IOC, implementation for ICommand & Attached Command Behaviors, Services for Tiles, badges, Toasts and Charms. It also includes a nice Mediator class that is dispatcher aware. Plus a number of visual studio templates to help get you started.

    Note: I might be biased since I wrote it :)

    0 讨论(0)
  • 2021-02-08 07:08

    MVVM is not dead in Windows 8 Metro apps.

    We didn't use MvvmLight in our app, but the basic components you need, like binding to ViewModel properties, using ICommands in the ViewModel and INotifyPropertyChanged are all available with very minor changes (if any).

    Microsoft published a nice sample recently. It doesn't say MVVM explicitly, but it has what you need to get started. And Josh Smith's article is of course still useful.

    0 讨论(0)
  • 2021-02-08 07:13

    No, MVVM will never die!

    Model-View-ViewModel is a design pattern, so it is not dependent on a specific framework or implementation. However, it is a UI design pattern that is most convenient to use with UI frameworks that support data-binding.

    Windows 8 Metro apps include XAML and a binding framework which is much like Silverlight and WPF. For this reason, MVVM is excellent choice for managing your code.

    The code you have discovered in LayoutAwarePage is described in this blog post. It is an attempt to make Windows 8 Metro app development easier by providing various stub-implementations. This page includes a DefaultViewModel, which is an observable dictionary.

    Personally, I wouldn't use it!

    0 讨论(0)
  • 2021-02-08 07:18

    Nope MVVM isn't dead and is still pretty alive!!!

    ColinE defintion of MVVM resumes it pretty well. Indeed MVVM is basically a design pattern, and is not dependant to a specific framework.

    Using MVVM is not a dogma..., though most who worked a lot with XAML app programming [WPF, Silverlight, WP 7 and WinRT...] will agree that MVVM truely facilitates a clear SOC separation of concern, between the development of the GUI and back end logic.

    I've personally used Laurent Bugnion's MVVMLight package from Nuget in combination with WinRT, though you're free to use any other MVVM package or option you feel at ease with.

    If you need further sample refs, I would invite you to have a look at the following recording of a webinar on 'MVVM in Windows 8 Store' by Gill Cleeren

    http://www.silverlightshow.net/video/MVVM-in-Win8-Webinar.aspx

    0 讨论(0)
提交回复
热议问题