Coder Social home page Coder Social logo

mvvmc-demo's People

Contributors

macdevnet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mvvmc-demo's Issues

how todo when I want to push or present one VC in MVVC

In this project,I did not saw any code like 'push' 、'present' and 'dismiss'.
and in real-world, I must push some controller use navigationController.

with my own mind, I think should put this push or dismiss code in 'pageCoordinate',
some thing like this:

In ListCoordinator.swift :

extension ListCoordinator: ListViewModelCoordinatorDelegate
{
    func listViewModelDidSelectData(_ viewModel: ListViewModel, data: DataItem)
    {
        detailCoordinator = DetailCoordinator(window: window, dataItem: data, nav:self.navigationController)
        detailCoordinator?.delegate = self
        detailCoordinator?.start() // within ,push detail controller
    }
}


extension ListCoordinator: DetailCoordinatorDelegate
{
    func detailCoordinatorDidFinish(detailCoordinator: DetailCoordinator)
    {
        self.detailCoordinator = nil
        self.dismiss ...
    }
}

is it a right way?

A query for the MVVMCAuthenticateModel

As far as I understand MVVM, the operations (CRUD) should happen inside the model but the operations triggered from a view into the view -model, should happen inside the view-model only.

In this case, when I hit the login button, the login function which checks the Username and Password should be there in the MVVMCAuthenticateViewModel and not inside MVVMCAuthenticateModel. Could you please take out some time and see what I am referring to? Overall wonderful lecture in the video, it cleared a lot of my doubts.

Detecting model (serverside) changes

Question: Who should be responsible for detecting model-changes?

In the sample app you display a list of people and their rank. I guess that list does not change to often, but lets say it did. Who would then be responsible for doing these updates/refetches?

Possibility 1: It's the models responsibility and it should contain a timer function to periodically do the refetch. But then I guess the model would need a way to notify the viewModel about the update?

Possibility 2: It's the viewModels responsibility. If would have a timer function and periodically call the model.items function to update/refetch.

(Of course you could do it easy and put a "refresh" button in the view that the user has to click to get the latest data, but I would like it to be more "event driven")

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.