Thursday, November 20, 2008

re-cap of the 2008 Conference for Non-Profits

So this year's Conference for Non-Profits is over. As usual Blackbaud put on a great show. Props to all the folks that made everything happen! I had a lot of fun seeing attendees from past conferences as well as meeting lots of new ones. I thought I'd do a quick post recapping some of the highlights, at least from a developer's perspective.

During Monday's keynote, Shaun Sullivan unveiled a pretty killer Facebook Toolkit for NetCommunity. I haven't had a chance to do anything but download it but you can be sure to see some posts in the future about it. It looks like it's got a pretty comprehensive integration layer between Faceook and NetCommunity. In a later sessions Michael Andrews dove a bit deeper into the Toolkit and gave us a good overview of what's possible. You'll be able to basically build your own Facebook application that will allow you to post news and events, acquire new constituents, collect gifts or donations and of course leverage existing relationships in Facebook to help spread our mission. It's important to point out that this is a developer's toolkit and you'll probably need someone technical in nature to help you implement it.

Shaun also showed off Nimbus, Blackbaud's dive into the world of "cloud computing". I'm pretty impressed with it. It's going to help alleviate much of the problems that could occur in an RE7 to RE8 migration by syncing your RE7 data to the "cloud" and converting it over to an RE8 format. When you are ready to migrate over to RE8 all your data will be up-to-date in the "cloud" for RE8 to access.

Tuesday was Infinity SDK day with Ben Lambert. Some great stuff in those sessions. I think that topic could have been discussed for 4 days alone and I probably would have still had questions. The Infinity platform is just awesome and as a developer I'm extremely excited about how simple and easy it's going to be to customize Blackbaud applications in the future.

Lastly I wanted to mention the Developer's Contest. My entry, Events To Google, was selected by the Blackbaud as the winner. Thanks to everyone who congratulated me on the win. All the entries will be available on Labs soon and will include the source code to those projects. That's huge and I think it represents a major milestone in Blackbaud's continuing efforts to broaden the developer community for their products. If I stop look at what was available a year ago in terms of developer resource for Blackbaud products it's amazing how far they have come.

So it was a great conference and I left energized, partly due to all the Red Bull in the Internet Strong Lounge, and with lots of new ideas for the next year.

Thanks again to Blackbaud and the events team that helped make this another great conference!

Monday, November 10, 2008

RePost: Rock Your NetCommunity with jQuery

This was posted by Michal Andrews on Labs earlier today.

I'm shamelessly re-posting it in an effort to generate blog traffic off of his work.

Seriously though, it's a good post and jQuery is something that I'm excited to see being used in NetCommunity.

Have a read

Monday, November 3, 2008

Using the PageLink custom server control

This is the second in a series of posts on the new custom server controls that were released in v5.5 of NetCommunity. As I stated in the previous post, custom server controls allow us to take canned pieces of functionality and include them in our own custom parts. In this post I'm going to touch on using the PageLink control. This control allows the user to select a link. It shows the link currently selected and offers the standard modal dialog for selecting a link either from the site, to a document, or a manually entered URL. You'll be able to download the Visual Studio project at the end of this post.

I'm going to assume that you are familiar with the concept of how to build and implement custom parts in NetCommunity. If you aren't, don't worry, just take a few minutes to check out the developer resources before getting started.

PageLinkControlEditor.ascx (Design View)

<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="PageLinkControlEditor.ascx.vb" Inherits="PageLinkControl.PageLinkControlEditor" %>
<%@ Register TagPrefix="bbnc" Namespace="BBNCExtensions.ServerControls" Assembly="BBNCExtensions" %>

Please select a page: <bbnc:pagelink runat="server" id="PageLink1"></bbnc:pagelink>
Please enter the name for the link: <asp:textbox runat="server" id="txtPageLinkName"></asp:textbox>
Here we are registering the BBNCExtensions.ServerControls with the tag "bbnc".
Then we include the control <bbnc:pagelink runat="server" id="PageLink1">
Also we are allowing the name of link on the front end to be specified in txtPageLinkName.

PageLinkControlEditor.vb (Code Behind)

Imports BBNCExtensions

Partial Public Class PageLinkControlEditor
Inherits BBNCExtensions.Parts.CustomPartEditorBase

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'not really used for editors, the OnLoadContent() handles this...
End Sub

#Region " Editor Specific Sub "
Public Overrides Sub OnLoadContent()
If Not Page.IsPostBack Then
Dim oProperties As Properties
oProperties = CType(Me.Content.GetContent(GetType(Properties)), Properties)
If Not oProperties Is Nothing Then
PageLink1.PageID = oProperties.PageLinkID
txtPageLinkName.Text = oProperties.PageLinkText
End If
End If
End Sub
Public Overrides Function OnSaveContent(Optional ByVal bDialogIsClosing As Boolean = True) As Boolean
Dim oProperties As New Properties
With oProperties
.PageLinkText = txtPageLinkName.Text
.PageLinkID = PageLink1.PageID
End With
Return True
End Function
#End Region

End Class
In the OnSaveContent() we take the ID of the selected page using PageLink1.PageID and save it to oProperties.PageLinkID.
We are also going to save the text for the link name using txtPageLinkName.Text to oProperties.PageLinkText.

The OnLoadContent() we load up any previously saved Properties and apply it to the respective controls.

Properties.vb (Editor Properties)

Public Class Properties
Public PageLinkText As String
Public PageLinkID As String
End Class
Here we dim out the Properties the Editor and the Display will be using.

PageLinkControlDisplay.ascx (Design View)

<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="PageLinkControlDisplay.ascx.vb" Inherits="PageLinkControl.PageLinkControlDisplay" %>
<:asp:hyperlink runat="server" id="hypPageLink"></asp:hyperlink>
Nothing fancy here, just declaring the HyperLink control we'll be working with in the code behind.

PageLinkControlDisplay.vb (Code Behind)

Imports BBNCExtensions

Partial Public Class PageLinkControlDisplay
Inherits BBNCExtensions.Parts.CustomPartDisplayBase

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub

#Region " Data Handling "
Private Sub getProperties() 'this loads up the properties from the editor
Dim oProperties As Properties 'class contating the availible properties
oProperties = CType(Me.Content.GetContent(GetType(Properties)), Properties) 'this is a BBNC method
If Not oProperties Is Nothing Then 'don't try to assign the properties to the display controls if there aren't any returned
hypPageLink.NavigateUrl = API.Pages.BuildStandardLink(CType(oProperties.PageLinkID, Integer)) 'this bit here basically takes the PID and then dynamically builds the URL for your specific website.
hypPageLink.Text = oProperties.PageLinkText
End If
End Sub
#End Region

End Class

Again, nothing really fancy. We are retrieving the Properties saved in the Editor using oProperties = CType(Me.Content.GetContent(GetType(Properties)), Properties).
Then we want to apply the Properties to the hypPageLink control. The important piece here is API.Pages.BuildStandardLink(CType(oProperties.PageLinkID, Integer)). It is a native function in the v5.5 API that takes the saved PID (page ID) from the Properties and returns a full URL for that page.
We are also applying the oProperties.PageLinkText to the hypPageLink.Text.

Download this project.

That's it! Pretty simple. If you want me to showcase a specific control please send me an email.
If you haven't already, follow me on Twitter and join our FaceBook group.