Monthly Archives

June 2012

Kendo UI Custom DataSource Filtering

By | JavaScript | 3 Comments

I’ve enjoyed the chance to use Kendo UI over the last few weeks.  The UI Widgets are powerful and save a lot of development time.  And often when I find myself saying, “it would be great if I could. . .” it is already part of the product. Many of the widgets make use of the DataSource component which has a built-in filter method.  This allows you to use operators such as “equal to” or “contains” to filter the data in your DataSource.  One of the less-documented capabilities of the DataSource filter is the ability to do custom filtering. In…

Read More

Using SQL Server Dynamic Management Views to Identify Expensive Queries

By | Uncategorized | No Comments

When you’re trying to diagnose performance problems in SQL Server, what’s the first thing you usually do? For me, it’s usually running a trace in SQL Server Profiler for a while to see what’s happening and get an idea of the most expensive operations that are happening. This time, I decided to try something different and used the Dynamic Management Views instead. These views reflect the inner workings of SQL server, and querying them is like having the ability to query a very complete trace that is continuously running. I’m only just dipping my toes in these waters, but I’ve…

Read More

Using ASP.NET Web API for Sitefinity REST Services

By | Telerik | One Comment

Sitefinity leaves a lot to be desired with the REST services. For example, take a look at the returned data from Sitefinity’s news service out-of-the-box: {    “Context”:[       {          “Key”:”String content”,          “Value”:”String content”       }    ],    “IsGeneric”:true,    “Items”:[       {          “Author”:”String content”,          “AvailableLanguages”:[             “String content”          ],          “CommentsCount”:2147483647,          “DateCreated”:”/Date(928164000000-0400)/”,          “DateModified”:”/Date(928164000000-0400)/”,          “DefaultPageId”:”1627aea5-8e0a-4371-9022-9b504344e724″,          “ExpirationDate”:”/Date(928164000000-0400)/”,          “Id”:”1627aea5-8e0a-4371-9022-9b504344e724″,          “IsDeletable”:true,          “IsEditable”:true,          “ItemsCount”:2147483647,          “LastApprovalTrackingRecord”:{             “DateCreated”:”/Date(928164000000-0400)/”,             “Note”:”String content”,             “Status”:”String content”,             “UIStatus”:”String content”,             “UserName”:”String content”          },          “LifecycleStatus”:{             “ErrorMessage”:”String content”,             “IsAdmin”:true,             “IsLocked”:true,             “IsLockedByMe”:true,             “IsPublished”:true,             “LastModified”:”/Date(928164000000-0400)/”,             “LastModifiedBy”:”String content”,             “LockedByUsername”:”String content”,             “LockedSince”:”/Date(928164000000-0400)/”,             “Message”:”String content”,             “PublicationDate”:”/Date(928164000000-0400)/”,             “SupportsContentLifecycle”:true,             “WorkflowStatus”:”String content”          },          “LiveContentId”:”1627aea5-8e0a-4371-9022-9b504344e724″,          “Owner”:”String content”,          “ParentUrl”:”String content”,          “ProviderName”:”String content”,          “PublicationDate”:”/Date(928164000000-0400)/”,          “Status”:”String content”,          “Title”:”String content”,          “UIStatus”:”String content”,          “Version”:2147483647,          “VersionInfo”:{             “ChangeDescription”:”String content”,…

Read More

Loading Google SketchUp 3D Models into Windows Phone Applications

By | .NET, Mobile | No Comments

In some of my previous WP7 blogs, such as Basic XNA Graphics for the WP7, I go over how to build basic 3D models for your applications. What happens when you want something more complex? You need a good 3D tool to generate those models for you. I started exploring Google SketchUp as a possibility for generating 3D models for the WP7. I found Jim’s Blog on how to load a Google SketchUp model into a XNA game. Jim used the DirectX/XNA Exporter Plugin. So I installed the plugin and started playing around. I thought it would be cool to…

Read More

John Waters to teach Windows Phone Unleashed

By | News | No Comments

On Saturday June 16, John Waters will be teaching the Window Phone Unleashed event in Mountain View, CA. This is an all day, bring your own laptop, instructor led hand on programming day, culminating in a contest with chances of winning a $500 gift card. The event will be at the Hacker Dojo.   Update! Slides can be found here: Power_Point_Slides Congratulations Anushree, proud winner of the event with her UV index app. The app does a reverse lookup of your current location to get the ZIP code, then retrieves the UV index from another web service. That service was…

Read More

Polling AJAX Requests in JavaScript

By | Uncategorized | One Comment

Polling AJAX is tricky. If the next interval triggers before the last AJAX request is complete, your app is doomed!! This creates a domino effect where your queue for requests fill up faster then it can complete. Your queue will NEVER finish… similar to an infinite loop. In light of this, you should never put AJAX into a setInterval function. A clean, more robust option is this: (function poll() {     setTimeout(function () {         $.ajax({             type: ‘POST’,             dataType: ‘json’,             url: ‘http://somewhere.com/rest/123’,             success: function (data) {                 MyNamespace.myFunction(data); //DO ANY PROCESS HERE             },             complete: poll         });     }, 5000); })();   Notice the “complete”…

Read More