简体   繁体   English

Xamarin没有表单/ MvvmCross /数据绑定

[英]Xamarin without Forms/MvvmCross/Data binding

I'm working on defining an architecture to write Android/iOS apps with shared code in Xamarin without Forms. 我正在定义一种体系结构,以使用Xamarin中的共享代码在不使用Forms的情况下编写Android / iOS应用程序。

It seems like MVVM is the most popular architecture. 似乎MVVM是最受欢迎的体系结构。 I looked at MvvmCross example and while I can see the benefit of how much code is sharable, I didn't like how the native-ness fades out from the Android/iOS projects. 我看了看MvvmCross示例,虽然可以看到可以共享多少代码的好处,但我不喜欢原生性如何从Android / iOS项目中淡出。

Is data binding essential in implementing Xamarin with MVVM? 在使用MVVM实施Xamarin时,数据绑定是否必不可少? Are there examples of Xamarin MVVM without MvvmCross and data binding? 是否有没有MvvmCross和数据绑定的Xamarin MVVM示例?

When I first started using Xamarin I followed this example project as a guide: https://github.com/xamarin/mobile-samples/tree/master/MWC 当我第一次开始使用Xamarin时,我遵循以下示例项目作为指南: https : //github.com/xamarin/mobile-samples/tree/master/MWC

It doesn't use data binding, nor does it use ViewModels. 它不使用数据绑定,也不使用ViewModels。 However, you could easily move away from using their static "Manager" classes to ViewModels or any architecture really. 但是,您可以轻松地从使用其静态“ Manager”类转移到ViewModels或其他任何体系结构。

Their Tasky sample app uses a Manager/Repository architecture: https://github.com/xamarin/mobile-samples/tree/master/TaskyPortable 他们的Tasky示例应用程序使用Manager / Repository体系结构: https : //github.com/xamarin/mobile-samples/tree/master/TaskyPortable

Before I moved to using MVVMCross in my projects, I created a framework called MonkeyArms that uses a Mediator paradigm that you may find interesting: https://github.com/benbishop/MonkeyArms 在我开始在项目中使用MVVMCross之前,我创建了一个名为MonkeyArms的框架,该框架使用了您可能会感兴趣的Mediator范例: https : //github.com/benbishop/MonkeyArms

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM