In my previous article I showed the differences between scope and context, basic problems that arise and how to fix them. If you are just using some JavaScript and maybe jQuery, an understanding of scope is all that is needed to get you by. Once you start using objects or namespaces however, you’ll start to run into issues with context and will need to use the keyword this. But when you get into object oriented JavaScript, you’ll need an advanced understanding of context and how to make it work for you. To do this, we’ll use the call() and apply() methods, and then a backwards compatible version of the new feature Mozilla recently released in JavaScript 1.8.5 called bind().

Read the rest of this entry »
JavaScript Context, Call and Bind – Ninja Level
JavaScript Scope and Context – Not the Same Thing!
In forums and other places I often see people incorrectly use the term scope when they should be using the term context. Scope applies to the variable and functional access of a function, whereas context is the property and method access of a function. Essentially, scope is function-based, and context is object-based.

Read the rest of this entry »
Don’t Ask the Client for the Answer
When reading the title of this article you may immediately think that it seems obvious. You’re the commissioned expert, why would you be asking the client how to do your job? That’s precisely the point; I’m giving you the answer and not the problem. When given a solution the natural tendency is to take the easy way and simply… implement it. But what is the problem you’re addressing? And is that the right solution? Will it work? How would you even know? So maybe, it’s not so obvious. In fact I would argue that being provided the solution is much more common than being told the problem.

Read the rest of this entry »
Building Web Applications with MDV
MDV or “model-driven views”, eschews the concept of widgets in favor of template-based views which are behavior-based and update themselves when the data has changed.
Max Motovilov gave a presentation on MDV which was enlightening and thought provoking. He showed how he leveraged The Dojo Toolkit to create behaviors and data stores which update his views through his custom-built template system.
Max’s detailed presentation can be seen here, and you can also see the examples he used on GitHub.
Google Dart – Should JavaScript be Replaced?
A memo from a Google employee was leaked earlier this month exposing the new plan for Dart, which they claim to be a new programming language for structured web programming. The memo goes into some detail on what Dart would be, but doesn’t go into much detail on why Dart should be. In other words, it doesn’t explicitly state the deficiencies in JavaScript. Do they have a point? Should JavaScript be replaced?
What’s New in HTML5
If you live in the DFW area and you’re not coming to our meetings, you’re missing out! These aren’t “user groups” per se, but more like a get together where we cut up and have fun. Last night’s was an especially good time. Then we do the after-party at the bar!
The Ajax News was not recorded this time, but it was based on existing presentations from Google IO. The latest and greatest in HTML5 have landed in the Google-backed Chrome, which has surpassed the Apple-backed Safari as the browser introducing the most cutting edge features. Safari, Firefox, IE, and Opera better put it in high gear if they want to keep up.
http://html5-demos.appspot.com/static/html5-whats-new/template/index.html#1
http://www.htmlfivewow.com/slide1
NOTE: These presentations must be run in Google Chrome 12+. Also, you may need to enable some features, like audio in the about:flags.
Video: Webpage Design Basics for Non-Designers
Posted is the video and presentation of web design for non-designers. We cover a lot of basics, including logo design, layout, fonts, and color theory.
Simple and Easy JavaScript Inheritance
For object inheritance, I had been using the traditional method of assigning methods and properties to the function’s prototype. Because my project was relatively simple, I could get away with this for a while. But as the project grew in scope, using the prototype started proving unwieldy. It worked, but the code was getting messy and hard to read. I decided it was time to implement an inheritance system. Not too complex, just something to help me organize my code. I ended up creating what I call my Declare Inheritance Helper.

Read the rest of this entry »
Video: Hype Animation Tutorial
New goodies are posted! First, I gave a tutorial of the Hype HTML Animation App. You can see the video here, and you can see the final results here.
And we also have Bob doing the Ajax News, where he focuses on an interesting blog and topic, The 11 JavaScript Mistakes You’re Making.
Next Meeting: Hype Demo
The next Club AJAX meeting will be next Tuesday, June 7th. We’ll demo the new Hype animation tool, do Ajax News, have some give-aways, and finally a code Q&A.
Yes. The Dallas Mavericks are playing game 4 of the finals that night. We looked at changing the date, but that didn’t work – the Mavericks wouldn’t cooperate and move the game to Wednesday… something about TV schedules and 20,000 ticket holders.
Hence we’ve opted for an easy-going meeting, but it should still be fun! And I will have the Mavs game queuing up on my DVR and will be racing home to see them win!




