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

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -