Pages

What Exactly meaning of M (model) in architecture pattern.

M (the M letter in each architecture pattern)-



An extremely normal misguided judgment is that ... 
the Model (the M letter in each architecture pattern) is the model classes object (POJOs) got from server or database, similar to the User object, or some other data class ... this isn't accurate at all.

 the Model represents a Model layer, an entire layer that comprises of 
Entities layer (where we put every one of our data classes and POJOs) and the
Domain layer (where we put all the classes that hold rationale/Business logic,
similar to Repositories and Server-API interfaces, database-related classes, etc...)
this Model layer is gotten to by our Controller or Presenter through a class (or an interface), you can call it Model class, or View-Model 

So for our models here, let us call that class as the Model class, where this class is answerable for speaking with the Model layer and holding the state (and reactions) for the present screen ... I incline toward causing this class to broaden the new architecture segments View-Model as it will endure pivot and design changes.

Have a good day #staysafe.

No comments:

Post a Comment