May, 2008

SharePoint on Vista

Famous SharePoint features developing company Bamboo Solutions has created installer for Windows SharePoint Services 3.0 SP1 that install WSS3.0 on Windows Vista. The solution allows developers to create SharePoint solutions on their own machines. The need for virtual machine is still there, so don’t hope you can avoid them.

C# and anonymous types

One cool feature of C# 3.0 is support of anonymous types. Let’s suppose we have to create some data structure and we need this structure in one place in one method. This far we had to create a new private class or structure. With anonymous types we don’t have to define new type – we can create it on the run.

C# and var keyword

C# 3.0 introduced us new language feature: type inference using keyword var. Some guys think that var in C# is same thing as var in PHP. That’s wrong – var keyword in C# is totally different thing and it doesn’t mean that C# has now support for type changing class attributes. Let’s prove it.

Behind the Compiler

“What will happen behind compiler?” is my favourite questsion when dealing with technical design and coding. There are many cool and powerful things we can use to be more productive, faster and better. We have automatic properties, extension methods, partial classes, generics and so on. If we don’t know what they are and how these things are handled by compiler we may face serious troubles later.

Pager class

Once I wrote a class to make paging calculations. I had some data bound user controls that had no paging support. So I had to improvise. As it is was pointless to duplicate pager code to every user control where I needed paging I wrote a class to make my life easier.

SharePoint: Assigning values to DateTime fields

SharePoint list items have a tricky way how to assign values to DateTime fields in your code. It is possible to assign value of DateTime type to this field but it also possible to assign a string. This string is a little bit mysterious. You may get errors with one dates but some dates will work perfect. So what’s the trick?

ASP.NET Search Sitemaps – something for SEO

ASP.NET Futures introduced support for search engine sitemaps. This is content detection protocol introduced originally by Google and later accepted also by Microsoft and Yahoo! ASP.NET makes sitemaps generating easy for us and as a bonus their model is perfect for more complex web applications like e-commerce and e-services sites. Let’s see now what we can do.

Extension method for enumerators

Extensions methods are pretty powerful thing because we can extend existing types without inheriting from them. I don’t know developers who want to extend string or int or other basic types offered by .Net Framework.

SharePoint: Half-Initialized Folders

I discovered something weird when trying to detect document library folder by URL. It is possible to create folder objects that are half initialized. I tried to ask folder by URL and I used URL of documents list view. The result – folder with correct name etc but many parameters were missing.