ContactsController { @Autowired private ContactService service; @RequestMapping(value=”/list”, method = RequestMethod.GET) public @ResponseBody List<Contact> getContacts() { return service.getContacts(); } } [{ “id” : 31, “firstname” : “LeBron”, “lastname” : “James”, “telephone” : “111-222-3333” }] DAO (@Repository) MODEL VIEW C O N T R O L L E R Monday, 3 June 13
- jQuery / Zepto Single Page Application (SPA) Connection to API over RESTful JSON interface $(function(){ // stuff here Backbone.history.start(); }); Monday, 3 June 13
: “listContacts” }, index : function() { // stuff here } listContacts : function() { // stuff here } }); var router = new MyApp.AppRouter(); Routing client-side “states” “routes” map List of actions Monday, 3 June 13