New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

The Community Blog is a personal opinion of community members and by no means the official standpoint of DNN Corp or DNN Platform. This is a place to express personal thoughts about DNNPlatform, the community and its ecosystem. Do you have useful information that you would like to share with the DNN Community in a featured article or blog? If so, please contact .

The use of the Community Blog is covered by our Community Blog Guidelines - please read before commenting or posting.

Services Framework, a little context

Over the past several days there have been a few blog posts introducing the new Services Framework.  These posts have generated several expressions of interest and several questions.  In this post I want to provide some context around why we built Services Framework, what it is today and where we are planning to take it tomorrow.

Fundamentally Services Framework allows developers to easily create a Web API that any "device" that speaks HTTP can call.  In this sense "device" can be almost anything such as a smart phone, curl script, XmlHttpRequest, or my personal favorite suggestion so far, an RFID scanner operating on a factory floor.  Almost anything that has an internet connection will do, and that means if you can write code for it, Services Framework will probably help you to integrate it with your DotNetNuke site.

People have been writing various .asmx, .ashx, and WCF based web services for a long time.  How is Services Framework better?  The main difference is that each time someone wrote their own web service, they had to authenticate, authorize and load DotNetNuke context  themselves.  The single biggest convenience of Services Framework is that these features are built in.

So far there are three different ways to authenticate in Services Framework.  Not surprisingly we support forms authentication just like the DotNetNuke web site.  We expect this will be used almost exclusively by XmlHttpRequests initiated from AJAX style web pages.  There are two authentication options to support devices operating from outside of a web page.  These are Basic and Digest authentication.  Basic Authentication like forms authentication passes username and password as open text and should only be used with SSL.  Digest Authentication hashes the credentials and is much safer to use on a regular HTTP connection.  In future we will likely expand the authentication options.  oAuth is like the next likely candidate.

Once a user is authenticated the next step is authorization.  In 6.2 we have focused most of our effort on authorizing via module permissions.  Each service call can be configured to require any standard or custom module permission.  We also support general purpose authorization that allows services to be made available to only Host users, any anonymous user, or by static role names.  A better approach to role based authorization is needed, but will not likely make it into the 6.2 release.  Look for those improvements in future releases.

Once the authentication and authorization have been taken care of and your web service code is actually executing, it will have access to context like the current user info, portal settings and module info when applicable.  A service can call any part of the DotNetNuke API.

There are many styles of web services out there.  We are not pushing toward any particular style.  We wanted a lightweight solution that supports simple RPC style services, along with full blown REST services and the many hybrid approaches to REST-like services.  We intentionally did not add any support for "heavyweight" services like SOAP or WS*.  Such support could be built on top of Services Framework, but we don’t expect to add it to the core.

We have chosen to build Services Framework on top of ASP.Net MVC 2.  This provides a lightweight framework for dealing with incoming service requests.  It supports a very flexible approach to defining URIs, and makes it easy to handle a variety of HTTP verbs.  The output of a service can be in pretty much any text format that is required.  The full power of ASP.Net MVC is available when building services.

ASP.Net MVC was built primarily to serve web pages to a browser.  To some extent it is an accident that the foundation of ASP.Net MVC provides a flexible way to build web services.  Recently Microsoft released a beta of the next generation of ASP.Net MVC which includes the new and exciting Web API.  The new Web API takes many of same ideas and flushes them out for the specific purpose of building web services.  Web API will not be released in time for 6.2, but we are excited about it, and seriously considering switching Services Framework to Web API in a future release.

In 6.2 the main focus of Services Framework has been building services to support jQuery/AJAX based module development.  Several of the new social features make use of Services Framework.  To help with jQuery and AJAX based modules the Services Framework includes a jQuery plugin with helpers to setup the headers required for executing in the context of a particular module.  Services Framework also includes an easy way to add and validate anti-forgery tokens in pages that load your module, helping to prevent CSRF style attacks on modules that use web services.

Services Framework has just begun it's life, and I expect it will evolve substantially over the next couple major releases of DotNetNuke.  Please help us grow the Services Framework by trying it out and letting us know what questions you have, what suggestions you have, and what successes you achieve using Services Framework.

Stay tuned for my next post on Services Framework in which I will walk through building a module from HTML, javascript, MVC services and only the tiniest bit of Web Forms code.


Comment Form

Only registered users may post comments.


Aderson Oliveira (22)
Alec Whittington (11)
Alessandra Davies (3)
Alex Shirley (10)
Andrew Hoefling (3)
Andrew Nurse (30)
Andy Tryba (1)
Anthony Glenwright (5)
Antonio Chagoury (28)
Ash Prasad (37)
Ben Schmidt (1)
Benjamin Hermann (25)
Benoit Sarton (9)
Beth Firebaugh (12)
Bill Walker (36)
Bob Kruger (5)
Bogdan Litescu (1)
Brian Dukes (2)
Brice Snow (1)
Bruce Chapman (20)
Bryan Andrews (1)
cathal connolly (55)
Charles Nurse (163)
Chris Hammond (213)
Chris Paterra (55)
Clint Patterson (108)
Cuong Dang (21)
Daniel Bartholomew (2)
Daniel Mettler (181)
Daniel Valadas (48)
Dave Buckner (2)
David Poindexter (12)
David Rodriguez (3)
Dennis Shiao (1)
Doug Howell (11)
Erik van Ballegoij (30)
Ernst Peter Tamminga (80)
Francisco Perez Andres (17)
Geoff Barlow (12)
George Alatrash (12)
Gifford Watkins (3)
Gilles Le Pigocher (3)
Ian Robinson (7)
Israel Martinez (17)
Jan Blomquist (2)
Jan Jonas (3)
Jaspreet Bhatia (1)
Jenni Merrifield (6)
Joe Brinkman (274)
John Mitchell (1)
Jon Henning (14)
Jonathan Sheely (4)
Jordan Coopersmith (1)
Joseph Craig (2)
Kan Ma (1)
Keivan Beigi (3)
Kelly Ford (4)
Ken Grierson (10)
Kevin Schreiner (6)
Leigh Pointer (31)
Lorraine Young (60)
Malik Khan (1)
Matt Rutledge (2)
Matthias Schlomann (16)
Mauricio Márquez (5)
Michael Doxsey (7)
Michael Tobisch (3)
Michael Washington (202)
Miguel Gatmaytan (3)
Mike Horton (19)
Mitchel Sellers (40)
Nathan Rover (3)
Navin V Nagiah (14)
Néstor Sánchez (31)
Nik Kalyani (14)
Oliver Hine (1)
Patricio F. Salinas (1)
Patrick Ryan (1)
Peter Donker (54)
Philip Beadle (135)
Philipp Becker (4)
Richard Dumas (22)
Robert J Collins (5)
Roger Selwyn (8)
Ruben Lopez (1)
Ryan Martinez (1)
Sacha Trauwaen (1)
Salar Golestanian (4)
Sanjay Mehrotra (9)
Scott McCulloch (1)
Scott Schlesier (11)
Scott Wilkinson (3)
Scott Willhite (97)
Sebastian Leupold (80)
Shaun Walker (237)
Shawn Mehaffie (17)
Stefan Cullmann (12)
Stefan Kamphuis (12)
Steve Fabian (31)
Steven Fisher (1)
Timo Breumelhof (24)
Tony Henrich (3)
Torsten Weggen (3)
Tycho de Waard (4)
Vicenç Masanas (27)
Vincent Nguyen (3)
Vitaly Kozadayev (6)
Will Morgenweck (40)
Will Strohl (180)
William Severance (5)
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out