Giter Club home page Giter Club logo

bombnews's Introduction

BombNews

What is MVVM and Why?

MVVM stands for Model, View, View Model. It describes the flow of our data and the separation of our concerns. The following imagery can represent it because use the power of observation completely and be able to write unit test easily. In addition, I used a stateful structure in the app. Stateful keeps all MVVM features but reinforces new features. Such as state and coordinator. It so a complicated approach for those who see the first time. So I applied a new approach to the state layer to both understand better and reduce the difficulties of architecture.

ezgif com-webp-to-png

You can find all the details about Statefull MVVM in my article.

UI Testing and Unit Testing

I wrote Unit Tests in Swift before but I wrote UItest the first time. Unit test in SwiftUI is kind of different from uikit. In the uikit we can communicate viewController and viewModel with protocol. Because uikit doesn't have property wrappers. Thanks to property wrappers we can release every change of view model in the view same time. Basically, observers use combine infrastructure. ObjectWillChange acts like a publisher and we subscribe with property wrappers. In the unit case classes, we cannot use property wrapper so we have to use combine to listen to view models

Finally, a piece of music for you to listen to when examining the project.

bombnews's People

Contributors

brsrld avatar

Stargazers

 avatar

Watchers

 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.