Visual Studio

Minifying custom JavaScript files in SharePoint 2010

As you know the usage of JavaScript has been more and more used in web applications over the past years for technologies such as AJAX. JavaScript can accomplish really cool stuff on the client side and make the user interface more interactive and responsive. Just take a look at SharePoint 2010 - that’s some heavy JavaScripts there (a bit to heavy IMHO). So lets assume that you are building some new cool stuff, in SharePoint of course, and why not a Page Component for a contextual Web Part. That’s a lot of JavaScript (apart from the server side XML chunks)! So now you are making your web page payload even heavier. This is when minifying comes in. Minifying is a way to minimize the payload of a resource such as removing unnecessary comments and whitespace, shortening function and variable names etc - all to make the payload as small as possible. The only problem with these minified scripts are that they are virtually impossible to debug (and believe me if you are building a Page Component for SharePoint - you need to debug).

.NET

A Cheat sheet of Cheat sheets

Here is a list of cheat sheets for the Windows and .NET platform that I frequently use and I think are of great interest. Visual Studio 2005 Keyboard Shortcut References Visual C# 2005 - PDF grayscale | PDF color Visual C++ 2005 - PDF grayscale | PDF color Visual Basic 2005 - PDF grayscale | PDF color SharePoint and Office stuff CSS Reference Chart for SharePoint 2007 (Microsoft Office SharePoint Server 2007 and Windows SharePoint Services v3) CSS Reference Chart for SharePoint 2003 New Office 2007 User Interface - Word | PDF Web and ASP.NET stuff Microsoft AJAX ClientScript Cheat Sheet - ZIP JavaScript Cheat Sheet - PNG | PDF Other stuff

.NET

ASP.NET AJAX 1.0 Released

Finally ASP.NET AJAX 1.0, known as Atlas, is released in a fully supported version. The Download is available at http://ajax.asp.net. Here’s a summary from Scott’s blog: The ASP.NET AJAX 1.0, which is available for free with full Microsoft support, can be extended with the ASP.NET AJAX Control Toolkit - a set of more than 30 controls for ASP.NET. Microsoft also releases the client-side ASP.NET AJAX JavaScript library under the Microsoft Permissive License (Ms-PL) which allows you to modify the library and the server-side code is released under Microsoft Reference License (Ms-RL) so your debugging will be easier.

XML

JSON vs XML - final debate?

We have been doing a lot of work, on our product, with dynamic updates of web pages - you know the AJAX stuff. Most of the server side results are returned as XML and are delivered from different Web Services. Since I really like optimizations and like good and nice looking code I have been going back and forth in decision of how to return data to the client; XML or JSON. JSON are in some cases more effective but when the object model it tries to represent gets more complex you neither get nice looking code nor saves that much bytes.

Scripting

JavaScript closures

Ever wondered what JavaScript closures are? Morris Johns has put togehter a nice introduction to the mysterious closures - JavaScript closures for dummies. Make sure to read it before you do any more JavaScripting. Understanding JavaScript closures will make your JS programming more efficient and you can avoid the dreaded memory leaks in Internet Explorer especially when making home brewed Ajax applications. And of course learning this stuff is fun for us developers…

SharePoint

Public release of Windows Live Gadgets SDK

Microsoft has release the first public release of the Windows Live Gadgets SDK, you can find it MicrosoftGadgets.com. You can also find the Gadgets Development Overview for Microsoft Sidebar for Windows Vista Beta 2 on the site. Developing Gadgets for both live.com and Microsoft Sidebar will be really easy and fun. But I see a problem with only having live.com as the only web-based Gadget host (host meaning where the Gadget can execute). I would like to see an implementation in either Microsoft SharePoint Services or as a standalone product, so you can host Gadgets in an Intranet scenario. There are some examples on how to host your own Gadgets; for example Donovan West has an example using an iframe solution. The problem is still that the Gadgets are hosted externally which is not that great if you think about security issues.