Xamarin MVVM交叉替代 [英] Xamarin MVVMCross Alternatives
问题描述
目前,我们公司正在使用Xamarin
框架来为Android
和IOS
创建应用.
我们查看了MVVMCross
在整个平台上获得了更多可重用的代码.但是,创建特定于平台的视图困扰着我们,我们想走得更远,并创建了一个共享的xml文件,在该文件中,我们尽可能定义了所有平台的视图.
这些xml文件的结构类似于XAML文件,然后我们在不同的平台上实现.例如
<MapControl Width="100" />
转换为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 MVVM交叉替代的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!