Coder Social home page Coder Social logo

mvvm-for-unity3d's Introduction

MVVM for Unity3D

Creating games with Unity3D and MVVM architecture !

What is MVVM for Unity3D ?

MVVM for Unity3D is a tool that will help you to create your games/apps with the architectural pattern named M-V-VM (see paragraph below). This tool intends to make developer life easier and to simplify the communication between developers and designers.

Images are better than words, so I let you see what it could offer you :

MVVM in global

MVVM in global with injection

MVVM in C# with injection

What is MVVM ?

The Model View ViewModel (MVVM) is an architectural pattern used in software engineering that originated from Microsoft. Largely based on the Model-View-Controller pattern (MVC), MVVM is a specific implementation targeted at UI development platforms which support the event-driven programming in Windows Presentation Foundation (WPF) and Silverlight on the .NET platforms. MVVM facilitates a clear separation of the development of the graphical user interface (either as markup language or GUI code) from the development of the business logic or back end logic known as the Model (also known as the data model to distinguish it from the view model). The ViewModel may also implement a mediator pattern organising access to the backend logic around the set of use cases supported by the View. MVVM was designed to make use of data binding functions in WPF to better facilitate the separation of view layer development from the rest of the pattern by removing virtually all GUI code ("code-behind") from the view layer. Instead of requiring user interface (UX) developers to write GUI code, they can use the framework markup language and create bindings to the ViewModel, which is written and maintained by application developers. This separation of roles allows interactive designers to focus on UX needs rather than programming of business logic, allowing for the layers of an application to be developed in multiple work streams for higher productivity. Even when a single developer works on the entire code base a proper separation of the View from the Model is more productive as the user interface typically changes frequently and late in the development cycle based on end-user feedback. - Wikipedia

Why MVVM ?

So, MVVM helps you in this way :

  • DRY (Don't Repeat Yourself)
    • create one, use everywhere
  • KISS (Keep it simple, stupid)
    • produce less code but stay simple
  • SOLID (Single responsibility, Open-closed, Liskov substitution, Interface segregation and Dependency inversion)
    • using Dependency Injection
  • Separate concern
    • Developers create the game logic = MVVM Logic (View abstraction / ViewModel / Services / Model)
    • 2D / 3D Designers create the view = Graphics / 3D Model using Unity Editor

Roadmap

Current version : X

Main features

  • Portable Model
  • Portable (Abstract) ViewModel
  • IoC Container - Dependency Injection
  • Very useful and fluid GUI notification
  • Battle system with ViewModel and Services

Other optional features / extension

  • Many services
    • Backend services (Windows Azure Mobile Services, etc..)
    • Networking Services (Photon Networking, etc...)
    • Samples services of existing battle system (FPS, RPG, etc...)
  • Unit testing tool & TDD
  • Service Locator = one service to control all of them
  • Messenger = send messages between ViewModels
  • Simplifying animation system

mvvm-for-unity3d's People

Contributors

odonno avatar

Watchers

 avatar  avatar

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.