DNN Blog

Author: Jon Henning Created: 8/24/2005 RssIcon
Information and progress on Core ClientAPI functionality.
By Jon Henning on 4/22/2009
I mentioned in my last blog that I planned on publishing a video that would give an overview of how the Silverlight...
By Jon Henning on 4/10/2009
I finally was able to get the multi-project template functionality working to enable the easy creation of a DotNetNuke Silverlight module.  The sample demonstrates how easy it is to have Silverlight interact with javascript, which in turn can talk directly to your server-side module code.  Unlike the other module templates, this one requires the creation two projects, one for your DNN module and one to host your Silverlight code.  Upon compilation, the Silverlight code gets zipped up into a file with a XAP extension. ...
By Jon Henning on 2/3/2009
Last post in this series we learned some basics of MSBuild, including the use of 3rd party tasks.  We saw that by simply importing some other targets file we can extend the functionality available to our scripting language.  The last two pieces to this puzzle happen to be solved by use of 3rd party plugins available on CodePlex:  Deployment and Automating our Build.

Deployment

...
By Jon Henning on 1/30/2009
Last post I went through the basics of what you do to set up your project on CodePlex along with how to hook into the source control.  This blog will explain what I did for my build script.  Specifically, how I handled versioning and packaging.

Most developers when confronted with a mundane task that is continually repeated will be compelled to automate it.  We are programmers after all, we enjoy making the computer making our lives easier.  One of these tasks is the creation of a software package to hand...
By Jon Henning on 1/30/2009
I figured it may help some people to share my experience with getting my two projects (DotNetNuke ClientAPI and DotNetNuke WebControls) up on CodePlex and allowing them to be do automatic nightly builds.  The one thing I want to make clear before I start is that this is just one of many ways to do it. 

In order to successfully get nightly builds to work...
By Jon Henning on 12/5/2008
Those of you who have been following my previous blog entries on Utilizing the Microsoft AJAX Framework and ClientAPI to Develop Rich Modules will be happy to learn that I have just posted the module templates on CodePlex. Unlike the previous version, this one utilizes the IWizard Template wizard framework...
By Jon Henning on 11/12/2008
As mentioned in Part II of this series, this entry will focus on another advantage of writing rich client side objects representing our modules on the client side.  One very common use case that comes up again and again is how can one module talk to another on the same page.  For a long time DotNetNuke had this capability from the server side through something called...
By Jon Henning on 11/11/2008
In part one of this series I mentioned that the Microsoft AJAX Framework along with the ClientAPI are different than a lot of other javascript frameworks since they allow for an end-to-end integration directly with .NET.  This entry will discuss how the this integration makes life easier for a DotNetNuke module developer by allowing communication to and from the server to be simple.  

The Microsoft AJAX Framework allows for server-side code to add a reference to the js file, initialize the client-side...
By Jon Henning on 11/10/2008
With the release of DotNetNuke 5.0 drawing near, I figured it would be good to provide an introduction as to how nice client-side module development can be with the integration of the Microsoft AJAX Framework and the ClientAPI 4.0. This mini-series of blog entries will cover the basics of how to get started by creating a sample module that

Utilizes client-side javascript objects to encapsulate our logic, easily allowing multiple instances of a module on a page without having our variables clash Utilizes the Microsoft AJAX Framework to allow for variables to be initialized in our client-side objects Utilizes the new ClientAPI ControlMethods to allow for communication of complex objects both to and from the server Enables localized messages to be sent down to the client-side javascript Enables client-side Inter-Module Communication (IMC) If your new to javascript, you may be confused as to where to get started. As there are many frameworks out there, it can be overwhelming as to which one to choose. One of the advantages of using both the Microsoft AJAX Framework and the ClientAPI is they both have been written to allow for easy integration with the server-side logic, whereas other frameworks may have the ability to make AJAX calls, they do not have included ASP.NET server-side code to handle easy integration with your VB/C# code.

Another vital piece of information that you should understand is that javascript is more of an emulation (prototype) language than a real language. It has the ability to morph itself to do common programming constructs like objects, events, inheritance, enumerators, etc. However, it does not have these things out of the box. Thus, a framework like Microsoft’s, is nice since it will provide a formalized way in which objects get defined and inheritance happens. For more information how this has been formalized see this document.

Let’s assume you already have a sample module you are working on and it has a typical Edit Usercontrol associated called EditDNNAjaxModule1.ascx. A convention that I like to follow is to create my javascript file with the same name plus a .js extension (EditDNNAjaxModule1.ascx.js). This keeps the files near each other in the Solution Explorer.  Another assumption we will make is that we plan on creating a namespace for our controls using a company name which is a common practice in writing server-side modules that we will apply to the client. To do this, we simply declare our namespace at the top of the js file.

Type.registerNamespace('YourCompanyHere');...
By Jon Henning on 4/13/2008

While sitting at the airport waiting for my plane to depart to the MVP Summit, I decided to spend a little time optimizing the new ClientAPI (codenamed Caspian) for the Cambrian release.  One of the new features for this release was to allow the output of the ClientAPI and Webcontrols to emit compliant markup (more detail mentioned in this blog).  There was two areas that this affected my code.

By Jon Henning on 3/24/2008

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.

By Jon Henning on 10/5/2007
Ever since version 1.0 of the Solpart menu, it supported animations.  Unfortunately, these animations were specific to IE due to it being the only browser that supported transitions natively.  When I created the DNNMenu I had decided not to go this route, but rather seek out a technique that worked across all browsers.  When I was first reviewing the Atlas bits, there was a portion called Glitz, which I had anticipated would support the animations I was looking for.  Unfortunately, Glitz never became an official...
By Jon Henning on 6/15/2007
One interesting enhancement that the AJAX Control Toolkit team came up with in the latest release is yet another way to register your scripts (ToolkitScriptCombiner).  Earlier I blogged on the fact that Microsoft can’t seem to make up its mind on how these things should be registered.  In the Control...
By Jon Henning on 6/15/2007
I have finished the initial conversion of the DotNetNuke WebUtility (ClientAPI) project to utilize the Microsoft ASP.NET AJAX Extension framework.  This has several advantages and one major disadvantage.  The disadvantage is that upgrading to it will require Microsoft ASP.NET AJAX extensions (System.Web.Extensions.dll) to be installed.  I do not have the time, nor do I think it worth the effort, to provide an optional install.  Technically, since the current implementation does not require the extensions and...
By Jon Henning on 4/13/2007
I will be releasing the next point release of DotNetNuke WebControls (v1.5.3) shortly.  There are a couple reasons for this.  First, it was detected by some users that the currently released version with DNN 4.5 was compiled in Debug mode, thus affecting performance a little.  The second, and primary reason is due to our desire to try (emphasis on this word) and maintain compatibility with other AJAX frameworks.  In this case we are talking about prototype.

...
By Jon Henning on 3/2/2007
Being able to retrieve and set personalization values on the client is a new feature that DNN will support for version 4.5.  Since personalization is something specific to DNN, the code will reside in the DNN specific ClientAPI files of dnncore.js and DNNClientAPI (ClientAPI.vb).  The current state of the dnncore.js is such that it does not utilize namespaces.  Instead it prefixes all function names with __dnn_.  Module developers use these client-side functions when they are calling server-side methods like...
By Jon Henning on 1/3/2007
Before I get into the reason for the article I wanted to wish everyone a Happy New Year!  I have been very busy the past couple months on the next version of the ClientAPI and WebControls and am getting anxious about publishing my work.  However, I am going to need a couple weeks to gather my work up again after the long holiday and polish it off a bit.  In the meantime I wanted to give a quick bit of history regarding my decision in how to obtain what scripts need to be registered during a partial rendering...
By Jon Henning on 9/18/2006
Back in 2004 when I was creating the ClientAPI I spent some time trying to find the best way to edit javascript, with hopes that I would find a solution that offered IntelliSense™ and an easy means to document it.  Having found neither I decided to create my own console app to transform an XML file into documentation.  While this is a starting point, it sure is a far-cry from the in-line...
By Jon Henning on 5/24/2006
A couple months back the core team was going over some of the excellent enhancements Charles was working on for the 3.3/4.1 release. One of those pages offered the ability to customize the user properties, including the order in which they were displayed. The traditional method for reordering a list was implemented, meaning the use of postbacks. I was tasked with coming up with a better way to accomplish this without requiring postbacks.
By Jon Henning on 4/18/2006
I have been spending most of my time lately working on coding the DNNMenu, which explains the lack of time spent blogging, among other things.  However, I did want to post on some research I recently did regarding the use of Atlas inside DotNetNuke.  Now that Atlas has a go live license I considered a few options for integrating it into the DotNetNuke core.  Namely, the idea of enabling our modules to take part in partial rendering.  If you are unfamiliar with what partial rendering does, let me briefly explain.

...
By Jon Henning on 3/20/2006
I just finished updating the ClientAPI to allow multiple values to be posted in a callback with little effort. Here is the relavent section of the updated ClientAPI Client Callback document that will be included in DNN3.3/4.1.
By Jon Henning on 3/17/2006
Up until a couple weeks ago I have been developing the ClientAPI in somewhat of a vacuum, meaning that I did not seriously investigate other javascript frameworks out there.  There are a couple reasons for this.  For one thing, I had a pretty good idea on what functionality I needed to add in order to accomplish my original goals and spent most of my efforts meeting those goals.  Probably the main reason was a time issue, there just doesn't seem to be enough time to learn all the things I want to learn.

...
By Jon Henning on 3/13/2006
It appears that there has been little work done in the area of the ClientAPI and WebControls over the last month.  However, the exact opposite is true.  I have been doing so much that I haven’t had time to blog about it.  I decided to write a quick summary of things I’ve been involved with to keep those interested up to date.

 

Developing Web Controls With The Client API Document

One of the things that was long overdue on my list was the writing of a document that outlines the steps needed...
By Jon Henning on 1/13/2006
I have cleaned up the xmlhttp "garbage collector" a little more since my last post and have posted the patch to the ClientAPI's download page.  If you are concerned with the client's browser memory being leaked and you use the ClientAPI's callback functionality then I recommend applying this patch.  Really the only people who should be concerned are those that utilize continuous callbacks within the same page.  To install the patch simply extract the zip file into your dotnetnuke\js folder (there is one file that should be overwritten, dnn.xmlhttp.js).

...
By Jon Henning on 1/12/2006
Recently a user reported to me that they were seeing a memory leak with my client callback functionality.  I did a little searching and found one obvious culprit.  It has to do with the way I hook up the onreadystatechange event.  Like many areas of the ClientAPI I utilize closures to accomplish event syncing.  The ClientAPI actually has been aware of the IE issue with memory leaks for some time (see bottom of this link)...
By Jon Henning on 11/16/2005
I have had numerous requests for a simple sample demonstrating the AJAX callback within a module.  I finally got enough freetime to whip up a simple example. HelloAJAX.gif I had noticed from the posts in the forums that the appropriate script was not being automatically registered as I had originally intended.  Therefore I updated the document with a Step 3b. Step 3b – Register Javascript...
By Jon Henning on 9/23/2005
During some testing of the client-side functionality I ran into a bit of a hurdle when it came to MacIE.  The ClientAPI allows for variables to be passed from client to server and vice-versa through the build in functions setVar/getVar.  These values are passed back and forth through the use of a HIDDEN field.  Since multiple variables can be set there is the need to delimit the strings with a character that will not be used.  Having done this sort of thing on projects before I decided to use characters like...
By Jon Henning on 9/19/2005
Last time I attended PDC was back in 2000 when they unveiled this thing called the .NET Framework.  I remember being there amazed at the depth of thought that was put into it.  Being drawn towards web development, I keyed in on the new advancements in ASP.NET, especially WebControls.  Finally, there was an easy way to encapsulate some of the complexities involved for creating controls to be utilized on the internet.  It was then that I decided to write the Solution Partner's menu.  I planned on taking the knowledge...
By Jon Henning on 9/9/2005

The ClientAPI Documentation is now hosted on the demo webcontrol site.  Feel free to browse the many objects and methods available to you or run some unit tests by clicking on the links within the documentation.

If you get any of the unittests to fail please post the appropriate information in the ClientAPI forums (browser, OS, unit test output).

By Jon Henning on 9/6/2005
After receiving many emails asking how does the ClientAPI allow me to easily do something like MinMax I realized that while my goal of giving examples was accomplished, but I fell short in the area of easily allowing my enhancements to be re-used. This is something that I plan on addressing in upcoming releases, starting with the introduction of the EnableMinMax function.
Attend A Webinar
Try An Online Demo
Download DotNetNuke Professional Edition Trial
Have Someone Contact Me

Like Us on Facebook Join our Network on LinkedIn Follow DNN Corporate on Twitter Follow DNN on Twitter

Advertisers

Sponsors

DotNetNuke Corporation

DotNetNuke Corp. is the steward of the DotNetNuke open source project, the most widely adopted Web Content Management Platform for building web sites and web applications on Microsoft .NET. Organizations use DotNetNuke to quickly develop and deploy interactive and dynamic web sites, intranets, extranets and web applications. The DotNetNuke platform is available in a free Community and subscription-based Professional and Enterprise Editions with an Elite Support option. DotNetNuke Corp. also operates Snowcovered.com where users purchase third party apps for the platform.