node.js - REST API: CRUD operations in model or controller -
i'm building app using express , mongoose. backend api (since frontend native ios). in mvc framework, controller acts interface between model , view. since don't have views, should away controllers , keep crud operations in models, or should keep them in controllers? pros , cons of each approach?
view
you still have view since you'll need display whatever response is.
crud operations
these operations delegated service layer controllers. service layer alters state of model layer.
Comments
Post a Comment