Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Products › Development › Forge › Component - Client API Register  |  

 

dnn_ct_clientapi_170x64.gif

 

  Quick Links  
 


  Team Leadership  

Jon Henning

jonhenning.jpg

 


  DotNetNuke Projects  
The DotNetNuke Projects are a special category of platform extensions which are developed by volunteers to conform to the high professional standards mandated by DotNetNuke Corporation. The DotNetNuke Projects are distributed as a standard part of the DotNetNuke core application release offerings.

 


AspDotNetStoreFront
  Ads  
OnyakTech
 


  Sponsors  

Meet Our Sponsors

SmarterTools
Verndale
The Official Microsoft ASP.NET Website
Portal Webhosting - Hosting For Developers
Red-Gate Software
MaximumASP
 


DotNetNuke® Project :: Client API

Introduction

The DotNetNuke Client API is composed of both server-side and client-side code that works together to enable a simple and reliable interface for the developer to provide a rich client-side experience.   The following diagram outlines the current consumers utilizing the DotNetNuke ClientAPI, along with the intended consumers of this functionality in the future.

ClientAPIOverview.jpg


Goals

  • Provide a consistent means of communicating information between the client-side script and server-side code.
  • Allow for functionality to easily be turned off and resort to the less-efficient way of responding to client-side events- post-backs.
  • Provide a uniform, cross-browser API that the developer can program against to provide a rich UI.  This includes but is not limited to accessing the Document Object Model (DOM), Dynamic HTML (DHTML), eXtensible Markup Language (XML).
  • Allow for the API to be enhanced and extended by both the DNN Core Team members and Third Party developers.
  • Provide ability to easily create Unit Tests to assist in development, testing, and troubleshooting of the API.  The tests should be easy to copy to any platform (windows, linux, Mac, etc.) and run, providing output that can then be sent to the developer for troubleshooting.
 


Client API Project Blog
Author: Jon Henning Created: Wednesday, August 24, 2005
My personal blog on DotNetNuke.

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

 


"SalarO" Skinning Graphic Design Branding Services
SalarO develops packaged & custom skins for your DNN at prices you can afford. SalarO is also developing Module development, Hosting, Branding/Logo design as well as Content Transfer Services to complement the core skinning solutions.
www.salaro.com
Data Springs Inc. - Module Development
Data Springs is a leader in the DNN community offering high quality modules, custom module development, enhancements to the DNN core product and overall DNN support.
www.datasprings.com
XCESS expertise center b.v.
Custom made modules and complete solutions for the DNN framework. Maatwerk modules en complete webtoepassingen gebaseerd op het DNN framework.
www.xcess.nl

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP