Thank you WordPress, Hello Blogger

December 27, 2008 Simeon Lobo 1 comment

After blogging with WordPress for nearly a year, I have decided to move my blog to Blogger.

As Blogger allows bloggers to customize their blog’s appearance to their individual preference (without having to pay a cent), I have been able to make customisations required to store my code snippets in a wider and more structured template.

To those subscribing to this blog, my apologies but please do visit my new blog at http://simeonlobo.blogspot.com(Atom synication at http://simeonlobo.blogspot.com/feeds/posts/default)

Categories: Technical

SharePoint 2007 “Save Site As Template” Hack

December 4, 2008 Simeon Lobo Leave a comment

This is a little hack that I found quite useful.

In the event that the Save Site As Template option is missing for a sub site under Site Settings -> Look and Feel, then the easiest way to access this functionality is by appending “_layouts/savetmpl.aspx” in the URL for the site.

As an example, if I can access a sub site from the URL:
http://TopLevelCollection/SubSite

Then I can save the template for the sub site by using the URL:
http://TopLevelCollection/SubSite/_layouts/savetmpl.aspx

Categories: Technical Tags: , ,

SharePoint 2007 Forms Based Authentication and Check-Out

December 1, 2008 Simeon Lobo 1 comment

If you ever have had a scenario where you had a SharePoint site working with the Windows Authentication provider and had to turn on Forms Based Authentication, then you may begin to experience issues with checking out documents via Office (Microsoft Word as an example).

It is not a widely documented configuration setting but enabling client side integration will fix the issue of checking out documents (see setting below). Credit for finding the setting goes to my mate, Simon Tyrrell :)

After configuring this setting, the larger authentication issue for MS Office still remains; after checking out the document, Office is not able to authenticate successfully unless persistent cookies are enabled. As you may know persistent cookies are enabled when a user clicks on the “Sign me in automatically” checkbox when they log in to SharePoint and these are stored on the users hard disk until they time out or the user erases them. If the user does not click the “Sign me in automatically” checkbox while logging in, session cookies are used and this essentially means that other than the client browser no other application can read the session cookie. The important takeaway here is that Office applications can only read persistent cookies.  

Though the default timeout for peristent cookies is 30 minutes, the web.config file can be configured to set this to a longer time period. The web.config setting below demonstrates a timeout of 120 minutes or 2 hours. Another important note is that the moment the cookie expires, client side integration stops working and the user is prompted to enter credentials again.

<forms loginUrl=login.aspx name=.ASPXFORMSAUTH timeout=120 />

 

 

To solve the issue, Microsoft have released an unwarranted custom httphandler that converts the Forms-based authentication (FBA) prompt originating from a client-side application (like MS Word; when client integration and FBA are enabled) and translates this to a Basic Authentication prompt. This allows the user to re-authenticate into SharePoint. Click here to download the httphandler. 

 

Client-side Integration Setting (click for larger picture)formsclientsideintegration2

Categories: Technical Tags: , ,

Microsoft TownSquare

November 30, 2008 Simeon Lobo Leave a comment

While browsing the web over the weekend, I happened to stumble across information regarding Microsoft TownSquare (see picture below); a Facebook-type social networking tool built on top of SharePoint 2007 that is being used within Microsoft by about 8000 employees since January 2008.

TownSquare was built by a prototyping group within Microsoft called Office Labs that drives innovation in some Office Products. Bram Paperman, Program Manager for Office Labs in the U.S. mentions that the idea for TownSquare was born out of the SharePoint Team at Microsoft wanting to examine what it would be like to be able to create a social networking news feed within the Enterprise. While SharePoint 2007 does provide RSS feed capability at a site level, there was no way to seamlessly surface new content from multiple sites.

TownSquare allowed Microsoft employees to toggle users in and out of the system; implying the process of aggregation was more focussed. After targeting other users, Microsoft employees could then track targeted user interaction with the SharePoint system - notifications would be sent out the moment a targeted user added or updated content.

I thought this was a really cool idea.   

townsquare

Categories: Analytical, Technical Tags:

C# 4.0 “dynamic” versus “var”

November 26, 2008 Simeon Lobo Leave a comment

The C# language is evolving so fast that it does take effort to keep up with Anders Hejlsberg, C#’s designer at Microsoft :)  

Talking about the next version of C# in this video, Anders describes implementing a runtime operation called “dynamic” that eliminates all type safety for a variable. This essentially means that until the code is run, there is no way to determine if operations on the variable will fail.

There seems to be confusion about dynamic and var, so here is my 2 cents worth:

An example of using “var”:
//While using “var”, the compiler essentially figures out the
//type of the variable using type inferencing
var
a = “G’Day Mate!!!”;

//The below operation can be validated for errors at compile time (as opposed

//to runtime in the case of using “dynamic”)

a = a.ToUpper();


An example of using “dynamic”:
//Sample dynamic instantiation
dynamic<IHuman> dyn = GetObject();

//An attempt to run dynamic code

//Only after we run this code, we will know whether we have errors

dyn.Walk();

 

 

 

Categories: Technical, Theoretical Tags: ,

SharePoint Development Utilities

November 19, 2008 Simeon Lobo Leave a comment
Categories: Technical Tags: , ,

High Availability Theory and the 9’s Measurement

November 19, 2008 Simeon Lobo Leave a comment

High availability is an indicative measure of the “up time” of an application. The moment a host application/service stops servicing requests initiated by users or other application processes, the host application/service is termed to be unavailable and the “down time” clock starts ticking.

While negotiating availability with clients, non-functional requirement documents should clearly highlight the high availability quantifiers; Mean Time Between Failure (MTBF) and Mean Time To Recovery (MTTR).

Mean Time Between Failure (MTBF): Is calculated as (Hours / Failure Count) and is the average length of time the host application/service runs before failing.

Mean Time To Recovery (MTTR): Is calculated as (Repair Hours / Failure Count) and is the average length of time needed to repair and restore the host application/service after a failure.

Therefore, Availability = (MTBF / (MTBF + MTTR)) * 100

A popular way to describe high availability is by using the 9’s measurement: 

  1. Three nines (99.9 percent availability) represents about 8.5 hours of service outage in a single year.
  2. Four nines (99.99 percent), represents about 1 hour of service outage in a year.
  3. Five nines (99.999 percent) represents about 5 minutes of outage per year.

Notes from Microsoft’s “Developer Liberation Day”

November 8, 2008 Simeon Lobo Leave a comment

Microsoft Marketing CollateralI attended “Developer Liberation Day” on the 6th of November in Sydney to watch the 15 billion dollar man, Steve Ballmer, CEO of Microsoft profess his company’s vision for Cloud Computing; the new paradigm that has the software industry agog with excitement. Since the beginning of the year several startups have been formed around the world with executives of large companies (like Microsoft itself) jumping ship to lead these startups in what has been perceived to be the next most lucrative wave of technology.

I believe the day was themed correctly because Windows Azure, Microsoft’s Cloud Computing platform and associated tooling, seamlessly integrated with Visual Studio 2008  was designed to allow the developer total freedom from topological constraints of infrastructure required to host applications.  

I thought Steve was a very motivational speaker and connected almost immediately with the audience. The message was crystal leader – Microsoft’s most valueable and treasured assets were the developers who delivered innovative, next generation solutions based on Microsoft technology. Steve infused excitement in his presentation from the start and by reiterating that software development is going to be the most exciting career in 10 years with a vision of all areas of the home and office having sensitive, multi-touch surfaces that process information seamlessly and respond accordingly.

A second presentation by Gianpaolo Carraro targeted exclusively at a developer audience was not as convincing with the very basic “Hello Cloud” application not working in the first instance. Several audience that I met after the presentation had serious concerns about the reliability and responsiveness of Microsoft’s cloud. My impression was that the technology was still being developed and it was too early to draw conclusions on reliability. As I have a CTP Live Services account to access .NET Services and SQL Services on the cloud, I intend to implement stress test scripts to test cloud reliability over the next few weeks.   

Some notes that I made at the conference (with follow-up material that I later researched) is as listed below. The notes below are not intended to explain the technology, rather, they are meant to describe the salient features of the presentation that may not be so obvious when technical material related to Windows Azure is perused at Azure’s official site.   

  1. Steve Balmer hinted at a possible alliance with Telstra, one of Australia’s larger telecom providers to support bandwidth requirements for cloud computing. This press release of the proposed Microsoft and Telstra alliance was published the same day in the U.S.
  2. Microsoft Bizspark is a programme targeted at helping startups succeed by grants and concessions made by Microsoft around software licenses, support and visibility. Steve Balmer encouraged startups in the Cloud Computing space to seriously consider applying for enrollment into this programme.
  3. Microsoft Dreamspark is a programme by Microsoft that provides students with free professional software to pursue their dreams.  
  4. The most interesting technical artifact I took away from the conference was the Windows Azure Service Bus implementation, where services built behind a corporation’s firewall could be exposed seamlessly via Microsoft’s cloud.
  5. Microsoft boasted that developers could “push” applications to an on-premise environment, a partners datacentre or the MS Cloud directly from Visual Studio 2008 itself. This means that there will exist a single method of deployment henceforth.
  6. The archived web cast of the event could be found at http://www.microsoft.com.au/powertodevelopers/default.aspx

Start of a new era in computing – Microsoft Windows Azure

October 28, 2008 Simeon Lobo Leave a comment

Microsoft has finally announced it’s cloud computing platform at PDC ‘08. I found a very good introduction to the technology on Channel 9 from Manuvir Das, a Director in the Windows Azure team at Microsoft. The link to the video can be found here  http://channel9.msdn.com/posts/Charles/Manuvir-Das-Introducing-Windows-Azure/.

A Software Development Kit and CTP version has also been made available at Windows Azure’s official site at http://www.microsoft.com/azure/default.mspx 

The possibilities of the new platform seem endless and I can’t wait to test Azure’s Service Platform (see below).

Image from Azure's Official Site

Image from Azure's Web Site

Google Chrome’s Architecture – Tab-based Processes and a JavaScript Virtual Machine

October 12, 2008 Simeon Lobo 1 comment

I’ve just installed Google Chrome and was extremely excited when I started digging deeper into the architecture behind Google’s new browser. It appears that Chrome is an earnest attempt by Google to address the modern day needs of a web browser.

I believe it is just so very “c-o-o-l” to allocate the web application rendered in each tab in the browser to a separate application process. Of course, there will be a degree of duplication of global data structures within each spawned process, but the isolation between processes is a much needed feature that modern day browsing demands. Theoretically, I can now be assured when I am browsing two different web sites on two different tabs in Google Chrome, that an asynchronous AJAX request on one tab does not lock up my browser; especially in the event that I may be committing a banking transaction in the next tab. In the Microsoft world, we have the option of hosting a web application in it’s own Application Domain in IIS on the web front end server to isolate it from other hosted web applications. Chrome completes the cycle by now providing isolation at the client-side. From the memory management point of view, the moment you close a tab, memory is deallocated and the process is destroyed. Though I am a strong Microsoft supporter, I must say that IE7 drives me nuts when I have many tabs open simultaneously and IE7’s responsitivity degrades each time I open an additional new tab. 

Google engineers from the V8 team in Denmark who specialize in virtualization technologies, introduced another cool new concept in Chrome called “Hidden Class Transitions” to enable JavaScript to run faster in the browser. The concept, again, was so simple. We know JavaScript is a functional scripting language where you could create objects and add properties seamlessly. The folks in the V8 team wrote a virtualization engine that ensured that each time similar objects in JavaScript shared the same properties and “hidden state”, these objects were classified as belonging to the same hidden class. V8 then compiles the JavaScript directly to machine code that runs directly on the CPU running the browser. This meant no more interpretational JavaScript. The V8 engine also employs “precise garbage collection” which means that Google engineers keep track of all hidden class pointers on the stack. While there are several architectural benefits to this approach, the main one being; V8 can incrementally garbage collect; the garbage collection process only lasting a few milliseconds. As V8 is open source and not coupled to Chrome, other browsers could implement the engine or developers could make use of it for custom implementations or extensions.

The ability to launch an “Incognito” window in Google Chrome is another cool feature that ensures that nothing running in the window is logged to the computer. While no history is stored for processes in this mode, cookies belonging to running sessions are automatically cleared once the browser window is closed.

Categories: Technical, Theoretical Tags: ,