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

Update README.md #26

Closed
wants to merge 1 commit into from
Closed

Update README.md #26

wants to merge 1 commit into from

Conversation

vbrajon
Copy link

@vbrajon vbrajon commented Aug 10, 2014

No description provided.

@johnpapa
Copy link
Owner

Thanks. For a 1 liner I could see this, but the style recommend is keeping any logic out of the top and using a function below. So for that purpose, I'll keep it this way. But absolutely, no issue on a 1 liner in the top. I may update the readme to explain that too.

@johnpapa johnpapa closed this Aug 10, 2014
@johnpapa
Copy link
Owner

opened issue to reference this #27

@vbrajon
Copy link
Author

vbrajon commented Aug 11, 2014

Thanks for your answer, I'm glad you consider this OK :)

What about exposing an entire service to the view ?

vm.checkService = creditService

@johnpapa
Copy link
Owner

Good question. I prefer to only expose features through the vm/controller. Exposing an entire service to a View would expose all of its features to the View directly. Besides crossing that SoC lines it might also expose functionality you don't want the view having. Also, if the service changes, now the View is also affected.

In general, its good to keep that SoC intact.

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

Successfully merging this pull request may close these issues.

None yet

2 participants