Giter VIP home page Giter VIP logo

Comments (2)

Goncharuk-Nikita avatar Goncharuk-Nikita commented on June 25, 2024 2

Thank you for your detailed answer.
I cited as an example MvvmCross as a completely architectural environment that not only gives you the ability to bind, but the full life cycle of the application. I plan to further understand this direction, because Mvvm + ECS seems to me a very good idea.
Since MvvmCross is open source, then for a start I plan to write something similar that will cover launching the application, navigating through scenes and Views.

As for the Fluent bindings, it seems to me that this provides great opportunities and performance gains. And orientation to designers is really a great advantage. However, this is really a separate and fairly voluminous topic.

I also want to suggest that you slightly simplify the creation of properties in the ViewModel by creating a base ViewModel based on the Bindable class.

Creating properties in the ViewModel will be cleaner, without checking for if (value == _name) and OnPropertyChanged calls.

Something like this:
image

from unity-weld.

RoryDungan avatar RoryDungan commented on June 25, 2024

Hey so first off I should clarify - are you asking specifically about making a navigation system with Unity Weld, making Unity Weld work with MvvmCross, or making a new framework that's like MvvmCross but works in Unity, possibly with some code from Unity Weld?

In regards to not being pure MVVM, our examples typically have a MonoBehaviour as the ViewModel just because that's easy to set up, but the system is designed to support pure C# classes as ViewModels too. You can do this by having a MonoBehaviour that implements IViewModelProvider and just returns your real ViewModel. If you're using Zenject I imagine it should be fairly simple to create a MonoBehaviour that implements IViewModelProvider and uses Zenject to resolve the dependency on the ViewModel class.

I had a look at the Fluent binding syntax from MvvmCross and it does look pretty cool but it's probably outside the scope of Unity Weld. Unity Weld is explicitly designed to enable designers to set up bindings in the editor without needing to write any code, while that is a completely code-driven binding system. Unity Weld is also based entirely on reflection and bindings stored as strings which might not fit well with their strongly typed system. If you just wanted to make MvvmCross work with Unity then it's possible you might be able to reuse some of our binding code though.

from unity-weld.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.