Friday, November 20, 2009

How to share files in Sun Virtual Box ?

Shared folders allow you to access files of your host system from within the guest system, much like ordinary shares on Windows networks Sharing folders in Microsoft virtual PC is much simpler than in virtual Box. Just adding the shared folder will add a new mapped icon in "my computer" to provide access to host files

This is not the case in Virtual box, sharing is accomplished using a special service on the host and a file system driver for the guest, both of which are provided by VirtualBox.To share a host folder with a virtual machine in Virtual Box, you must specify the path of that folder and choose for it a "share name" that the guest can use to access it.

After this step I'm expecting a new drive in "My Computer" as a typical Microsoft Virtual PC user. But there is no new drive. After digging into the help files, Virtual Box requires a explicit "net use" command to mount that shared drive.

net use x: \\vboxsvr\sharename


vboxsvr is a fixed name(might be helper service which runs on the guest along with Guest additions), "sharename" is the alias name which is provided while mapping the host drive

Virtual machine guest additions installation is a pre-requisite for folder sharing

Monday, November 16, 2009

Where is Windows Server 2008 SP1 ?

While preparing a Windows server 2008 virtual machine and as usual I was just looking up Microsoft.com for patching my newly installed operating system(to get the bug fixes).

Interestingly I was not able to find Windows Server 2008 SP1, there is only SP2 available and came to know that the initial OS installation includes the SP1.

FAQ Section of Windows Server 2008 SP1 clarifies the doubt,Following text taken from the FAQ

Are there any prerequisites for SP2?

You must have Windows Vista with SP1 or Windows Server 2008 installed on your computer before installing Service Pack 2. (Windows Server 2008 shipped with Service Pack 1 included.)

Screen shot after the clean installation of Windows server 2008



SharePoint server 2010 preparation

As SharePoint server runs only on 64 bit platform, all working virtual machines becomes useless and need to start with a clean slate. It's time to build a new virtual machine but unfortunately our Microsoft Virtual PC cannot be able to run 64 bit machine within.

SharePoint server 2010 can be installed on Vista/Windows 7/ Windows 2008 Server Operating systems. So it's a clear message from Microsoft that Virtual PC will not be upgraded to support 64 bit instances. Either run SharePoint on your desktop or go for third party virtualization solutions such as Vmware or Sun Virtual box. As the later is a free offer from Sun Micro, I prefer to go with Virtual box.

Prior to that you need to check whether you lap/desk top supports 64 bit virtualization. Use VMware 64 bit Compatibility checking tool and find out whether your hardware supports 64 bit virtualization. Use this processor check guide from Vmware for supported micro processors.

At last Sun virtual Box rocked by hosting the 64 bit guest on a 32 bit Vista box


It's time to learn new things right now which are integrated right into the heart of SharePoint 2010 till I get the CTP edition from MSDN.

Things are which are new in SharePoint 2010
  • PowerShell - an ultimate scripting engine which will surely replace the STSADM management console from administrators
  • Jquery - A lightweight javascript library which comes with OOB product
  • SilverLight - Version 3.0 looks much solid with its new controls and RIA services
  • Windows Communication foundation - Guy who replaces the SSP in MOSS
  • Visual Studio 2010 - Recommended IDE for SharePoint server 2010 which comes with tight integration like F5 execution and much better project templates than VseWss extensions. Still I need to explore more

Monday, October 12, 2009

C# vs Objective C

Got a chance to mess with Objective C and Cocoa framework. Following are some typical thoughts when comparing with C# and .NET framework

• In Objective C keyword "self" is used instead of "this" of C#
• Memory allocation happens through "alloc", there is no "New" keyword in Objective C
• There is no Garbage Collector to collect objects out of scope, proper release/disposal of resources is essential in Objective C.
• Header files are imported instead of include (i.e #import statements are used instead of traditional #include statements)
• The spec of a class is divided in two parts interface and implementation, interface portion contains declaration class, variables and related methods. This interface normally lives in .h files
• Implementation portion has the actual code for the methods declared in interfaces. This implementation normally stays in .m files. So all classes are like an C# interface and its implementation, declaration and actual code is segregated.
• A class declaration starts with @interface compiler directive and ends with @end directive.
• Object references are pointers. Objective C supports both strongly typing and weak typing. Strong typing always happen with pointer declaration
• There are two types of methods, Instance methods & Class methods, Instance methods require an instance of the class to initiate the call and Class methods are much similar to Static methods in C#
• An instance method is marked with the dash(-) as prefix before the return type and signature of the method.for e.g, -(void)Insertsome:id(anobject)
• An Class method is marked with the plus(+) as prefix before the return type and signature of the method.for e.g, +(void)Insertsome:id(anobject)
• NULL in C# becomes nil in Obj C
• Calling a method is known as messaging,a message is the method signature and its parameters. All messages are enclosed in square brackets [ and ]
• A property declaration starts with @property directive followed by data type and property name.( Eg:- @property BOOL flag;)
• @synthesize compiler directive is used to instruct the compiler to generate methods according to the specification in the declaration
• C# Interfaces are called as Protocols in Objective C
• .XIB files are used to store UI related settings, i.e., if we design a form using the IDE that will be stored as a xib file. In Apple world people still use the legacy name .nib file(that is the legacy name still in use)
• In Objective C a solution is called as a Bundle.

Wednesday, September 23, 2009

First look at Google Chrome's Frame

Are you willing to use Google chrome you don't have privileges to install the new browser. There might be the IT department which may block installing new applications. You might be a SharePoint guy using IE heavily for development related works and also using Google apps like Gmail, Google reader etc for personal things Are you one of them. Google comes up with Chrome Frame

There's a way to leverage Chrome's state-of-the art rendering engine within Internet explorer without installing Google Chrome. Again Google leverages the existing capability to give more comfort to its users just like what happened for XmlHttp object.

Google developed a IE plugin/addon to replace Microsoft's traditional Trident layout engine with Chrome's layout engine based upon Webkit. You can call this Chrome layout by adding the prefix of cf: before any url. For eg:- Google home page will be cf:http://www.google.co.in/

So as a web developer do you want to use the feature of Chrome which is not present in IE(for eg Canvas tags). You just need to add the following meta tag to you code

<meta http-equiv="X-UA-Compatible" content="chrome=1">

Google provides a Javascript code snippet to detect whether Chrome frame exists or not,if not then it will prompt the users to install the plugin

Google's Search home page in Frame

Google Frame's About page


This Frame project is still in its early stages so expect some buggy things too. Let's see how Microsoft handles this plugin in future.

Thursday, September 17, 2009

How to find the site template used on a Site ?

Some times I stumble upon some heavily modified sites to find out the site template(Team site/Blank site etc) used for provisioning that instance. That's quite easy using the object model but I wondered is it possible through some out-of-the box tool or UI's

Recently came across the WSS RPC methods It has a function called GetProjSchema which does this magic

Authenticate with the web application

Remove all strings after the site name from the address bar and append the following string

/_vti_bin/owssvr.dll?Cmd=GetProjSchema

So if you have application as Foo and it has a site called PWA then the URL might be looking like this

http://Foo/PWA/_vti_bin/owssvr.dll?Cmd=GetProjSchema

GetProjSchema requests the CAML Schema for a Web site, this is a blend of ONET.XML for that specific site definition and some resources which are related to that provisioned site instance. This CAML schema is cached in IIS, so we've retrieved this cached version to find out the site template

This gives more details than required but we are now interested in the site template used, look at the first line "Project Title=". This is the current site template being used

A sample screen snap


Anything which comes OOTB capable of solving real world problems is good. Exploit the rendered CAML . .. .