Created
April 26, 2012 03:50
-
-
Save ferlores/2495657 to your computer and use it in GitHub Desktop.
Presenter API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Interface for a isomorphic Presenter | |
*/ | |
//NODE enviroment - Director can make something similar | |
module.exports = Presenter.extend({ | |
'name': 'posts', | |
'/posts get': function(){}, | |
'/posts post': function(){}, | |
'/posts put': function(){}, | |
'/posts/:id delete': function(id){} | |
}); | |
//Browser enviroment - could be a jQuery pluglin | |
(Presenter.extend({ | |
'name': 'posts', | |
'/posts route': function(){}, | |
'/posts/:id route': function(id){}, | |
'#button click': function(){}, | |
}))(jQuery); | |
$('#someDiv').posts(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment