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...
Read More »
|
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...
Read More »
|
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');...
Read More »
|
By Jon Henning on
Thursday, June 19, 2008
With the launch of DotNetNuke 5 getting closer, I figured it was a good time to put together a quick video on some of the new functionality that will be found within the webcontrols. This video will introduce you to the new ways you can customize version 2 of the DotNetNuke Menu by simply tweaking your css. It starts out giving a brief overview of where we came from in earlier releases and how we are making strides to improve the ability for both a DotNetNuke skinner and end portal administrator. Enjoy!
Read More »
|
By Jon Henning on
5/12/2008
One of the new features coming in Cambrian is an update in the permissions grid. The current grid supports two states, Allow and Null (not assigned). The new grid will support three states (Allow, Deny, and Null). The obvious question here is how do you present this to the user? The current design allows for a nice compact way to set the permissions within a grid utilizing checkboxes. The new way will use a new DotNetNuke WebControl that supports multiple states and mimics a checkbox. The original name I came up with for the control was DNNTriStateCheckbox. However, while developing this control I soon realized there was no reason I needed to only support 3 states and saw the opportunity to support any number of states and not necessarily look like a checkbox. So the control is now called DNNMultiStateBox. It is probably the simplest of all the controls in the Read More »
|
By Jon Henning on
Monday, April 21, 2008
Having attending this year's MVP Summit, I have to say I am even more interested in writing some Silverlight applications. One of the questions I am trying to answer is just how to get Silverlight to talk to the server, especially when it comes to DotNetNuke integration. Some quick searching yielded this excellent blog on how Silverlight and javascript can interact. I thought it may be helpful to some people to see how to allow Silverlight to call into a PageMethod and pass and return a rich object. I admit this may not be the best option, as I still need to do some research, but at a bare minimum this approach should
Read More »
|
By Jon Henning on
Monday, April 14, 2008
One of the things I have been doing lately with my projects like the DotNetNuke CodeEndeavors AJAX templates along with the ClientAPI and WebControls is to use a custom MSBuild script to package the code up as part of the project's compilation. Since a csproj/vbproj file is already a MSBuild script this is rather simple. The problem I had was that the editing of these files within Visual Studio was cumbersome. Having to right-click on the project in Solution Explorer and choose Unload Project, then right-click again and choose Edit xxxxx.vbproj, then make my modifications, then right-click again to reload the project was getting annoying.
Read More »
|
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.
Read More »
|
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.
Read More »
|
By Jon Henning on
Wednesday, December 12, 2007
The ClientAPI and WebControls Beta codenamed Caspian and DawnTreader are now being released to the general public. Features of this release include:
Tweening
Control Methods
Conversion of entier ClientAPI and WebControls to utilize MS AJAX Framework
Embedded and Compressed scripts
XHTML Compliant output
and much more
An additional incentive to try out this new functionality is...
Read More »
|