1 / 67

Building a Next-Generation Web Application with ASP.NET MVC 2 and jQuery

Building a Next-Generation Web Application with ASP.NET MVC 2 and jQuery. Nate Kohari Co-Founder / CTO Enkari , Ltd. nate@enkari.com. Who?. Goals. ASP.NET is a great platform for building attractive, standards-compliant rich internet applications.

nasnan
Download Presentation

Building a Next-Generation Web Application with ASP.NET MVC 2 and jQuery

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Building a Next-Generation Web Applicationwith ASP.NET MVC 2 and jQuery Nate Kohari Co-Founder / CTO Enkari, Ltd. nate@enkari.com

  2. Who?

  3. Goals

  4. ASP.NET is a great platform for building attractive, standards-compliant rich internet applications

  5. You can build rich internet applications without Silverlight or Flash

  6. Why ASP.NET MVC?

  7. BizSpark

  8. Why jQuery?

  9. (demo)

  10. Anatomy of a typical Zen request

  11. HTML/JavaScript ASP.NET MVC

  12. JS.Class

  13. Zen.Ui.StoryCard = new JS.Class({ func1: function() { ... }, func2: function() { ... } }); var card = new Zen.Ui.StoryCard();

  14. Behaviors

  15. $(“.story-card”).attach( Zen.Ui.Behaviors.StoryCard);

  16. Find all elements with the CSS class story-card… $(“.story-card”).attach( Zen.Ui.Behaviors.StoryCard);

  17. $(“.story-card”).attach( Zen.Ui.Behaviors.StoryCard); …and apply the appropriate behavior

  18. Which card did the user move?

  19. (story card) <li data-projectid=“123” data-storyid=“456”> ... </li> HTML5 data-* attributes

  20. (story card) <li data-projectid=“123” data-storyid=“456”> ... </li> HTML5 data-* attributes { projectid: 123, storyid: 456 } JSON read via Metadata Plugin

  21. Where should we send the request?

  22. One Action = One Route

  23. One Action = One Route (“route-per-action”)

  24. Routes defined in XML: <app> <project> <route action=“move” pattern=“project/{projectid}/story/{storyid}/move” verbs=“post”/> ... </project> ... </app>

  25. Routes defined in XML: <app> <project> <route action=“move” pattern=“project/{projectid}/story/{storyid}/move” verbs=“post”/> ... </project> ... </app> …at app start, parsed & registered in RouteTable

  26. Routes defined in XML: <app>(area) <project> <route action=“move” pattern=“project/{projectid}/story/{storyid}/move” verbs=“post”/> ... </project> ... </app>

  27. Routes defined in XML: <app> <project> (controller) <route action=“move” pattern=“project/{projectid}/story/{storyid}/move” verbs=“post”/> ... </project> ... </app>

  28. Routes defined in XML: <app> <project> <route action=“move” pattern=“project/{projectid}/story/{storyid}/move” verbs=“post”/> ... </project> ... </app>

  29. Url.Action(“move”, “story”, new { projectid = 123, storyid = 456 })

  30. Url.Action(“move”, “story”, new { projectid = 123, storyid = 456 }) http://agilezen.com/projects/123/story/456/move

  31. But wait… we need the route in JavaScript!

  32. urlfor()

  33. urlfor(“move”, “story”, { projectid: 123, storyid: 456 })

  34. urlfor(“move”, “story”, { projectid: 123, storyid: 456 }) http://agilezen.com/projects/123/story/456/move

  35. urlfor(“move”, “story”, { projectid: 123, storyid: 456 }) Metadata read from story card <li>

  36. routes.js

  37. HTML/JavaScript ASP.NET MVC

  38. Aspect Oriented Programming

  39. [Demand]

  40. [Demand(Permission.EditStory)]

  41. [Secured]

  42. [Secured(SSLMode.Force)]

  43. [Transactional]

  44. Output Filters

More Related