Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a Role to implement an Observable Design Pattern for Model #10

Open
marcoarthur opened this issue Dec 4, 2020 · 1 comment
Open

Comments

@marcoarthur
Copy link
Owner

Motivation

Model holds data retrieved. This data is wrapped on Objects. There a number of options to orderly increment
new functionalities based on these data pieces encapsulated into object as an attribute. To manage automatic
(dynamic) role application we can construct the observable pattern to Model and define Events for Model life-cycle such as creation, attribute change, destruction, serialization, and so on.

@marcoarthur
Copy link
Owner Author

We actually need just two events: the attributte setup and the model populated. That is when we create a model we will setup the values given, so we can attach any callback to attribute being set. When model is populated with a hash of its attributes we can just emit the event that represents this process. That are the basic thing that a model has to do in our app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant