Thursday, December 17, 2009

Bing for iPhone

I did my last post when I got to know Microsoft is developing Bing and Messenger for iPhone. Today I was lucky to get my hands on Bing for iPhone. If there is something that the word awesome is not enough, I would happily use Masterpiece to describe it. :) Yes “Microsoft Team iPhone” you’ll have done a tremendous job by designing and developing Bing for iPhone. Glance through the pics below, you’ll see how feature rich and eye catching the app is.

First screen of the Bing for iPhone
Filter your search by Web, Images, Movies, Maps, Businesses, News, etc…
Pic below shows how the voice search works.
Setting screen.
Image search results.
Web search results.
Apple.. Microsoft.. you made my day. :)

Tuesday, December 8, 2009

Bing and Messenger iPhone Apps

“If you can’t beat them, join them”
Microsoft is working on two new applications for iPhone. Microsoft Bing and Live Messenger Apps for the revolutionary phone.
Both applications are likely to be released alongside the upcoming Windows Live Wave 4 updates due in approximately March 2010. Last week Microsoft principal group program manager David Raissipour confirmed to Cnet news that "We are actively working on it" when questioned over the Bing iPhone plans.

Friday, December 4, 2009

How the Windows 7 start up animation evolved

Recently I saw this article on how the Windows 7 start up animation evolved and not to forget, the person behind the Windows 7 start up animation, Rolf Ebeling.

image “Having only been with the company for four months and suddenly finding myself working on the first thing millions of people would see when they started up Windows 7 … was a peculiar realization to wake up to each morning,” Ebeling says.


Link to the original article with video.

Monday, November 30, 2009

Knowledge Sharing with Peradeniya Engineering Undergraduates

As for my understanding it’s the most beautiful University in Sri Lanka, the Peradeniya University. Thanks to Microsoft Technology Evangelist Wellington and Dinesh Priyankara (MVP – SQL) I got a chance to host two technical sessions for Engineering students at Peradeniya University.

First session was an Introduction to .NET Framework and Visual Studio IDE hosted by me. Windows Server 2008 and IIS was done by Susantha Silva. Third session which was an Introduction to MS SQL Server was done by Dinesh Priyankara (MVP). Back again the fourth session was a Deep Dive session which was on LINQ (Language Integrated Query) done by me. Wellington hosted a session on Silverlight. Also not to forget, Tharindu Nanayakara explained the importance of communities-Student Champ.

Well, it was a good experience as 99% of the students were from an open source background. But I’m sure they were so impressed seeing the new UI and features of Visual Studio 2010. One thing that worries me is, I didn't have enough time to go through all the wonderful features of VS 2010.

Presentations are available to download…

Some pics of the event after the break.

SNC00106IMG_0249[1] SNC00113SNC00127 SNC00135SNC00114SNC00122

Many thanks to Chanarangana Rathnayake and all who supported to make the session a success.

Tuesday, November 24, 2009

Microsoft SharePoint 2007 Development – SharePoint Object Model

It was in end of year 2007 my good old friend installed Microsoft SharePoint Server 2007 (MOSS 2007) in the company I worked previously. There were two main reasons why we installed it. We were new to the product so yes; we wanted to learn more about SharePoint. Collaboration and document management was key requirements in the project we worked.

But in this article I’m not going to explain about neither what SharePoint is nor its usage. The targeted audience of this article is programmers who are already familiar with SharePoint but wants to learn more about SharePoint Object Model and programmers who are new to SharePoint development.

The well known factor about SharePoint is it’s an application on its own and the less know is it’s a highly customizable application framework. SharePoint is functionally segmented by Windows SharePoint Services (WSS) and Microsoft Office SharePoint Server (MOSS). Technically Windows Server 2003 R2 includes WSS. To add additional enterprise portal functionality such as Excel Services, farm-enabled search, Single Sign-on and Business Data Catalog MOSS can be installed on top of WSS. There are two root namespaces for MOSS and WSS. The Microsoft.Office.Server namespace is the root namespace of all Office Server Objects as well as Microsoft.SharePoint is the root namespace for all WSS objects.

Functional Areas of Object Model
According to the functionality of SharePoint there are different namespaces given to manage and customize SharePoint using Object Model.

List Management
List is more like a Table in a Database. Of all the tasks a SharePoint programmer can do in SharePoint, working with Lists is the mostly common task.
Namespace: Microsoft.SharePoint
Classes: SPList, SPListItem, SPListItemCollection

Document Libraries
This is a special type of list created to store documents. Managing and storing different types of documents, pictures and files will be handled within SharePoint Document Libraries.
Namespace: Microsoft.SharePoint
Classes: SPDocumentLibrary, SPPictureLibrary

Site Collections, Sites, Web Collections and Webs which is obviously bit confusing tough is an area developers should have a clear understanding.
Namespace: Microsoft.SharePoint
Classes: SPSite, SPSiteAdministration, SPSiteCollection, SPWeb

Features and Solutions
With Features and Solutions it’s dramatically easier to customize sites and site collections. Features provide the ability for sites to reuse functionality that exists in other sites without manually copying and pasting XML code from one template to another. Solutions package Features in a cabinet (.cab) file and define important metadata about the included Features.
Namespace: Microsoft.SharePoint, Microsoft.SharePoint.Administration
Classes: SPFeatureDefinition, SPElementDefinition, SPFeatureProperty, SPFeatureScope, SPFeature, SPSolution, SPFeatureReceiver, SPSolutionCollection

Business Data Catalog
BDC is the most recommended way of Integrating Enterprise Data in to SharePoint. ERPs, Different Data sources, your own in house applications, BDC can cater the integration with SharePoint.
Namespace: Microsoft.Office.Server.ApplicationRegistry.Administration
Classes: EntityCollection, ApplicationRegistry

SharePoint has used Meetings to provide collaboration within organizations. Meeting Workspaces provide websites dedicated to supporting and maintaining meetings, meeting information, attendee lists, minutes, meeting-related documents, and much more. (Meting workspace is a web template installed with default SharePoint installation)
Namespace: Microsoft.SharePoint.Meetings
Classes: SPMeeting, MtgUtility

User Profiles
User Profile is used to create, update and manipulate user profiles and profile properties which is way beyond storing basic information of an individual user but which also provide features for community building social networking, etc…
Namespace: Microsoft.Office.Server.UserProfiles
Classes: UserProfile, UserProfileManager

Windows SharePoint Services Server Architecture
In relation to the collections and objects of the Microsoft.SharePoint.Administration namespace the SPFarm object is the top most object in the Object Model hierarchy. Servers and Services properties represent the collections of each. Each SPServer object represents a physical server machine.

SPService object represents a logical service or application installed in the server farm. The SPWebService object provides access to configuration settings for a specific logical service or application. The WebApplications property gets the collection of Web applications that run the service. The SPDatabaseServiceInstance object represents a single instance of a database service running on the server computer. The Databases property gets the collection of content databases used in the service. Each SPWebApplication object represents a load-balanced Web application based in Internet Information Services (IIS). The SPContentDatabase class represents a database that contains user data for a SharePoint Web application. The Sites property gets the collection of site collections for which the content database stores data, and the WebApplication property gets the parent Web application. The SPSiteCollection object represents the collection of site collections within the Web application. The Add method creates a site collection within the collection.

Windows SharePoint Server Site Architecture
The diagram below shows the site architecture in relation to the collections and objects of the Microsoft.SharePoint namespace.

Microsoft.SharePoint.SPSite.OpenWebmethod of the SPSite class returns a specific Web site. Each site collection includes any number of SPWeb objects, and each object has members that can be used to manage a site. Each SPList object has members that are used to manage the list or access items in the list. Each SPField object has members that contain settings for the field and each SPListItem object represents a single row in the list.

Development Environment
Well, when SharePoint development is concerned you can setup the development environment in two different ways, remote and local. Each has its own pros and cons. In this article I’m not discussing how to setup those two development environments rather I’ll show how to cheat by setting up a remote development environment despite debugging and easy testing, to try out your first SharePoint application developed by you.
First tool you need is Microsoft Visual Studio 2005/2008. If you are not a licensed user of Visual Studio please download the Express edition for free from Microsoft site. Setting the development environment remotely is simply a development environment that is not on a SharePoint server.
After setting up Visual Studio, open a new Console Application project. Now let’s get to the cheating part of copying the required assemblies from the SharePoint server to your development machine. Browse to the location:
[drive]:\program files\common files\microsoft shared\web server extensions\12\isapi
Copy the Microsoft.SharePoint.dll assembly (only assembly required for the test application) and add reference to the assembly in your project.

Next the most important thing is to setup the doorway which is to establish the site context. Site context is the link between your code and the SharePoint site collection hierarchy which is represented by SPContext class.

Note: Establishing site context is done differently between Web Parts and console/WinForms/WPF applications.

The SPSite constructor used in the preceding code obtains a reference to the site collection contained at the given url (http://sharepointsvr:4488). You can access the web application to which a given site collection belongs using the WebApplication property, which is of type Microsoft.SharePoint.Administration.SPWebApplication. http://sharepointsvr:4488 is where my SharePoint server is. 4488 is the port number. Change yours accordingly. Given below is the result I see in the console window.
Root collection found at Url http://sharepointsvr:4488 is part of Web Application SharePoint - 4488
Hit F5 and check out the output in the console window. WAIT!! You are on a remote dev machine if you followed me till now. Let’s deploy your application.

Application Deployment
For a Windows or Console SharePoint application there’s no difference than a standard application deployment. Either you can create a Click Once deployment. You can simply copy the application and its dependencies (no need to copy the SharePoint DLLs as it’s already there in the server) in to the SharePoint server and checkout the output.
But if you are developing SharePoint applications commercially make sure to follow a proper development & deployment process covering the QA stage.

SharePoint Object Model is a very powerful application programming interface (API) which gives developers the ability to control virtually every aspect of SharePoint through managed code.

Monday, October 19, 2009

Visual Studio 2010 Beta 2

Of course, this is a happening week for all Microsoft .Net lovers. Today Visual Studio 2010 Beta 2 is available for MSDN subscribers and as Microsoft says it’ll be available for everyone on Wednesday. Visual Studio and MSDN with very unique and beautiful logos. Not to forget the awesome splash screen of Visual Studio.

For more check out Scott Hanselman’s blog.

Happy Programming.. :)

Wednesday, October 14, 2009

Static Analysis with NDepend - Dependency Graph

Last week I was so lucky to get my hands on one of the most awesome software tools I’ve ever worked with. Even though I have worked with some static analysis tool, there were so many times I imagined if I could get some assembly or project analyzed and get it in to a visual diagram, where I could see the dependencies of each class, assembly and namespace. Thanks to Patrick Smacchia a C# MVP, finally my dream came true with the tool NDepend.

“Static analysis, also called static code analysis, is a method of computer program debugging that is done by examining the code without executing the program. The process provides an understanding of the code structure, and can help to ensure that the code adheres to industry standards. The principal advantage of static analysis is the fact that it can reveal errors that do not manifest themselves until a disaster occurs weeks, months or years after release.”

NDepend is a static analyzer. This is how the tool is introduced in the official site NDepend is a tool that simplifies managing a complex .NET code base. Architects and developers can analyze code structure, specify design rules, plan massive refactoring, do effective code reviews and master evolution by comparing different versions of the code. The result is better communication, improved quality, easier maintenance and faster development.

Do I need say more… Let’s get in to action…

How easy it is to understand the underlying architecture of a particular assembly or a project specially which is compiled or deployed. Actually past few days I was bit busy working and writing about SharePoint Object Model. So I’ll take the assembly Microsoft.SharePoint.dll for the analysis process.

Opening the VisualNDepend.exe will open the Start Page of NDepend where you get easy access to recent projects (with new projects), Getting Started Guide and Visual Studio and Reflector Add-Ins as shown below.

Click File > Select .Net assemblies to Analyze will open a window where you can browse any assembly you need or it’s just a matter of very common drag and drop method from windows explorer.

As I mentioned earlier I’ll browse and select the assembly Microsoft.SharePoint.dll for the analysis process. Magic begins… Give few seconds/minutes and given below is what you will see. Just to my idea this product is super fast as for the information it analyzes. Specially the multi threading :)

Basically I'm trying to get the transitive closure of WorkflowRuntime. Transitive closure is a powerful mean to deconstruct software because it shows how the code is really layered.

Okay.. the result shown below.

I could have chosen the transitive closure made of methods, types or assemblies too. You can see a Query suggested by NDepend (more like a T-SQL Query) which is a Code Query Language (CQL) Query.
Let's see these namespaces mapped to a graph.

Below given is the result... which is the 1st reason that made me fall in love with this awesome product.

Let's say I wanna see the assemblies which are using the System.Workflow.Runtime on a graph. It has never been easier than this. Select the assembly name, right click and select "Who is using me on graph" as in the below screen.
This is only a single feature of NDepend which is the Dependency Graph. Next.. tune-in for the Dependency Matrix. If you want to see the features on one go, here it is.

Wednesday, September 9, 2009

Patterns & Practices - Developing SharePoint Applications

Microsoft Patterns & Practices group released the updated version of the “Developing SharePoint Applications” basically the final release with tons of articles, code samples and videos helping people to develop LOB applications in/on SharePoint.

Visit HERE.

Saturday, September 5, 2009

Code Camp

Code Camp!! A Code Camp is bit of a new word for the Sri Lankan tech community. But as the Sri Lankan .Net Forum we are proud to announce the 1st Code Camp held in Sri Lanka. It was on 6th August 2009 at Excel World.

The event went very well, there were 7 tables hosted by MVPs and techies from the .Net community. Just to name them Joy Pradeep - SharePoint, Jinath Premarathne – ASP.Net, Prabath Fonseka – Patterns and Practices, Dinesh Asanka – MS SQL, Chanaka Gamage – Windows Workflow Foundation, Chandana Athauda - Azure and Uditha Bandara – Windows Presentation Foundation.

5th Anniversary of the .Net Forum Sri Lanka

I know I’m late on the below post and the one to come next. But it’s better to be late than never.

24th July 2009 was a remarkable day for the Sri Lankan .net forum community. It was the fifth anniversary of the .Net forum. It started with a nice “a look back” video from Wellington. First session on “What’s new in Visual Studio 2010” was carried by Joy. “What’s new in .Net Framework 4.0”, the second session was conducted by me. Third session “MVC” was hosted by Fikri.

It was nice to see the auditorium on 3rd floor was filled with the members of the forum. This wasn’t an end of a journey but another promising step towards a long way ahead and a look back of the successful journey we have come.

Thanks Wela for the beautiful pic.

Friday, August 14, 2009

SharePoint Workspace 2010

I wanted to start a blog series about the next version of SharePoint, SharePoint 2010. But with the superb new features of this awesome product, I was quite lost where to start from. So I thought of starting with the new features and the major changes.

SharePoint Workspace 2010

SharePoint Workspace 2010 is the offline, desktop client for SharePoint enabling people to collaborate and contribute to SharePoint sites even with they're not connected. Actually it’s the next version of Microsoft Groove.
As Microsoft claims, Groove to SharePoint is like Outlook to Exchange. So basically it’s an offline client. Users will be able to work offline with the SharePoint contents and when online SharePoint Workspace will reflect any changes made within the client immediately in the SharePoint site. If SharePoint Workspace detects the user is offline and thus disconnected from the SharePoint site, it will cache any changes and automatically synchronize the changes once the user is online and can connect to the SharePoint site again. Even though it’s the next version of Groove, it’s not the same product with a new name.

Tuesday, June 16, 2009

Is Google really worried about Bing?

This is something I still cannot believe. I believe Microsoft is a great company which has some solid products. I know that because I work with many of those products. But will you ever believe that one of Microsoft’s recent product releases made Google’s Sergey Brin and Larry Page think twice. Microsoft released their new decision engine which is more than a typical search engine. Sergey Brin is concerned enough losing their market share to Bing. He has put together a team of top engineers [Yes, TOP ENGINEERS… cool…], to begin making vast improvements to the web service starting immediately. Brin is heading the team, and the project they will be working on is trying to determine how Bing's search algorithm is different from Google. Wow what will be the end result?

I know new search engines have come and gone in the past 10 years, but did Sergey or Larry ever concerned about those, I don’t think so. But Bing, Microsoft you really did something to keep Google open their eyes. That begins the competition.

Bing is powered with a 100 million budget just for advertising. Also it is said to be rare that the Google founders join on the daily operations of the company, so having one of them back leading a team there must be quite significant. The real search engine war has started!!

[Image courtesy of the NY Times]

Tuesday, June 9, 2009

VSTS 2010 First Look

I’m amazed to see the UI of the next version of Visual Studio, VSTS 2010. It looks sooo cool as it’s developed on WPF (Windows Presentation Foundation). According to the Program Manager responsible for the Start Page in the Visual Studio Adrian Collier, we can create custom start pages. Below I’ve uploaded screen shots of the default start page.

WPF has been criticised for being resource-hungry, lacking some standard control elements and inadequate designer support in Visual Studio. Come on… can a newborn run? WPF celebrated its 1st Birthday sometime back. Now it can talk, laugh and walk. I guess VSTS 2010 is the first enterprise application running on WPF “tasting my own dog food”. I’m really proud of you WPF.

If interested creating your own start page, check out this URL.

Sunday, June 7, 2009

Design Patterns in .NET Framework

First of all I would like to thank all who participated for Sri Lanka .NET Forum June 4th Session and to make it a success. Also my special thanks go to Wellinton and Jinath who gave me this opportunity.

Time to apologies, I’m extremely sorry for getting delayed [3 days] to upload the presentation. Presentation is uploaded here in PDF format [PDF reader required].

Please do not think twice in putting your comments about the session… all kinds of comments are welcome.

Saturday, May 30, 2009

Silverlight 3 on 10th July

Another cool product from Microsoft I like to work is Silverlight. Microsoft is planning to launch Silverlight 3 and its Expression Studio 3 designer tools on 10th July 2009.

Silverlight 3 introduces more than 50 new features, including 3D support, GPU acceleration, H.264 video support and out-of-the-browser capabilities to Silverlight. The out-of-browser support will enable developers to build applications that work like Adobe's AIR plugin. Dramatic video performance and quality improvements are also expected.

Friday, May 29, 2009

Bing a potential Google Killer

I’ve seen few Google killers recently. Among them are live, cuil, wolframalpha [though they say it’s not]. Microsoft Bing seems to be the next Google killer actually a potential Google killer (still I didn’t get a chance to check it out). Microsoft position itself as “decision engine”. Users can easily filter the results with simple clicks. Microsoft decided to “kill” Live Search and start a new brand: Bing.

“I bing the web” sounds cuil [cool] than “I live the web” :D
Check out the full video demo here.

Source: winandmac