Its been a while since my last post and I am feeling a bit behind on keeping people up to date on my latest involvement in the DNN project. The main reason for my lack of posting is due to me starting a new job consulting. Each time this happens, I usually drop all the "fun" projects I am involved during my spare time and brush up on the things that the new client is looking for. This latest client has been pretty good, and provided some insights into what seems like the latest buzz word to hit technology shops: Test Driven Development (TDD). I definitely see some of the positives to this approach, but also some unexpected negatives. Perhaps when time allows, I will discuss some of these, but for now lets focus on the topic at hand, DotNetNuke and the ClientAPI.
Way back in March of 2006 I made a post titled "Behold The Mighty $()". The specific portion of this post I wish to discuss is
The $() function is something we added to Atlas as well. It basically is useful short-hand for document.GetElementById("name").
Hope this helps,
Scott
Here we are 2 years later and I am still regretting following the bandwagon and people are still paying for it. One of my thread postings from last year outlines my thoughts well on the matter.
The whole idea of the $ function and who "owns" that "namespace" has become quite muddy. When I first learned of the use of $ and found that MS was adopting the same notation, I decided to do it as well. For at the time, I felt that all frameworks simply used it as a quick way to get the reference to a DOM element. Soon afterwards I learned that frameworks like prototyle use it for much more. Apparently, MS learned this as well, and decided to switch to $get. What I never understood is why they went through all the trouble of creating a nice namespace hierarchy, minimizing chances to have conflicting functions, then decided to scrap the whole idea and make shortened alias' with the $. In essence, they are saying they "own" the $ namespace. I have commented back and forth on this issue here.
Unfortunatly, I cannot just yank my $() function since I have to worry about backwards compatibility (at the time MS did it they were in beta so they could). My $ function should be functioning with prototype last time I checked.
I am happy to announce that the next release of the ClientAPI/WebControls and DNN 5.0 will no longer use the $() function. The ClientAPI will still declare it if it finds it is not already defined for backwards compatibility, but this should reduce the number of conflicts people are finding dramatically. If you have any modules that rely on this function existing, I suggest changing your code to either (document.getElementById() or if you are requiring MSAJAX as Cambrian will, $get()).
Thats all I have time to report for now.