How to use NSOutlineView with ReactiveUI? - xamarin

I want to convert a small MonoMac application that I created so that it uses the MVVM pattern (especially to port in easily to Windows). I want to use the ReactiveUI framework. The current application uses an NSOutlineView control with a corresponding data source. As far as I could see there is no support currently for this control.
Is there a guideline how to adapt the NSOutlineView and data source so that it supports data binding as used by the ReactiveUI framework?

Unfortunately the data source support that ReactiveUI provides is iOS only and the code is quite complicated, but you can have a look at ReactiveTableViewSource and friends and try to create an equivalent for NSOutlineViewDataSource.
The general idea is, create a NSOutlineViewDataSource that can follow around a ReactiveList of ViewModels, and create Views for them as-needed.

Related

How to create complex UI component (ex- seatmap) using NativeScript

I am working with Nativescript and while it's great to create interfaces with the provided UI components, I haven't found a way to implement custom components that can be used across platforms.
What is the proper way of implementing a complex UI element(directive?) in NativeScript? I am trying to implement a seat map for Android and iOS.
Should the native ui components created and wrapped for NativeScript, or is it possible to create the directive using the web technologies(HTML/CSS/JS)?
You can create custom components that can be reused in your application. Nice how-to blog on that matter can be found here.
The articles above are describing the mechanism to reuse a portion of your UI and creating a separation to ease the developing process.
However, if that is not what you ar looking for you can create your own custom UI element using the native one. TO do that you will need to do marshalling. For example take a look at this documentation section (for Android) and this section (for iOS)
With data conversion you can either use native components directly inside your nativeScript app or you can even extend further and create your own UI plugin.

Using Prism v5 with Reactive UI

Just wondering if any has successfully managed to make use of PRISM v5 composition features like Regions, and View-Based navigation? These features, seem complementary to ReactiveUI in their scope but I am wondering if their any any gotchas one needs to keep in mind before trying to use both libraries in the same solution.
Maybe this answer will help you.
All regular features of RxUI will play well within Prism, but one is competing: RoutedViewHost and ViewModelViewHost (View locator by ViewModel, or routing navigation)
Basically the gotcha is this:
Prism tries to resolve a VM type for a given view, whereas RxUI does it the other way around and resolves View for the current VM.
Because of that, mixing them back and forth can be confusing (at best), but you can bind one to a region, and use only RxUI View resolver for that region.

What does MvvmCross do that Xamarin doesn't already?

Hi so I'm a newb at cross platform stuff and I'm trying to figure out what MvvmCross brings to the table.
From my poor understanding, Xamarin already allows for everything except UI stuff to be written in csharp. Where does MvvmCross come in?
MvvmCross brings the MVVM pattern to platforms where it was previously unavailable, like iOS and Android.
It also supports data binding in Views. This is a powerful feature that provides great separation of concerns. The View will use the ViewModels to offer proper behaviors in the application. MvvmCross even locates the ViewModels in a dedicated project so you can easily reference and reuse them in others.
This is the most important point when talking about MvvmCross. By locating the ViewModels in a Portable Class Library (PCL), you can add them as a reference to any other projects. Of course, that’s not the only interesting point of MvvmCross. There’s also a plug-in architecture, dependency injection (DI) and more.
Source: https://msdn.microsoft.com/en-us/magazine/dn759442.aspx
Xamarin already allows for everything except UI stuff to be written in
csharp.
Xamarin allows you to write UI stuff in C#.
MVVMCross (Mvx) allows you to use the MVVM pattern in cross platform development, so that you can have a shared business logic layer, ViewModel. So you are creating different Views based on the platform but binding to the same ViewModel.

Integrating xamarin, CouchBaseLite, MVVMCross and SyncGateway such that View changes with database

I am working on a xamarin project where i use CouchBase Lite as my Local database. I also want to use MVVMCross library. Could anyone specify where should i include couchbase-Lite library, MVVMCross - hot tuna library(like class library or portable class library or platform specif project) such that view model gets notified about the changes in Couchdatabase.
Basically i want to change the view whenver there is a change in database i want to change the view with mvvmcross. Am using syncgateway to sync with server Couchbase bucket.
I am new to Xamarin, MVVM and CouchBaselite.
I couldnt find any concrete example for all this.
Thanks in advance.
I would perhaps just use the CouchBaseLite Xamarin Component. If you are wanting to access this in your PCL Core project you will probably have to create some sort of wrapper around the component and inject it properly into each platform. You can use the MvvmCross plugins wiki to get you started.
I know this is an old thread, but there's a new MvvmCross plugin for Couchbase, and basically does everything you want. It's in alpha, as of this writing on Nuget, and open source on Github. I was actually looking for the same, and happy to have found it! :)
https://www.nuget.org/packages/MvvX.Plugins.CouchBaseLite.ForestDB
https://github.com/mathieumack/MvvX.CouchBaseLite

Is there a good MVVM/MVP/MVC framework for JavaFX?

JavaFX with it's binding seems great technology for building UI layer, replacing PHP+AJAX, but are there any frameworks for building database forms applications with JavaFX, or it is meant to write everything from scratch?
You should give a try to some recent libraries :
JRebirth Application Framework to structure your whole application
http://www.jrebirth.org
FXForm to manage form
http://dooapp.github.com/FXForm2/
DataFX to manage complex tables etc..
http://www.javafxdata.org
You can find more tools at http://www.oracle.com/technetwork/java/javafx/community/3rd-party-1844355.html
Eric Bruno has a nice write up on JavaFX and Database using JavaFX Composer. See his articles at DrDobbs

Resources