Transcript
- 1.
- Writing JavaScript In Your DotNetNuke Site
- Brian Dukes, Engage Software
- 3.
- Brian Dukes
- Engage Software since 2006 Chief Software Architect in charge of Module Development Microsoft Certified Professional Developer
- 4.
- Agenda
- - jQuery - ASP.NET AJAX - JavaScript Safety - Including JavaScript
- 5.
- jQuery - included?
- Core - IconBar - Skin Widgets - Telerik ( Telerik.Web.CommonScripts.$ ) Modules - Console - Dashboard - Sitemap settings - Blog includes its own version - 3rd Party
- 6.
- jQuery - options
- Debug Hosted - Google CDN - jQuery UI - SWFObject - WebFont Loader - Use a specific version - Microsoft CDN - jQuery Validation
- 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
- 8.
- ASP.NET AJAX
- Guaranteed on the page starting in DNN 5.0 Use$findto interact with Telerik controls
- 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));
- 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
- 11.
- How to Include JavaScript
- Inside
- 12.
- Avoid Inconsistencies and Frustration
- jQuery
- 13.
- Questions?
- Commit to DotNetNuke's Stack Exchange: http://bit.ly/dnn-se