MVVM Concepts

  1. MVVM means Model, View and View Model (view’s model).
  2. The MVVM pattern provides a clean separation between application’s user interface, its presentation logic, and its business logic and data by separating each into separate classes.
  3. The view’s responsibility is to define the structure and appearance of what the user sees on the screen.
    Ideally, the code-behind of a view contains only a constructor that calls the InitializeComponent method.
  4. The view model encapsulates the presentation logic and data for the view.
    There is no direct reference from the view model to the view.
    The view model defines public properties and commands that are used by the view to render the model.
  5. The model encapsulates business logic and data.
    The model should not contain any user task specific behavior or application logic.Windows Runtime allows defining the view by using XAML and its code behind. The mapping between view model public properties and UI can be defined by using data binding mechanisms.

    • A Game to Learn:
      BubbleBurst is a fun and addictive game, based on the classic game called BubbleBreaker. It is the subject of Advanced MVVM, a book written by Josh Smith to help MVVM developers take their skills to the next level. The application architecture is based on the Model-View-ViewModel design pattern. Several difficult problems were solved in elegant, reusable ways, as explained in great detail by the book. And if that isn’t enough, the user interface was enhanced by several professional Visual Designers and User Experience gurus!Feel free to download the source code or binaries, even if you don’t buy the book.The application was compiled in Visual Studio 2008 with Service Pack 1. It requires .NET 3.5 SP1 to be installed in order to run properly.Have fun!

Source Control – Git

  1. gitLearn about Git
    Git is a distributed version control system where each developer has a copy of the entire source repository. Having a local repository means that Git works well in environments where developers need to work without connectivity. It also offers a simple branching model that enables developers to quickly create local and private branches, enabling flexible workflows. Git also works well in modular code bases where code is distributed across many repositories.
  2. How to integrate Git in Visual Studio
    Step 1:

    1. Launch Visual Studio, Select menu Tools | Extension Manager,
    2. Search online gallery for Git Source Control Provider
    3. Download and install.

Step 2:

  1. Go to Tools | Options
  2. Select Source Control in the tree view
  3. Select Git Source Control Provider from the drop down list, and click OK.
    4. Also, please verify the paths to your favorite git tools are setup correctly.

Step3_Git3. Create a Git team project in Team Foundation Service

You can quickly spin up a new Git team project with just a few clicks.
Step4_GitStep5_Git4. Use Visual Studio with Git

Git provides powerful DVCS features that enable your team to collaborate on an app. But Git’s user interface can be difficult to use, and to get full value from it you may need to bring separate tools together.
Visual Studio provides an integrated experience that makes it easy for your team to leverage the power of Git. And if you are a Git pro who has some favorite Git tools you still want to use, you can use them alongside Visual Studio.

When you are ready to begin working in your Git team project, you begin by connecting to it. Once you’ve connected to your new Git project, you’ll be prompted to Clone the repository in the team project onto your dev machine.