¿Usando interfaces de usuario no estándar con mvvmcross? (enlaces de datos para cosas como gtksharp)
I'm looking into getting started with C# app development. I have experience in web-based technologies but am just starting up with desktop/MVVM.
I've been watching and reading up on various mvvmcross tutorials, and I'm really looking forward to working on an application using the framework, but I just have a quick question which might have more to do with databindings than mvvmcross itself:
If I build my application.core through the mvvmcross library, would it be relatively easy to reuse that core library to develop UI's for non-mvvmcross targets?
I understand that mvvmcross simplifies a LOT of the display logic, so by doing this I would have to write up code to connect with other guis using their methods, but I'm wondering if anybody can comment on
a) Whether it would be possible
b) If it would be possible without a lot of workarounds/hacking around my mvvmcross core implementation.
My use-case is that I plan on using mvvmcross to develop for either WPF or WinStore first, then, if there is demand, add a Mac UI. But eventually, if the demand is there, I want to be able to also port my application to Linux (probably through gtksharp,because it sounds like that's furthest ahead in development right now). Would my application.gtk project be able to easily call/work with the classes, methods, and functions that are defined in the mvvmcross core application, or would that logic have to be re-written to handle data in a way that's more suitable to gtksharp?
preguntado el 27 de noviembre de 13 a las 06:11
Sorry for the super-late reply, but I don't really think this is too feasible, at least as stated. The main problem, as I see it, is that MvvmCross would still likely have to be a dependency for most of your core library(ies). You could certainly have a core library with that as a dependency and just not really use it, but that seems like a waste and kind of goes against the question as asked.
Without it as a dependency, you lose quite a lot of stuff, really all the stuff that makes it such a nice framework. What you'd really want to do is just implement INotifyPropertyChanged and work off of that. Some other, simpler libraries you might be able to use include the Bind library from Praeclarum (https://github.com/praeclarum/Bind), Fody.PropertyChanged (https://github.com/Fody/PropertyChanged), Json.NET, and SqLite.NET to achieve a basic but powerful core library that can then be added to with an MvvmCross-based library, but I don't know if there'd even be any reason to do that. Another helpful link would be: http://arteksoftware.com/end-to-end-mvvm-with-xamarin/.
Normally when developing the core with MvvmCross (but actually any Mvvm pattern using style of development) the Core should not depend on any UI logic, and thus should be re-usable on any platform. However currently there is no platform support for gtk in MvvmCross.
I'm not really familiar with gtk, but I suppose it's possible to build the binding layer for linux in a similar way as was done for Android and iOS.
So in theory you should be able to re-use the Core libraries on Linux as well using Mono, given such binding layer for Linux would be developed for MvvmCross. I'd be interested to see anyone start poking around if this is actually possible.
No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas c# data-binding xamarin mvvmcross or haz tu propia pregunta.
I'd be interested if you found out anything more, I'm just researching a similar project - Scott Cowan
No, I didn't really get anywhere after this question. Life got busy so that project has sadly been abandoned. Best of luck on what you're working on though. - dkisselev
I'd be really curious to give a look at this, since that allows to add Mac and Linux to the platform list, which means covering almost all OSes. Maybe it would be easier with MvvmLight. I guess the most complicated part would be to port platform-dependant code when it comes to bind events to view properties. (I hope) the rest is portable code. - Léon Pelletier