Dan Wahlin
AngularJS, JavaScript, HTML5, jQuery, Node.js, ASP.NET, C#, XAML
-
Video: Structuring JavaScript with the Revealing Module Pattern
This sample video from Pluralsight’s Structuring JavaScript Code course provides an introduction to the Revealing Module Pattern and demonstrates how it can be used to convert “function spaghetti code” to more structured code that’s re-useable and easier to maintain. If you’d like additional details about using the Revealing Module Pattern as well as other patterns that can be used to structure your JavaScript code view my post here.
-
jQuery Tip #5: Using jQuery’s end() Function to Work with Sets
Previous Tips:
-
jQuery Tip #4 – Use the on() Function for Event Handling
Previous Tips:
-
Upcoming Pluralsight Course - Web Development with ASP.NET MVC, EF Code First, jQuery, and HTML5
Update: This course is now available here!
-
jQuery Tip #3 - Using the data() Function
Previous Tips:
-
jQuery Tip #2 - Manipulating the DOM in a Loop
One of jQuery's greatest strengths is its ability to manipulate the DOM with a minimal amount of code. It's so easy to change things that we often don't think about what's happening under the covers. For example, consider the following code that appends nodes to an object named parentDiv.
-
jQuery Tip #1 – Defining a Context When Using Selectors
I really enjoy working with jQuery and have had the opportunity to use it a lot over the years on various projects. It’s an essential part of my “technology tool belt”. My company has also started providing new training classes on jQuery to various companies and I’ve had a lot of great questions come up about best practices, tips and tricks, when certain functions should be used over other functions, and more.
-
Upcoming ASP.NET, HTML5 and Windows 8 Talks and Workshops at DevConnections 2012
It’s that time of the year again! DevConnections 2012 is right around the corner and we have a lot of great new workshops and sessions planned for the ASP.NET and Client-Dev (HTML5, Windows 8 Metro, JavaScript, jQuery, etc.) tracks.
-
Working with the JavaScript “this” Keyword
JavaScript's "this" keyword can be a bit tricky to work with depending on the context in which it's used. When it's used with patterns such as the Prototype or Revealing Prototype patterns working with "this" can be challenging in some cases. Unlike languages such as C# or Java, "this" can change context. For example, if a Calculator object named calc calls an add() function then "this" represents the Calculator object which means you can easily access any variables defined in the object such as a variable named tax by simply using this.tax.
-
Using the JavaScript Prototype Property to Structure and Extend Code
There are several different patterns that can be used in JavaScript to structure code and make it more re-useable, more maintainable, and less subject to naming collisions. Patterns like the Revealing Module Pattern, Prototype Pattern, Revealing Prototype Pattern, and others can be used to structure code and avoid what I call “function spaghetti code”. One of my favorite features offered by both the Prototype and the Revealing Prototype patterns is the extensibility they provide. They’re quite flexible especially compared to the Module or Revealing Module patterns out there.