Scripting

Working with URLs in SharePoint 2010 JavaScripts

The SharePoint 2010 user interface relies heavily on JavaScripts, just take a look at the Ribbon which is completely generated by a bunch of JavaScripts. Often customizations of SharePoint also involve JavaScripts. You need it to open modal dialogs, add notifications, create Ribbon Page Components etc. etc.. JavaScript is just one of the programming languages you must know as a SharePoint developer - and you can do amazing stuff with it (just take a look at SPServices by Marc D Anderson).

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).

Internet Explorer

Internet Explorer 8 Beta 1 vs Firefox 3 Beta 4 JavaScript Performance

Mozilla Links has an article about the Firefox ultimate feature - Performance, in which they compare the JavaScript performance on different web browsers. Firefox 3 beta 4 as some really impressive JavaScript performance and outruns Internet Explorer 7 with about 700%. But the article did not test Internet Explorer 8 beta, which I think should have been there (at least for reference). Since the IE8 team claims the performance is so much better, and my feeling after a few days of IE8 usage says so I had to do some testing on my own.

SharePoint

Install script for the SharePoint Application Templates

The Application Templates for Windows SharePoint Services 3.0, also known as the Fab40, is a set of forty different templates that can be used within a SharePoint environment. These templates are good to use as a starter when creating new SharePoint sites or custom solutions and I recommend that you install them into your test or development environment. But the download contains 40 different .wsp and .stp files which has to be installed one at a time; either using STSADM or using the web interface.

.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

Internet and the Web

Snap Preview Anywhere updated

The Snap Preview Anywhere (SPA), as I earlier removed from this site, has been updated with some new functionality to make it better for site owners who don’t want their homepages cluttered with previews or users that do not want to see the previews. As a site owner you can now put up an option for your users to turn on or off the SPA: And there is also an option to have the preview to trigger on an icon instead of the whole link:

.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.

Internet Explorer

New beta of IE Developer Toolbar

The IEBlog announced that the IE Developer Toolbar Beta 3 is available now. It contains some nice updates such as new interface with an icon in the command bar for easy access to the DOM Explorer and finally a great HTML source viewer. Time will also tell if the R-character hijack bug is still left, I have not noticed it yet… Note: You have to uninstall previous betas of the IE Developer Toolbar, otherwise you will have some nice crashes of Internet Explorer when trying to access the toolbar.

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…

WiX

WIX - CustomActions using VBScript

Here are some small tips when using VBScript CustomActions using WIX.Creating a script CustomActionFirst of all you have to create a CustomAction in your WXS file: <CustomAction Id="Id_Of_ScriptAction" BinaryKey="Id_of_binary" VBScriptCall="Script_Name" /> Id_Of_ScriptAction is a unique Id of your CustomActionID_of_binary is the unique Id of the binary that contains the vbs file.Script_Name is the name of the Sub or Function in your vbs file. Creating the VBS fileCreate a .VBS file with a function or sub that should be executed.