-
Notifications
You must be signed in to change notification settings - Fork 5
Server side components explained
- reference specific files
- diagram
I order to illustrate the workflow we are going to follow an example of a request going end to end.
So we will look at how a resource is created:
Client side:
A user, from the dialog box just submitted a node.
The request is passed from the angular controller dialogue "createUserDialogueBox" to the angular service "Resource" via an http request through the basic routing on app.js expressResourceNew which travels through to the resource controller
two ways to register a web service:
- Express resource way (app.resource...) (url to express resource)
- Plain express (app.get, app.post etc') (express docs)
by magic to resourceController which passes the request to controller._coffee who handles these kind of generic requests such as "create". The controller._coffee" makes sure that the user is logged in by magic and than goes to the resourceDAO which through it's own "create" function passes the order to the user modal to retrieve the user and the resource modal by magic to the db which creates it through some weird implementation of juggling db and returns everything back as a callback.