Giter VIP home page Giter VIP logo

uikit-mvvm-c's Introduction

UIKit-MVVM-C

A MVVM-C demo project that uses UIKit for UI, Combine for event handling, MVVM-C for software architecture and unit test.

This is a demo project that shows some techniques that I normally use in my projects. They are MVVM-C software architecture, Combine and unit test.

If you are using SwiftUI, this is SwiftUI version: https://github.com/huynguyencong/SwiftUI-MVVM-C

Demo screen record

Demo

Compatibility

  • iOS 15 and later
  • Swift 5 and later

Project overview

The project uses a mock API to load a list of articles, show an article's details when users tap on it. You can also tap the sign in button to try sign in function.

The project uses MVVM-C (aka Model - View - ViewModel - Coordinator). Why is there Coordinator here? The Coordinator is an additional part for the MVVM, that help to separate navigation handling code to a different place, instead of putting it in the View (or View Controller in UIKit). It makes the view (or view controller in UIKit) more reusable, smaller.

What you can find in this project

  • MVVM-C implement with UIKit and Combine framework.
  • Networking with Combine framework, written in the way that help to test it, and integrate other 3rd parties API easily.
  • Unit test: Mock objects, mock data, dependency injection, etc. to test
  • Some useful extensions.
  • Simple structure of a UIKit project.

Project structure

Project structure

License

Copyright huynguyencong, Licensed under the MIT license.

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.