-
Notifications
You must be signed in to change notification settings - Fork 2
JSONPParent.js
Parent Kind for all JSONP Kinds. JSONP isn't really necessary, I just started doing it for the GET calls and kept going with the pattern
Most child Kinds simply define the REST API, some override the processResponse() and processError(), as necessary.
- PublicView.js: mvcApp.waterfall('onCheckDB');
- PublicController.js: checkDB: function(inSender, inEvent) { var checkDB = new JSONP.CheckDB({owner:this, fireEvent:'onCheckDBResult'}); checkDB.makeRequest({}); }
- PublicController.js: checkDBResult: function(inSender, inEvent) { if (!inEvent.dbAvailable) { mvcApp.broadcast.displayClass = 'error'; mvcApp.showErrorMessage("Cannot connect to the Database", "We're experiencing networking issues, please try again later."); } else { // mvcApp.showInfoMessage("Database is up.", "Database is up."); } }
#../
\enyo-mvc-web-app
|
+---index html
+---mvcApp html
+---mvcAppDebug html
+---package json
+---node-server js
+---mvcApp html
+---assets
+---enyo
+---lib
+---node_modules
+---public
+---scripts
|
\---source
|
+---apps
+---controllers
| |
| +---auth
| \---public
|
+---css
+---ext
+---models
| |
| +---ajax
| \---socket
|
\---views
|
+---auth
| |
| \---body
|
\---public
|
\---body
Add a Contact Page for Authorized users
Why is the project structured this way?
Why are some things implemented this way?