Skip to content

waynebaby/MVVM-Sidekick

Repository files navigation

MVVM-Sidekick

###You play hero, and I play cute!

MVVM跟班儿

你作英雄炫酷霸,我在一旁萌萌哒

MVVM-Sidekick! You play the hero, and I play cute!

  • MVVM-Sidekick: A Modern light-weight MVVM framework based on RX and TAP await. The CORE of this framework is ViewModelBase Class which you can even use it with other frameworks.

本项目是一个基于RX与 await等新技术的轻量级MVVM框架。其核心是ViewModelBase类型,你甚至可以把它拿出去和别的框架一起使用。

  • The aim of this project: This project has learned a lot of good ideas from Prism and Reactive UI/Command project, and it is using new techs offered by .Net 4.5 and Windows Run-time. It offers a suitable foundation for new tech environment, based on cool ViewModelBase and ReactiveCommands.

项目的目的:集合 Reactive UI/Command, Prism 等框架的优点,应对.Net 4.5 和 Windows Run-time 带来的变化,为新技术环境量身打造一套以 ViewModelBase/ReactiveCommand 为核心的基础。

  • MVVM-Sidekick is design on Windows 8 Modern Style Apps, and we got that ambition to cover all modern XAML run-time.

本框架从设计开始就以Windows 8 Style App作为运行环境进行测试,野心覆盖所有XAML运行环境。


Resources

F.A.Q. goes HERE

F.A.Q. 请戳 这边


###Chinese course provided by community - Thanks @黑芝麻的糊 for your contribution.

###中文教程感谢@黑芝麻的糊 的贡献


Projects in Real-World

###案例


What make difference?

功能特色

  • Full support for Data Contract Serializing. You can easily save your status of View Model to JSON or XML stream, and easily restore from, too.

全面支持Data Contract序列化 可以将一个VM的全部状态用任何方式保存为JSON/XML,反序列化后只需要简单操作就可以恢复工作

  • This is light-weight framework. You can use our dll or use code file, either way you just need to install Reactive Extensions with Nuget.

轻量级框架,不必安装全部DLL或者引用工程,只需要将指定代码文件加入你的工程切安装Reactive Extensions就可以用。

  • Each of Model Properties in MVVM-Sidekick has it's own event container, can subscribe or broadcast it self. LinQ-Like code with RX can be used.

Model所有的成员都有自己的事件容器,可以独立与其他事件订阅与广播。可以使用 LinQ-Like 语法进行配置和订阅。

  • You can configure business logic of your properties and commands where they were declared. This will avoid your jumping between different parts in one View Model code file. (This kills me when I was working with other frameworks: for example you cannot configure a DelayCommand at the Property/Field declaration because “this” instance is not ready yet .)

您可以在声明property的代码处配置property的业务细节,可以在声明command的代码处配置command的业务细节,这样你就不用在一个VM里面不同的代码段跳来跳去了。(用别的框架可累死我了,声明个command 还不能在声明原地初始化,因为this还没有实例化)

  • You can also separate the business logic to your View Model declaration into a decorator factory or something else, to manage all code involved one same USE CASE together, with the sequence same as document you a following. You can also easily add more business logic anywhere you like.

您也可以将VM的业务细节配置与VM的创建时机分离,不但可以在实体外用装饰模式进行批量配置(这样可以让代码与需求文档的组织顺序高度统一,便于维护),也可以根据需要临时装饰增加VM的功能。


Samples

示例

In Nuget folder

\src\Samples.zip

or here


How To Use project template ?

如何使用MVVMSidekick项目模板?

See document: Hello world

详情见文档 跟班问世篇

#Documents TOC

#文档目录

  1. Hello world 跟班问世篇

  2. View Models (Part 1) View Models(第1部分)

  3. View Models (Part 2) View Models(第2部分)


More document would be here in Onenote form: https://onedrive.live.com/redir?page=view&resid=45FE30D49807DF3C!1002973&authkey=!AL4aMWuTcP8yEEw

Owner: Waynebaby

Ping Me:

微博
twitter
Mail


About

A Modern light-weight MVVM framework based on RX and Await

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages