Monday, August 30, 2010

Q2 Service Packs now available

vs-reminders Looking for some updates for your Q2 2010 Telerik tools? If you’ve got the Telerik Extensions for Visual Studio installed, you’ve probably already seen the automatic notification that newer bits are available (one of my favorite Telerik VSX features!). If not, here’s your official notice that Q2 2010 SP1s are now available for download on Telerik.com. Over the last week, we’ve shipped service pack updates for most of tools in the Telerik Ultimate Collection, from JustCode to WebUI Test Studio. Here are some quick highlights of what you’ll find in these SPs, along with the new version numbers and links to the release notes for quick reference:

  • RadControls for ASP.NET AJAX (2010.2.826)
    • Fixed support for ASP.NET 4 new ClientIDModes
    • [RadAsyncUpload] Added detailed error info to Flash upload module
    • [RadListView] Added support for custom item drag handles
    • [RadCalendar] Added keyboard navigation between dates
    • [RadEditor] 15 fixes, including improved cross-browser content generation
    • [RadGrid] 20 fixes, including improvements export formatting and behavior
    • Team blog post
  • RadControls for Silverlight/WPF (2010.2.0812)
    • [RadGridView] TONS of work, including new commands, performance improvements, and visual
    • [RadRichTextBox] TONS of work and refactoring. This release improves greatly on the first Q2 release, but there could be breaking changes. I highly recommend starting with this SP if you’re going to work with RichTextBox!
    • [RadChart] Added option to hide zero-value labels + 14 fixes
    • [RadDataPager] Added new unbound mode support
    • [RadTreeView] Added IsChecked property of type Nullable<Bool> to nodes
    • [RadRibbonBar] Added keyboard navigation
    • [RadMediaPlayer] Added poster frame support + property to disable seeking
    • [RadBook] New support to preload pages
    • [RadTransition] New transition effect: Pixelate
    • Assembly Minifier performance and optimization improvements
    • Team blog post
  • RadControls for WinForms (2010.2.10.806)
    • NEW! Conversion Wizard to help auto-convert obsolete PanelBar, TabStrip, ComboBox, and ListBox controls to the newer, more powerful RadPageView, RadDropDownList, and RadListControl replacements.
    • [RadGridView] Over 25 fixes and improvements
    • [RadListControl] A few breaking changes. See the release notes for details!
    • [RadScheduler] Improved layout behavior and performance
    • Team blog post
  • JustCode (2010.2.826)
    • Auto-update can now check for new “internal” builds
    • Visual aids OnMouseOver can now be disabled, keyboard access added
    • Many Good-Code-Red issues fixed (thanks for reporting scenarios!)
    • Many improvements to JustCode Unit Test Runner
    • Team blog post
  • JustMock (2010.2.810)
    • NEW! Added support for mocking F#
    • ReturnsCollection method moved to Telerik.JustMock.Helpers namespace
    • Many improved mocking scenarios. See release notes for full details.
  • WebUI Test Studio (2010.2.830)
    • Project upgrade wizard (auto backup of project and upgrade to new version)
    • [Silverlight] Improved support for handling pop-ups, tooltips.
    • Improved translators for RadControls for Silverlight and ASP.NET AJAX
    • Many, many improvements across recording, test playback, and Dev/QA Editions. See releases notes for long list of details.
    • Team blog post

Obviously missing from this list are Telerik Reporting and OpenAccess ORM. At present, neither of these tools will be shipping a Q2 2010 SP1 and are instead working hard on big new features for Q3 2010. For updates to these tools, make sure you check the Latest Internal Builds page on Telerik.com (OpenAccess currently has a 2010.2.804 build, and Telerik Reporting a 4.1.10.729 build).

Enjoy the new round of bits and stay tuned for Q3 2010 news! As the hot days of summer start to (hopefully) cool, we march ever closer to the next major Telerik release. Road Maps for Q3 2010 will start going live this week, so keep your RSS readers locked-in to Telerik Watch for more updates.

Download all of the Q2 2010 SP1 Telerik tools

Friday, August 27, 2010

Q2 Extensions for MVC official

mvc-editor And just like that, the Telerik Extensions for ASP.NET MVC Q2 2010 have left beta and are now officially available on Telerik.com! As you know, the Telerik Extensions were released as a beta with the rest of the Q2 2010 bits to ensure that the official release could deliver well-tested new UI extensions- most significantly, a new rich text editor. The extra time has been used extremely efficiently by the product team, and not only do we get polished beta features, we get some new features in the official release:

  • In the new Editor, we’ve added:
    • Font name and size tools
    • Background and foreground color tools (basic)
    • Smart indent
    • Support for custom tools(!)
    • Localization support
  • Support for ASP.NET MVC 3 Preview 1
  • Support for the new Razor syntax

This is a major update for the MVC Extensions and it delivers one of the most unique rich text editors available for ASP.NET (any “flavor”). We hope you enjoy the new bits.

Remember, the Telerik Extensions are still free and open source (GPLv2). We’ll be updating the CodePlex download very soon, too, so that you have the option of grabbing the tools there, if you prefer. We’ll also soon announce our road map plans for Q3 2010. We’ve got some exciting ideas for the final release of 2010 that should make the Telerik Extensions even more useful in a broad range of web applications. For now, download Q2 2010 and keep sending us your feedback.

Updated Telelerik Extension online demos

Baton Rouge SQL Saturday Wrap-up

sql-saturday-br Only a couple weeks late, I want to loop-back and provide a little follow-up on a few events I’ve participated in as August (and summer) wind to an end. On August 14, I hopped over to Baton Rouge to participate in the Baton Rouge SQL Saturday, an all day event that covered SQL and .NET. While the name is a bit misleading, the great Baton Rouge developer community pulled together more than 300 developers to talk SQL and .NET, and from my observation, the .NET sessions were filled to the brim.

I was late to the game joining the Baton Rouge speaker’s line-up, so I delivered two sessions: Building a Testable Data Access Layer and a quick “power talk” about the Telerik Toolbox. Thanks to everyone that joined the sessions! Hopefully you were able to takeaway some useful tips and tricks.

Meanwhile, I also participated in a Microsoft-hosted MSDN webcast covering the Telerik Toolbox for Visual Studio 2010 and TFS 2010. If you missed the live event, an on-demand recording of the event is available directly from Microsoft. It’s a great introduction (or re-introduction for you long-time fans) to what Telerik is doing these days, and it includes three demos that cover a range of Telerik tools (including WebUI Test Studio, the OpenAccess ORM Data Service Wizard, and the Silverlight Telerik Extensions).

Enjoy the archived webcast and stay tuned for more blog updates. After a weeks of events and some down-and-dirty dev work, it’s back to helping you be more productive .NET developers!

Thursday, August 12, 2010

Best Practice: Making OpenAccess projects version independent

When working on any project that references external libraries, it’s important to configure your project references in such a way that “isolates” them from changes to your system. This is especially true if you’re working on a team and sharing code via source control. You want anyone to be able to check-out the project, and regardless of the software installed on their machine, be able to build and run the code. You also want to be free to upgrade your Telerik tools without being forced to upgrade all of your projects.

To achieve this version independence in your projects, follow this advice:

At at minimum, make local copies in your project folder of all referenced assemblies, and then have your projects reference the external libraries from this project relative location. In my solutions, I often create a top-level “Lib” or “Binaries” folder and copy my DLLs there.

project-1

I also create a Solution Folder of the same name in my Visual Studio solution and add these referenced assemblies to source control. By doing that, anyone that checks-out the project has all of the referenced assemblies needed to build.

project-2

This advice so far suggests two things:

  1. DON’T reference external assemblies required to build your project from the GAC (except for perhaps Microsoft framework assemblies)
  2. DON’T reference assemblies located in a directory that’s not included with your solution (such as an Program Files install location)

Breaking with either of the above suggestions will create headaches when sharing code with your team and headaches for you as you upgrade and change your system. It’s rare that you’ll want to upgrade all of your projects to a new version of an external library at one time, so free your projects from the whims of tool upgrades and reference local copies.

For most external libraries, like the RadControls for ASP.NET AJAX or Telerik Extensions, this is enough to achieve version independence for project builds. If you use OpenAccess, you may want to take one additional step.

Since OpenAccess “enhances” assemblies as part of the build process, your builds have a dependency on the OpenAccess enhancer (venhance.exe). To ensure that anyone that checks-out your solution can still complete a build without being forced to install OpenAccess, copy the venhance.exe to your local solution folders.

VEnhance can be found in the OpenAccess install directory in the SDK folder.

Copy this to your “Binaries” folder, and then configure your OpenAccess-enabled projects to use the local copy of VEnhance instead of the version in Program Files (the default behavior). That’s done by editing your Project Settings and adding a Post-build event:

  1. Right-click on your project and select “Properties”
  2. Click on the “Build Events” tab
  3. In the “Post-build event” textbox, enter:
    "$(SolutionDir)\Binaries\VEnhance.exe" "-assembly:$(TargetPath)"
    (include the quotes and adjust the path to VEnhance as necessary)
  4. Change the “Run” drop down to “Always” and save your project settings

project-3

Now your solution is completely version independent! You can install newer versions of OpenAccess ORM or any other Telerik tools and your solutions will continue to build against the configured tool versions. When you’re ready to upgrade, you can simply add the newer assemblies to your “Binaries” folder, update your project references, and then start enjoying the latest Telerik features.

Hopefully this basic advice helps you avoid some of the headaches of working with syncing versions of external tools in your solutions. Followed correctly, you’ll never have to worry about breaking existing projects with new installs of Telerik tools.

Wednesday, August 11, 2010

devLink 2010 Wrap-Up

devlink-2010 This has been a busy summer for speaking and .NET events! After the recent virtual mvcConf and (real) Dallas TechFest, I made my way to Nashville to participate in devLink 2010. If you’re not familiar with devLink, it is one of the largest (and best) community-run conferences in the US. John Kellar and crew put-on a 3-day, multi-track event that rivals the “big shows,” but unlike the big shows, devLink doesn’t cost you a paycheck. This year, devLink returned to the beautiful Lipscomb University campus in Nashville, and the event packed with over 800 paying developers.

I travelled to Nashville to deliver three sessions and participate on an impromptu panel on finding a job (hosted by David Giard or TechnologyAndFriends vidcast). My sessions were for the web developers at devLink, and we packed the rooms standing-room-only:

  • The Rich Standard: Getting Familiar with HTML5
  • Combining WebForms, MVC, and Silverlight
  • Getting the Most Out of What’s New in ASP.NET 4.0

Thanks again to everyone that joined me for the sessions, and big thanks to the person (sorry, didn’t grab your name) that taught that devLink vending machine a lesson for stealing my drink! I had a great time and hope you were able to learn something from the sessions. The code and slides for the sessions is available below for your on-demand learning pleasure.

For now, it’s time to prep and head-off to Baton Rouge for SQL Saturday. See you in Louisiana!

The Rich Standard: Getting Familiar with HTML5
[Slides (PDF)]

Combining WebForms, MVC, and Silverlight
[Slides (PDF)] [Code (Zip)]

Getting the Most Out of What’s New in ASP.NET 4.0
[Slides (PDF)] [Code (Zip)]

Tuesday, August 03, 2010

Dallas TechFest 2010 Wrap-up

dallasTechFest-10 On Friday, I made the quick 3 hour drive from Houston to Dallas to participate in another Dallas TechFest. The Big D’s TechFest is put-on by Microsoft MVP Tim Rayburn and Telerik is a proud sponsor of the event. Unlike many “.NET events,” TechFest truly draws a diverse crowd of developers, with a fair mix of .NET, Java, PHP, Flex, and other “developer flavors” filling the sessions. This year’s event expected more than 400 developers, and I’d say they drew at least that to the University of Texas at Dallas campus.

Building on the popularity of a session originally presented at the Toronto Code Camp, I presented my “Getting Familiar with HTML5” talk to another standing room-only audience. Thanks to everyone that attended, and thanks for the great questions! It was fun to do this session with a group of developers with very diverse backgrounds and focuses.

Updated slides from this session are available below, complete with a resources page filled with related HTML5 links. Your next chance to hear this session live (along with some others) is devLink (this Thursday!), so if you’re curious and want to learn more, find your way to Nashville and be sure to visit my 4:00 PM session.

The Rich Standard: Getting Familiar with HTML5 [Slides PDF]

Using Custom ContentFilters with RadEditor and Telerik Reporting

A scenario popped-up last week that lead to a helpful tip I wanted to share with you. Here’s the scenario:

You are using Telerik Reporting for adding simple Business Intelligence to your ASP.NET applications. You are using RadEditor for ASP.NET AJAX to enable your content creators to input HTML in to your system. The Reporting HtmlTextBox only understands limited HTML tags for “paper oriented” page output, so you need to prevent content creators from adding unsupported HTML to tags that will be displayed in reports.

The first thing to understand is that the HtmlTextBox for Telerik Reporting is primarily concerned with enabling basic text formatting using familiar tags from HTML. It is not designed to render HTML like a browser. If you seek functionality like that, check out RadEditor’s built-in PDF export support.

The easiest way to solve this problem and “force” RadEditor to only accept Telerik Reporting-compatible HTML tags is to use Custom ContentFilters.

A ContentFilter is a simple JavaScript class that extends RadEditor’s functionality and adds processing to RadEditor whenever content is accessed (client-side and server-side). At it’s core, a ContentFilter has two methods: getHtmlContent and getDesignContent. Each receives the current content in the editor and is expected to perform some processing (usually done with RegEx) and return the result.

To target Telerik Reporting, we need a ContentFilter that will remove all HTML tags except those understood by the Reporting export engine (currently: FONT, STRONG, B, EM, I, U, A, OL, UL, LI, DIV, SPAN, P, BR, CENTER). We can do that with some RegEx that looks like this:

<(?!\/?(font|strong|b|em|(i(?!mg))|u|a|ol|ul|li|div|span|p|br|center)(?=>|\s?.*>))\/?.*?>

What’s this RegEx doing? In simple English:

  1. Matching the “<” character literally (start of an HTML tag)
  2. Matching any character except those in our list (list of Reporting-friendly tags) – if we find one of our “allowed” character strings, the tag won’t match our expression (and thus won’t be removed)
  3. Matching any remaining characters within the HTML tag (like attributes)
  4. Matching the closing HTML “>” (with possible “/>” self closing tag)

Using this RegEx, we can create a simple JavaScript file to define our custom ReportingFilter for RadEditor:

ReportingFilter = function()
{
ReportingFilter.initializeBase(this);
this.set_isDom(false);
this.set_enabled(true);
this.set_name("ReportingFilter");
this.set_description("Telerik Reporting HTML filter for RadEditor");
}
ReportingFilter.prototype =
{
getHtmlContent: function (content) {
return this._removeHtmlTags(content);
},

getDesignContent: function (content) {
return this._removeHtmlTags(content);
},

_removeHtmlTags: function (initContent) {
var cleanContent;

//Perform necessary REGEX replacement to remove unsupported HTML tags
//Supported Reporting HTML tags: FONT, STRONG, B, EM, I, U, A, OL, UL, LI, DIV, SPAN, P, BR, CENTER
//HTML must be XHTML valid, too, but Editor already provides that filter

//Following REGEX will remove all HTML tags EXCEPT those expliclitly listed
cleanContent = initContent.replace(new RegExp("<(?!\/?(font|strong|b|em|(i(?!mg))|u|a|ol|ul|li|div|span|p|br|center)(?=>|\s?.*>))\/?.*?>", "ig"), "");

return cleanContent;
}
}
ReportingFilter.registerClass('ReportingFilter', Telerik.Web.UI.Editor.Filter);

With our filter defined, we simply add the JavaScript file to our page and initialize the configuration in the client-side OnClientLoaded event of RadEditor:

<script src="reportingfilter.js" type="text/javascript"></script>
<script type="text/javascript">
function editorLoaded(editor, args)
{
editor.get_filtersManager().add(new ReportingFilter());
}
</script>

And for good measure, we can configure our RadEditor toolbars to “encourage” usage of the allowed, limited HTML tags by removing all other options:

<telerik:RadEditor runat="server" ID="editor1" OnClientLoad="editorLoaded" 
StripFormattingOnPaste="AllExceptNewLines" ContentFilters="DefaultFilters">
<Tools>
<telerik:EditorToolGroup>
<telerik:EditorTool Name="Bold" />
<telerik:EditorTool Name="Italic" />
<telerik:EditorTool Name="Underline" />
<telerik:EditorTool Name="FontSize" />
<telerik:EditorTool Name="ForeColor" />
<telerik:EditorSeparator />
<telerik:EditorTool Name="JustifyLeft" />
<telerik:EditorTool Name="JustifyCenter" />
<telerik:EditorTool Name="JustifyRight" />
<telerik:EditorSeparator />
<telerik:EditorTool Name="InsertOrderedList" />
<telerik:EditorTool Name="InsertUnorderedList" />
<telerik:EditorSeparator />
<telerik:EditorTool Name="InsertLink" />
</telerik:EditorToolGroup>
</Tools>
</telerik:RadEditor>

Result: A RadEditor that will automatically remove any HTML tags that Telerik Reporting’s HtmlTextBox doesn’t like. You can extend this example by adding additional processing to the custom filter to strip away unwanted HTML attributes from allowed tags, but that’s just a matter of finding the necessary RegEx.

Download the code for this example [Requires your own copy of Telerik.Web.UI]

Monday, August 02, 2010

And the final Telerik winner is…

confetti-telerik After a couple of weeks of incredible software giveaways here at Telerik, celebrating both the release of Q2 2010 and the official launch of TeamPulse (and even the upcoming beta of Sitefinity 4), it’s been hard not to feel like it’s Christmas in July if you’re a .NET developer. The giveaways have been so popular that we even exceeded the limits of GoToWebinar (which only holds 1,000 people live at a time)! Still, after all of this, we ran one more contest last week asking you to help us spread the message about all of the new products Telerik is delivering to make .NET developers and teams more productive.

The “Tweet and Win” (or “Facebook and Win,” if you preferred) contest gave you the chance last week to talk about some of the various Telerik products for a chance to win one of three Telerik Ultimate Collections (worth $1999 each) or one of the “super popular” Apple iPads.

Before I announce the winners, let me thank everyone that tweeted and commented on Facebook. We love hear about the Telerik tools helping real people with real projects! Some of my favorite quotes:

  • Sakari Hilama - “ASP.NET AJAX (and the Silverlight controls) are the big time savers and work perfectly in SharePoint 2007/2010. These are the controls that you want to use when developing stuff that needs to work and look good.”
  • Todd Davis - “My company currently standardizes on Telerik controls, because the controls and the customer service are just ‘that good.’”
  • Tony Morehouse - “When reviewing controls to use in my projects, Telerik stood out above the rest. I was initially looking for a reporting solution and Telerik Reporting had the best features and ease of implementation.”
  • Steve Kaschimer - “Loving TeamPulse! Finally a nice solution for Agile Development with .NET and TFS.”
  • Robert Varga - “We've been using Telerik controls for about 2 years and can't imagine development without them, particularly ASP.NET AJAX and Silverlight controls are the best on market for web developers.”
  • Francis Frank - “I feel like 10 programmers in 1 using Telerik.”

And now the randomly selected winners. After compiling hundreds of tweets and comments, the lucky random winners of the Telerik Ultimate Collection are:

  • Craig Morehouse (FB)
  • Huseyin Ulker (FB)
  • @pedrolamas (Twitter)

And the winner of the Apple iPad is: Roger Ward!

Congrats to the winners and thanks again to everyone for joining Telerik for an exciting round of product releases and introductions. There’s plenty more planned for 2010, so enjoy the Telerik Q2 2010 bits and start saving time now to join us for the Q3 2010 release!