The goal is to build a Dojo's JsonRestStore-compatible back-end implementation on top of N2 web framework.
What's available nowAs of yet, the foundation of a universal web data service is available. The service is capable of returning a JSON representation of a requested page either by appending a $format=json to a query string OR by specifying an Accept: application/json request header. (This mimics the behavior of ADO.Net Data Services1)
So, for example, if a default N2 Templates project is running at http://demo.n2cms.com/, then, after following installation instructions bellow, if we append aforementioned $format=json to any valid URI, we'll get a response that will look something like this:
{
/* .. most properties omitted */
"IconUrl": "~/Templates/UI/Img/page_world.png",
"ShowTitle": false,
"ID": 2,
"Parent":
{ "__deferred":
{ "uri": "/Templates/Secured/Root.aspx?page=1"
}
},
"Title": "Home",
"Name": "home",
"Published": "\/Date(1210809600000+0300)\/",
"Children":
[ { "__deferred":
{ "uri":"/?item=3"
}
},
/* .. more children omitted */
{ "__deferred":
{ "uri":"/sv.aspx"
}
}
],
"Extension": ".aspx",
"IsPage": true,
"Url": "/",
"Path": "/home/"
}Installation instructionsadd a reference to N2.WebDataService.dll assembly from your N2-powered web application apply [assembly: Controls(typeof(ContentItem), ControllerType = typeof(AjaxServiceController))] attribute (it might be conveniently done in the AssemblyInfo.cs file) register HTTP handler in the web.config file: 1 Please see: Can Astoria return data in JSON format?
30 Day Summary Apr 18 2013 — May 18 2013
|
12 Month Summary May 18 2012 — May 18 2013
|
Copyright
©
2013
Black Duck Software, Inc.
and its contributors, Some Rights Reserved. Unless otherwise marked, this work is licensed under a
Creative Commons Attribution 3.0 Unported License
. Ohloh
®
and the Ohloh logo are trademarks of
Black Duck Software, Inc.
in the United States and/or other jurisdictions. All other trademarks are the property of their respective holders.