Xamarin MVVMCross 替代方案 [英] Xamarin MVVMCross Alternatives
问题描述
目前我们公司正在使用 Xamarin
框架为 Android
和 IOS
创建应用程序.
我们查看了 MVVMCross
以获得跨平台更多可重用的代码.然而,平台特定视图的创建困扰着我们,我们想更进一步,创建一个共享的 xml 文件,我们尽可能在其中定义所有平台的视图.
这些 xml 文件的构造类似于 XAML 文件,然后我们将在不同的平台上实施该文件.例如
转换为 IOS
中的 MKMapView 和 Android
上的 com.google.android.gms.maps.MapFragment(仅举一个粗略的例子)
无论如何,我的问题是是否有人知道实现上述类似结构的任何开源框架/项目.
也许这甚至在 MVVMCross
的路线图上?
在 MVVMCross 中,有插件"的概念.
https://github.com/MvvmCross/MvvmCross/wiki/MvvmCross-plugins>
这些插件实现了您尝试使用的任何内容(地图、位置、文件等)的本机等价物
其中许多是由社区或需要为项目进行某些实施的人制作的.
至于另一种解决方案,ReactiveUI 是另一个构建在 Xamarin 之上的 MVVM 框架(但不限于)
https://github.com/reactiveui/ReactiveUI
希望有帮助!
At the moment our company is using the Xamarin
framework to create apps for Android
and IOS
.
We looked at MVVMCross
for even more reusable code across the platforms. however the creating of platform specific views bothered us and we wanted to go further and created a shared xml file where we define the view for all platforms wherever that was possible.
These xml files are constructed like a XAML file which we then implement on the different platforms. for example
<MapControl Width="100" />
converts to a MKMapView in IOS
and a com.google.android.gms.maps.MapFragment on Android
(just to give a rough example)
Anyway, my question is if anyone knows any opensource frameworks/ projects that implement a similar structure as stated above.
Perhaps this is even on the road map for MVVMCross
?
Within MVVMCross, there's the concept of "Plugins".
https://github.com/MvvmCross/MvvmCross/wiki/MvvmCross-plugins
These plugins implement the native equivalent of whatever you're trying to use(Maps, Location, File, etc)
Many of these are made by the community or people who need certain implementations made for a project.
As for another solution, there is ReactiveUI which is another MVVM framework built on top of Xamarin as well(But not limited to)
https://github.com/reactiveui/ReactiveUI
Hope that helps!
这篇关于Xamarin MVVMCross 替代方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!