considerations with writing javascript in your dotnetnuke site

Download Considerations with Writing JavaScript in your DotNetNuke site

If you can't read please download the document

Upload: engage-software

Post on 20-Aug-2015

4.325 views

Category:

Technology


2 download

TRANSCRIPT

  1. 1.
    • Writing JavaScript In Your DotNetNuke Site
    • Brian Dukes, Engage Software
  2. 3.
    • Brian Dukes
    • Engage Software since 2006 Chief Software Architect in charge of Module Development Microsoft Certified Professional Developer
  3. 4.
    • Agenda
    • - jQuery - ASP.NET AJAX - JavaScript Safety - Including JavaScript
  4. 5.
    • jQuery - included?
    • Core - IconBar - Skin Widgets - Telerik ( Telerik.Web.CommonScripts.$ ) Modules - Console - Dashboard - Sitemap settings - Blog includes its own version - 3rd Party
  5. 6.
    • jQuery - options
    • Debug Hosted - Google CDN - jQuery UI - SWFObject - WebFont Loader - Use a specific version - Microsoft CDN - jQuery Validation
  6. 7.
    • jQuery - versions
    • /Resources/Shared/scripts/jquery/jquery.min.jsDNN 4.9.1 - 5.0.1 - jQuery 1.2.6 DNN 5.1.0 - 5.2.3 - jQuery 1.3.2 ( closest() ,live() ) DNN 5.3.0 - present - jQuery 1.4.2 5.0.0 - API 5.2.3 - SSL (kind of) 5.4.2 - jQuery reference is earlier in the
  7. 8.
    • ASP.NET AJAX
    • Guaranteed on the page starting in DNN 5.0 Use$findto interact with Telerik controls
  8. 9.
    • JavaScript Safety - naming
    • Naming collissions - keep exposed variable names to an absolute minimum - don't expose overly generic variable names -company.moduleinstead ofmodule - keep scripts in separate files, create jQuery plugins - don't use$for jQuery - use module pattern
    • (function ($) { $(function () { // do stuff }); }(jQuery));
  9. 10.
    • JavaScript Safety
    • JSLint - catches easy-to-miss issues - accidental global variables - Douglas Crockford'sJavaScript: The Good Parts jQuery Plugins - http://www.learningjquery.com/2007/10/a-plugin-development-pattern - Engage: Tell-a-Friend
  10. 11.
    • How to Include JavaScript
    • Inside
  11. 12.
    • Avoid Inconsistencies and Frustration
    • jQuery
  12. 13.
    • Questions?
    • Commit to DotNetNuke's Stack Exchange: http://bit.ly/dnn-se