简体   繁体   中英

Where should I start working on mvvmcross Gtk support?

I need Gtk platform support in my crossplatform application. That application was build using mvvmcross. I checked and did not found any existing realisation of Gtk "platform" for the framework. I have time to work on it. Where should I start? What are the pitfalls?

Update I seen you commented here https://github.com/MvvmCross/MvvmCross/pull/2697 probably best to keep the chat in the issue rather than SO.

Have you seen twitter convo ? which then links to this GitHub issue

From Slodge (Stuart)'s comment, he gives the basic steps needed for MVVMCross 3.1:

There are people who've done this before

Me - for the main platforms here

@deapsquatter and @loqu8/Tim for Mac

@et-nowis for Unity/Ngui - https://github.com/et-nowis/mvx-unity-ngui/blob/master/Assets/External/MvvmCross/Cirrious/Cirrious.MvvmCross.Binding.Unity/MvxUnityBindingBuilder.cs

Now that 3.1 is quite stable, the main steps involved for a complete platform are:

  1. Start at CrossCore - you'll need to write a small set of extensions for the platform - like those in each of https://github.com/MvvmCross/MvvmCross/tree/v3.1/CrossCore - quite what each platform needs depends on the platform. The main thing that the Droid/Touch platforms have are the Views folders - but these really might not be needed at all for "just binding" - https://github.com/MvvmCross/MvvmCross/tree/v3.1/CrossCore/Cirrious.CrossCore.Droid/Views
  2. Build a Binding library - this starts from a platform specific BindingBuilder - each basically just adds custom "binding patterns" -TargetFactories - for the platform. See the examples used in:
  3. Build the Mvvm platform layer. This generally just involves adding the platform specific Setup, Presenter (aka NavigationService) and BasePage (eg base Activity, base UIViewController, base Page) classes. The complexities here generally come in things like:
    • supporting plugin loading (they should work pretty easily using Assembly.Load but sometimes it's not as easy as it should be)
    • working out how to navigate
    • working out "tombstoning" (hopefully not an issue for desktop platforms)
    • working out where to store and where to clear bindings (in their bindingcontext) - creating bindings is always easier than clearing them up.
  4. Port individual plugins as needed.... How to get started, what to consider, known pitfalls etc.

Those are the basic steps to get started

I don't think it's that big a job - especially because v3 is pretty good in terms of portable structure!

For "What to consider" and "known pitfalls" sorry, but I've really no idea - I've not really written one "from new" since MvvmCross v1 and it was a very different process back then.

Leaving this open, If you do start down this path, then please let's just ask questions on this thread - that's what we tried to do with 215 for unity.

You would have to adapt these step to the version that you are using. Also, the links provided above will be broken for the 3.1 version. So you would have to map them to the newer equivalents.

In addition to this, I know that Tizen was recently added might be possible to look at how those were added to get an idea of how to go about it.

I think it would be possible but quite an undertaking, Good luck!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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