Thursday, January 29, 2009

Disposing SharePoint 2007 and WSS 3.0 Objects


Here is an excellent article by Roger Lamb explaining the various design patterns to be used for disposing various SharePoint and WSS objects before deploying to the production environment.
Some of these may cause serious implications and memory leaks if not addressed correctly. In particular there are 3 objects to be taken care of,  Microsoft.SharePoint.SPSite , Microsoft.SharePoint.SPWeb and Microsoft.SharePoint.Publishing

There are also couple of White Papers by Scott Harris's on MSDN for more details:
Best Practices: Using Disposable Windows SharePoint Services Objects
Best Practices: Common Coding Issues When Using the SharePoint Object Model.

Also recently there is a Tool published on the MSDN Code Gallery which provides assistance in correctly disposing of certain SharePoint objects to help us follow these best practices.

SPDisposeCheck.exe is a command line tool which takes the path to a managed .DLL or .EXE or the path to a directory containing many managed assemblies. It will recursively search for and analyze each managed module attempting to detect coding patterns based on the MDSN article.

Below is the screenshot of the actual output generated which running the spdisposecheck on the sample exe. Reading the command line output is a bit tedious. Although the documentation states that this tools has an -xml option to output the details to an xml file but it doesn't seem to work for me..SpDisposeCheck

Friday, January 23, 2009

Live Mesh Beta & Live Mesh Tech Preview


I just installed the Live Framework SDK and started playing around with the Live Mesh and came up with some interesting things to share.

The first thing to remember is that "Live Mesh Beta" and "Live Mesh CTP" are two different Mesh Environments.

The Live Mesh CTP : https://developer.mesh-ctp.com/ installed from the Live Framework SDK is a developer sandbox environment with limited options and doesn't include the File/Folder Synchronization functionality.  

The Live Mesh Beta : https://www.mesh.com/ is preview environment with full set of options including the File/Folder Synchronization functionality. 

For developing Mesh Applications we have to use the Live Mesh CTP only.

If you have registered for both these services than probably you would have 2 clients installed on your machine :


clients

Initially while signing in for the Live Framework client I got a message box popup saying :

---------------------------------------------------------------------------------
Unable to sign in to Live Mesh.

Please make sure your user name and password are correct.

Request to MOE failed with return code "0x80070005"
---------------------------------------------------------------------------------

Finally I got this resolved by disabling the antivirus software running in the background and now my laptop is "meshified" and ready to mess around inside the sandbox :-)  

mymesh

Monday, January 05, 2009

Bits on 'Cloud Computing' . . . . . !!!


So What is Cloud Computing ?
"Cloud computing is Internet-based ("cloud") development and use of computer technology ("computing"). The cloud is a metaphor for the Internet, based on how it is depicted in computer network diagrams, and is an abstraction for the complex infrastructure it conceals."
Live Services, Live Mesh, Live Platform, Windows Azure, SQL Services, .Net Services . . .
these are some of the titles associated with the cloud offerings from Microsoft.
So where should we start from ?

I would recommend to start with the Live Framework. Here is a brief description of some of the basic concepts of live framework including some of the common application models and different flavors of Live Operating Environments available today. ( What is Live Framework and Why Should I Care? )

( Mike Taulty has written some good posts describing his development experience with Live Framework SDK which might be useful for all. )


The next step could be to explore the Azure Services Platform, which includes .Net Services, SQL Services, SharePoint Services and Live Services as well. 

azureservicesplatform

( Here is a good list of Links and Resources from Sriram Krishnan on Windows Azure. )

AddIn