Wednesday, October 11, 2006

preview of r.a.d.splitter

With the introduction of r.a.d.splitter, telerik introduces a powerful new control to its already strong library of ASP.NET components. Anyone familiar with Windows Forms development will recognize the splitter control and appreciate it's ability to dramatically simplify the task of laying out a form. Splitter allows you to easily divide a page into regions (and even subdivide regions into additional regions) into which you can drop the rest of your page's controls. The common task of coding

tags and building CSS (or heaven forbid, the use of Frames) just to layout a page with multiple columns can now be a time wasting activity of the past.

Overview

Defining a splitter is a simple process of adding individual "RadPanes" and "RadSplitBars" to a parent splitter control. And because you can easily nest splitter controls, you can achieve complex layouts with little effort. Each pane that you add to your splitter can contain HTML, server controls, or user controls to fill it's content. Alternatively, you can set the ContentUrl property and load an existing web page directly into your pane. That's pretty cool.

If you do not define any RadSplitBars in your splitter, you get a control that can act like an "invisible placeholder" for your page layout. The individual panes can still be manipulated using the powerful Client-side API (more on this later), but the actual division of the panes will be invisible to your users. In this mode, the splitter basically becomes an automatic markup generator for creating multiple-column layout. One thing to note here, though, is that splitter does use tables to build the control layout. This is not a big deal and it probably does provide a more consistent rendering across browsers, but for those of you who insist on "table-less" layouts splitter won't do it for you. Perhaps a future version will offer table-less rendering.

As with all controls in the r.a.d.control suite, splitter ships with a comprehensive Client-side API that gives you complete control over the splitter's behavior on the client. Using the API, you can resize, expand, or collapse individual splitter panes and respond to client events like OnClientPaneCollapsed or OnClientPaneResized. This is a powerful feature when combined with telerik's leading AJAX solution, r.a.d.ajax, because it enables you execute server-side processing in response to client-side splitter events.

Managing the state of the splitter panes is also a snap. The control automatically remembers the height, width, expand/collapse state, pane scroll positions, and ContentURL (if used) of each pane across PostBacks. The scroll position memory is a nice touch, especially if you have a pane with long scrolling content. One issue: the scroll position does not remember the scrollbar location of panes with ContentUrl set. It may be a beta bug, though, so we'll have to see what the final release brings.

How does it compare?

Telerik is definitely not the first company to offer a splitter control for ASP.NET. Major component vendor ComponentArt offers "splitter for ASP.NET", a splitter control that is very similar to telerik's splitter. On many levels these controls are comparable: they both provide CSS skinning, they both provide complex layout support (though telerik's seems syntactically easier to use), they both provide a client-side API, and they both maintain pane state across PostBacks.

I was unable to find any feature in ComponentArt's control that does not exist in splitter, but I did spot a few places where telerik has once again raised the bar. Specifically, it is not possible to load an external web page in the panes of ComponentArt's control (directly - you can place an IFRAME in the pane and manually load a page) and it is also (shockingly) not possible to directly load an User Control into a ComponentArt pane (you must use a PlaceHolder and load the UserControl into the PlaceHolder). That said, ComponentArt and Telerik have both produced quality splitter controls for ASP.NET. If you're a telerik developer (or considering becoming a telerik developer),though, the real magic happens when you use multiple telerik controls. The integration between splitter and the industry leading ajax opens the door for developers to create some truly innovative applications.

Conclusions

Telerik has another winner on their hands with r.a.d.splitter. The control lives up to the level of quality and feature support that we've come to expect from telerik's component offerings. If you have any applications that still use Frames or if you are tired of writing the markup to maintain multiple column layouts, this control is a must have. If you're a subscriber to the telerik control suite, this tool is automatically included in your subscription and you'll get it when r.a.d.controls Q3 2006 is released in late September. While you wait, visit the telerik site (http://www.telerik.com/) and check out the online beta demos of splitter to get a hands on feel for the new control. I for one can't wait to start building applications with this new control!

//Todd Anglin

//31 August 2006

0 comments: