I'm new to NodeJS and I want to implement Model View Controller
In java I created a model like this:
public class Employee {
private firstname:
private lastname:
.
.
..........
public Employee(String firstname, String lastname, ... ... ..){
...............
..............
}
// Getters and Setters
.......
.......
.......
}
In Node this is what I did
Another concern is the query should be inside the controller not in the model and the model should only contain an database fields, getters and setters.
Now may I ask you guys on what is the best practice or correct way in creating a model in nodejs.
via Gerald
No comments:
Post a Comment