-
Notifications
You must be signed in to change notification settings - Fork 19
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
fromJSON should be from fromObject #1
Comments
Agree. I think a better name would be |
The most intuitive is |
what about `newFrom'?
or just
still open to suggestions |
I believe that .build or .create should be better than .from ... Because it already is used in other libs like own javascript... |
just to add to this discussion...
there are two approaches towards naming:
in (1) in (2) it is a attempt to capture the intention "create a new User from this data" in code and make it more readable |
In most cases we use of this method to create an entity instance-based from any object, it can be from a database or a simple post request, in some ways, the object has been constructed previously, so |
Ohh, got it! This really make sense. Now |
Add super lint checker on pull request
|
let |
I think it's related with issue #14 |
The serialization method 'fromJSON' is capable to parse in entity not only json strings, but entire objects, so, it should be called 'fromObject'.
The text was updated successfully, but these errors were encountered: