Thursday, March 19, 2009

SharePoint Data Zoom Web Part brings NVelocity, MVC to SharePoint


In the coming days, SharePoint Solutions will be releasing our new SharePoint Data Zoom Web Part. With just about all the effort of falling off a truck, this new web part will allow you to pull data from nearly any data source and integrate it directly inline with your SharePoint content. This is made possible with the help of a powerful template engine called NVelocity, but more on that later. (Note: NVelocity is a port of the Apache Velocity template engine to .NET. To find out more about template engines and template languages, start with this article on Wikipedia.)

To determine if the Data Zoom Web Part is right for you, take a look at the following snippet and ask yourself, "would I like to create data-driven web parts literally this easily"?

<p>Hello $customer.Name!</p>
<table>
#foreach( $widget in $widgetsOnSpecial )
#if ( $customer.hasPurchased($widget) )
<tr>
<td>
$lob.getPromo( $widget )
</td>
</tr>
#end
#end
</table>

If you answered "yes", (or "yeah, dude" for you left-coasters) then you're probably ready to take a ride on the Data Zoom express.

Did I mention we're giving it away for free?

The SharePoint Data Zoom Web Part is the brainchild SharePoint Solutions' software production manager Jeremy Luerkens. After using the NVelocity template engine in another platform, Jeremy felt that the SharePoint world just had to get some of that too. NVelocity is a template engine that allows you to manage your web content according to the Model-View-Controller (MVC) model. With MVC, web page designers can focus solely on creating a well-designed site, and programmers can focus solely on writing quality, robust code to support it.

Out-of-the-box, the SharePoint Data Zoom Web Part will include access to site and cross-site list data within your SharePoint environment. Imagine iterating over list items as easily as in the code listing above. We've included a multitude of helper utilities for accessing, manipulating and formatting data. Everything is accessible from a convenient command menu right within the Data Zoom's source editor. We're also including the SharePoint Data Zoom Extension for Syndication free with the Data Zoom. With this extension, you'll have complete control over fetching and integrating RSS and ATOM feeds into your SharePoint pages. Consider this simple snippet to render a feed:

## Renders an RSS or ATOM feed
##
#foreach($item in $feed.items)
#beforeall
<br/><h2 class="ms-standardheader">$feed.Title.Text</a></h2>
<ul>
#each
<li>
<h3 class="ms-linksectionheader"><a href="$item.Links.get_Item(0).Uri.ToString()">$item.Title.Text</a></h3>
<span class="ms-vb" >$item.PublishDate.ToString()</span>
<blockquote class="ms-vb">$item.Summary.Text</blockquote>
</li>
#afterall
</ul>
#end

I just can't imagine how accessing and integrating data from disparate sources inside and outside SharePoint could be any easier than this, while still maintaining complete control over how and where the data is rendered. For data sources other than SharePoint lists and syndication feeds, we've created several Data Zoom Extensions. In the next few weeks, we'll be releasing extensions for access to a variety of data sources including salesforce.com, Microsoft SQL server and Active Directory. Along with our partners, we'll be creating even more extensions which will allow you to integrate data from just about any source you can find.

Stay tuned for much more on this innovative new web part from SharePoint Solutions.