jaxdug march 2012. who am i david fekke web applications and ios apps jaxdug, jssug, jaxjug...
TRANSCRIPT
![Page 1: JaxDUG March 2012. Who am I David Fekke Web Applications and iOS Apps JaxDUG, JSSUG, JaxJUG and](https://reader036.vdocument.in/reader036/viewer/2022070409/56649ea05503460f94ba3a73/html5/thumbnails/1.jpg)
USING ASP.NET MVC3 W/ JQUERY
JaxDUG March 2012
![Page 2: JaxDUG March 2012. Who am I David Fekke Web Applications and iOS Apps JaxDUG, JSSUG, JaxJUG and](https://reader036.vdocument.in/reader036/viewer/2022070409/56649ea05503460f94ba3a73/html5/thumbnails/2.jpg)
Who am I
David Fekke Web Applications and iOS Apps http://fekke.com/blog/ JaxDUG, JSSUG, JaxJUG and
JaxFusion David Fekke L.L.C.
![Page 3: JaxDUG March 2012. Who am I David Fekke Web Applications and iOS Apps JaxDUG, JSSUG, JaxJUG and](https://reader036.vdocument.in/reader036/viewer/2022070409/56649ea05503460f94ba3a73/html5/thumbnails/3.jpg)
ASP.NET MVC 3.NET Framework
![Page 4: JaxDUG March 2012. Who am I David Fekke Web Applications and iOS Apps JaxDUG, JSSUG, JaxJUG and](https://reader036.vdocument.in/reader036/viewer/2022070409/56649ea05503460f94ba3a73/html5/thumbnails/4.jpg)
JQUERY 1.7JavaScript Framework
![Page 5: JaxDUG March 2012. Who am I David Fekke Web Applications and iOS Apps JaxDUG, JSSUG, JaxJUG and](https://reader036.vdocument.in/reader036/viewer/2022070409/56649ea05503460f94ba3a73/html5/thumbnails/5.jpg)
![Page 6: JaxDUG March 2012. Who am I David Fekke Web Applications and iOS Apps JaxDUG, JSSUG, JaxJUG and](https://reader036.vdocument.in/reader036/viewer/2022070409/56649ea05503460f94ba3a73/html5/thumbnails/6.jpg)
![Page 7: JaxDUG March 2012. Who am I David Fekke Web Applications and iOS Apps JaxDUG, JSSUG, JaxJUG and](https://reader036.vdocument.in/reader036/viewer/2022070409/56649ea05503460f94ba3a73/html5/thumbnails/7.jpg)
VALIDATION
![Page 8: JaxDUG March 2012. Who am I David Fekke Web Applications and iOS Apps JaxDUG, JSSUG, JaxJUG and](https://reader036.vdocument.in/reader036/viewer/2022070409/56649ea05503460f94ba3a73/html5/thumbnails/8.jpg)
INTERACTIVITY
![Page 9: JaxDUG March 2012. Who am I David Fekke Web Applications and iOS Apps JaxDUG, JSSUG, JaxJUG and](https://reader036.vdocument.in/reader036/viewer/2022070409/56649ea05503460f94ba3a73/html5/thumbnails/9.jpg)
AJAX
![Page 10: JaxDUG March 2012. Who am I David Fekke Web Applications and iOS Apps JaxDUG, JSSUG, JaxJUG and](https://reader036.vdocument.in/reader036/viewer/2022070409/56649ea05503460f94ba3a73/html5/thumbnails/10.jpg)
WIDGETS AND UI
![Page 11: JaxDUG March 2012. Who am I David Fekke Web Applications and iOS Apps JaxDUG, JSSUG, JaxJUG and](https://reader036.vdocument.in/reader036/viewer/2022070409/56649ea05503460f94ba3a73/html5/thumbnails/11.jpg)
Semantic Web
Paint HTML Style and Skin using CSS Keep CSS at top of page Keep Scripts at bottom of page Update using Ajax Use Json ActionResult
![Page 12: JaxDUG March 2012. Who am I David Fekke Web Applications and iOS Apps JaxDUG, JSSUG, JaxJUG and](https://reader036.vdocument.in/reader036/viewer/2022070409/56649ea05503460f94ba3a73/html5/thumbnails/12.jpg)
![Page 13: JaxDUG March 2012. Who am I David Fekke Web Applications and iOS Apps JaxDUG, JSSUG, JaxJUG and](https://reader036.vdocument.in/reader036/viewer/2022070409/56649ea05503460f94ba3a73/html5/thumbnails/13.jpg)
Sections
Create sections in your Layout file Use section in head for styles Use section at bottom for scripts @RenderSection("StyleSection", false) @section StyleSection in our view
![Page 14: JaxDUG March 2012. Who am I David Fekke Web Applications and iOS Apps JaxDUG, JSSUG, JaxJUG and](https://reader036.vdocument.in/reader036/viewer/2022070409/56649ea05503460f94ba3a73/html5/thumbnails/14.jpg)
<!DOCTYPE html><html>
<head><title>@ViewBag.Title</title>@RenderSection(“StyleSection”, false)
<head><body>
… Rest of your html body here …@RenderSection(“Scripts”, false)
<body><html>
![Page 15: JaxDUG March 2012. Who am I David Fekke Web Applications and iOS Apps JaxDUG, JSSUG, JaxJUG and](https://reader036.vdocument.in/reader036/viewer/2022070409/56649ea05503460f94ba3a73/html5/thumbnails/15.jpg)
<appSettings> <add key="ClientValidationEnabled"
value="true" /> <add key="UnobtrusiveJavaScriptEnabled" value="true" /> </appSettings>
![Page 16: JaxDUG March 2012. Who am I David Fekke Web Applications and iOS Apps JaxDUG, JSSUG, JaxJUG and](https://reader036.vdocument.in/reader036/viewer/2022070409/56649ea05503460f94ba3a73/html5/thumbnails/16.jpg)
public class People { public int ID { get; set; }
[Required(ErrorMessage="Firstname is required")] [StringLength(50, ErrorMessage="Field too long")] public string FirstName { get; set; }
[Required(ErrorMessage = "Lastname is required")] [StringLength(50, ErrorMessage = " Field too long ")] public string LastName { get; set; }
[Required(ErrorMessage = "Email is required")] [StringLength(256, ErrorMessage = " Field too long by 256 chars")] [RegularExpression(".+\\@.+\\..+", ErrorMessage = "email not valid")] public string Email { get; set; } }
![Page 17: JaxDUG March 2012. Who am I David Fekke Web Applications and iOS Apps JaxDUG, JSSUG, JaxJUG and](https://reader036.vdocument.in/reader036/viewer/2022070409/56649ea05503460f94ba3a73/html5/thumbnails/17.jpg)
<input class="text-box single-line" data-val="true" data-val-length="Field too long" data-val-length-max="50" data-val-required="Firstname…" id="FirstName" name="FirstName" type="text" value="" />
![Page 18: JaxDUG March 2012. Who am I David Fekke Web Applications and iOS Apps JaxDUG, JSSUG, JaxJUG and](https://reader036.vdocument.in/reader036/viewer/2022070409/56649ea05503460f94ba3a73/html5/thumbnails/18.jpg)
Binding to events
Keep scripts at bottom of page $(“#myButton”).click(fn(e)); $(“#myButton”).bind(“click”, fn(e)); $(“#myButton”).delegate(“td”, “click”, fn(e)); $(“#myButton”).on(“click”, “td”, fn(e));
![Page 19: JaxDUG March 2012. Who am I David Fekke Web Applications and iOS Apps JaxDUG, JSSUG, JaxJUG and](https://reader036.vdocument.in/reader036/viewer/2022070409/56649ea05503460f94ba3a73/html5/thumbnails/19.jpg)
<sometag onclick=“fn();” />
PLEASE AVOID
$(sometag).live(fn);
![Page 20: JaxDUG March 2012. Who am I David Fekke Web Applications and iOS Apps JaxDUG, JSSUG, JaxJUG and](https://reader036.vdocument.in/reader036/viewer/2022070409/56649ea05503460f94ba3a73/html5/thumbnails/20.jpg)
Event object functions
event.preventDefault(); event.stopPropagation(); event.stopImmediatePropagation();
![Page 21: JaxDUG March 2012. Who am I David Fekke Web Applications and iOS Apps JaxDUG, JSSUG, JaxJUG and](https://reader036.vdocument.in/reader036/viewer/2022070409/56649ea05503460f94ba3a73/html5/thumbnails/21.jpg)
Partial Views
Use partials for Dialogs and pop-ups $(“#myDiv”).load(“/controller/action”); Partials are also good for Tabs
![Page 22: JaxDUG March 2012. Who am I David Fekke Web Applications and iOS Apps JaxDUG, JSSUG, JaxJUG and](https://reader036.vdocument.in/reader036/viewer/2022070409/56649ea05503460f94ba3a73/html5/thumbnails/22.jpg)
Ajax
$.ajax(); $.getJSON(); $.post(); $.get(); $.load();
![Page 23: JaxDUG March 2012. Who am I David Fekke Web Applications and iOS Apps JaxDUG, JSSUG, JaxJUG and](https://reader036.vdocument.in/reader036/viewer/2022070409/56649ea05503460f94ba3a73/html5/thumbnails/23.jpg)
Ajax function
$.ajax({ url: “/myController/myAction", type: “POST”, data: someVar, success: function(result){ $("#results").append(result); }});
![Page 24: JaxDUG March 2012. Who am I David Fekke Web Applications and iOS Apps JaxDUG, JSSUG, JaxJUG and](https://reader036.vdocument.in/reader036/viewer/2022070409/56649ea05503460f94ba3a73/html5/thumbnails/24.jpg)
getJSON function
$.getJSON(“/mycontroller/myAction/232”, function(data) { … });
public ActionResult SampleJsonResponse(int Id){ int mynumber = providerGetNumber(Id); return Json(mynumber, JsonRequestBehavior.AllowGet);}
![Page 25: JaxDUG March 2012. Who am I David Fekke Web Applications and iOS Apps JaxDUG, JSSUG, JaxJUG and](https://reader036.vdocument.in/reader036/viewer/2022070409/56649ea05503460f94ba3a73/html5/thumbnails/25.jpg)
JQueryUI
Dragging Widgets, Accordian, Tabs, Datepicker,
Dialog, Slider and Autocomplete Utilities Widget framework Effects Grid control coming
![Page 26: JaxDUG March 2012. Who am I David Fekke Web Applications and iOS Apps JaxDUG, JSSUG, JaxJUG and](https://reader036.vdocument.in/reader036/viewer/2022070409/56649ea05503460f94ba3a73/html5/thumbnails/26.jpg)
3rd Party Jquery Grids
tableSorter jqGrid Flexigrid DataTables SlickGrid Ingrid
![Page 27: JaxDUG March 2012. Who am I David Fekke Web Applications and iOS Apps JaxDUG, JSSUG, JaxJUG and](https://reader036.vdocument.in/reader036/viewer/2022070409/56649ea05503460f94ba3a73/html5/thumbnails/27.jpg)
DEMO
![Page 28: JaxDUG March 2012. Who am I David Fekke Web Applications and iOS Apps JaxDUG, JSSUG, JaxJUG and](https://reader036.vdocument.in/reader036/viewer/2022070409/56649ea05503460f94ba3a73/html5/thumbnails/28.jpg)
How to Contact Me [email protected] http://www.fekke.com/blog/ twitter.com/davidfekke
![Page 29: JaxDUG March 2012. Who am I David Fekke Web Applications and iOS Apps JaxDUG, JSSUG, JaxJUG and](https://reader036.vdocument.in/reader036/viewer/2022070409/56649ea05503460f94ba3a73/html5/thumbnails/29.jpg)
http://asp.net/mvc Codeplex http://weblogs.asp.net/scottgu/ http://bit.ly/mvc-ebook http://bit.ly/mvcmusicstore Nuget