Wednesday, November 18, 2009

@PDC09 – Day 2 - Keynote


These are some very rough notes from the today’s keynote at PDC 09’ . . . .  

Topic : Windows 7

  1. Developing windows 7
  2. developing for windows 7
  3. looking forward

Developing windows 7 : Learning

  • Solving problems + innovation
  • “Engineering 7” dialog
  • Ecosystem readiness
  • Developer pre-beta, beta, RC rhythm
  • Telemetry
    • Send feedback button
    • hardware and device diagnostics
    • reliability analysis component (RAC)
    • software quality monitor (SQM)
    • windows error reporting (WER or “Watson”)

Behind the scenes - “funny video”

  • push pin chairs
  • electric chairs

Telemetry figures (this one was interesting)

  • 514 million times the start menu was clicked (last 6 months)

Developing windows 7 : Research

  • Surveys, market studies
  • Reviews, blogs, commentary
  • Segment engagements
  • follow me home
  • Baseline studies
  • prototype testing, usability testing

Feature explanations and their videos on why they were added : \

  • UAC – Choose when to be notified
  • Windows Management – Tiling, Shake window

Ecosystem Energy – Michael Angiulo

All hardware demos discussing the hardware optimization and enhancements done

Making of a laptop : hardware / software

Announcement - FREE Acer Notebook Laptops with Windows 7 for all attendees !!!!

IE-9 already in progress
- ACID3 (32/100)   IE-8 had (20/100)
- multi system performance (picture)
IE-9 Demo

Windows 7 : Call of Action

  • Integrate with windows 7 desktop
  • develop for 64 bit
  • focus on fundamentals in your code
  • build on new API’s in windows 7

(today – channel9 videos on IE-9)

Scott Guthrie enters in and a huge applaud and woooh from the crowd !!!!

Silverlight 3

  • Sketch flow

Silverlight on 45% of internet PC’s

Announcement : Silverlight 4

Silverlight 4 Beta Download : http://silverlight.net/getstarted/silverlight-4-beta/
Silverlight 4 Training Course : http://channel9.msdn.com/learn/courses/Silverlight4/

Below are the new feature List :

  • Media
    • webcam and microphone
    • multicast streaming (IIS smooth streaming)
      • source of silverlight media player is on codeplex
      • publish media on variety of devices (apple iphone)
    • output protection
    • offline DRM
  • Business applications
    • Printing
    • Rich Text
    • Clipboard Access
    • Right Click
    • Mouse wheel
  • Application development
    • implicit styles
    • drag/drop word files into the rich text editor control
    • bidi & rtl
    • HTML control inside silverlight
    • commanding and MVVM
    • additional controls
    • print preview dialogs
  • Data and Networking
    • share assemblies across SL and .Net 4 with just 1 time compilation
    • Data binding improvements
    • UDP multicast support
    • REST enhancements
    • WCF improvements
    • WCF RIA services
  • VS 2010
    • full WYSIWYG design surface
    • XAML intellisense improvements
    • data binding, layouts, styles

Demo of Silverlight 4 (RIA and databinding) by Scott Hanselman
Snapflow.com demo

  • Beyond the browser (outside browser features)
    • windowing API’s
    • notification popups
    • HTML support
    • Drop Target
    • Running outside sandbox for outside browser application (Trusted applications)
      • Custom window chrome
      • local file system
      • cross-site network
      • keyboard in full screen mode
      • hardware device access
      • COM automation Support (e.g using dynamic keyword in .net 4.0 for office and geolocation API’s)
  • Silverlight 4 Performance
    • Twice as fast
    • 30% faster startup
    • new profiling support

Silverlight SDK for facebook published last week

Reference facebook application would be shipped soon (excellent application demo)

Schedule for Silverlight 4

  • Beta – Now Available
  • RC  -
  • Final  - Mid next year

Kurt Delbene – Office and SharePoint 2010

Microsoft Business Productivity Infrastructure

Announcement – SharePoint2010 Beta available now !!!

SharePoint 2010 Public Beta Download : http://technet.microsoft.com/en-us/evalcenter/ee388573.aspx

Tuesday, November 10, 2009

SharePoint 2010 Developer Training (for FREE)


Another gem coming out of the Channel9 Learning Center Courses is the new ‘SharePoint 2010 Developer’ Course. The course material is presented by Ted Pattison and Andrew Connell themselves which makes it even more interesting.
Currently there are around 37 videos along with the presentation decks being posted on various improvements done in SharePoint 2010 around many areas like :

  • Visual Studio Tools for SharePoint 2010
  • UI Enhancements
  • Lists and Schemas
  • LINQ to SharePoint
  • Client Object Model
  • Workflow
  • Services Architecture
  • Accessing External Data
  • Enterprise Content Management
  • Extending Search
  • PerformancePoint Services
  • Sandboxed Solutions
  • SharePoint 2010 Security

The videos would soon follow by the Hands On Labs, Source Code and other materials for ITPro’s as well, so keep watching the updates on this course . . .

Monday, October 26, 2009

Visual Studio 2010 (Beta 2) – First Look


Here are some screenshots of VS 2010 Beta 2 (Ultimate) and some of the new features coming along with it :

I just liked the new curvy splash screen . . .

splash screen

That is the new ‘Startup’ Page. If you are new to Visual Studio or want to know ‘What’s New’, this page has ton’s of information to get you started and also lots of guidance and resources links for various platforms including Windows, Web, Cloud, Office, SharePoint and Data.

startup 1

image

Here is the Project Templates Screen. A bunch of templates are now included out-of-the-box in VS 2010 including Cloud, SharePoint, Silverlight and off-course the new Visual F# templates for Windows & Silverlight applications

image

Some of the new Explorer’s including the ‘Architecture Explorer’ and other windows – F# Interactive, Performance Explorer, Code Metrics Results 

image

Performance Analysis as well as the much interesting ‘IntelliTrace’ feature. Find out more about IntelliTrace here

image

Performance Analysis Report. . .

image

The ‘Generate Dependency Graph’ feature which generates a DGML document, part of the Architecture Tools in VS 2010

image


Also you can downloaded the Visual Studio 2010 and .NET Framework 4 Training Kit - October Preview which has lots of Presentations & Demos on many of the new features and language enhancements coming up in .NET 4.0

image

image

Wednesday, October 21, 2009

SharePoint2010.Microsoft.com & SharePoint2010 Resources


Since last 2 months Me and my team went through an exciting journey of migrating the existing Sharepoint.Microsoft.com site (which we created a while back) to the upcoming version of SharePoint, i.e SharePoint 2010.

image

When we started the project, the product was hardly in its beta stages. So we had a bit of struggle initially to understand some of the advancements but overall with the excellent support from out college Todd and the MS team we not only understood the product well but also successfully launched the site just before the SharePoint Conference 2009.

There are various materials out now to know more about SharePoint 2010.

Andrew Connell has posted some great articles on his blog explaining some of the new advancements done in the product :

There are bunch of resources including the SharePoint 2010 (Beta) Developer center and other links on the Microsoft SharePoint Team Blog as well as,
Paul Andrew has posted some really good links of a white paper by David Chappell, SharePoint 2010 Developer Platform Post and many other resource links here

We are about to start the Phase II of the project and would be adding cool new features on the 2010 site showcasing some of the new advancements of the product, so stay tuned . . . . . 

Sunday, October 04, 2009

VS2010 & .NET 4.0 Sneaky Features


A must watch features Video from Mr. Guthrie himself on VS2010 & .Net 4.0 

  • Parameter Usage Highlighting
  • RegEx based Intellisense Filtering
  • View Call Hierarchy for Methods
  • Vertical Text Selection
  • Consume First Intellisense Mode
  • Snippets for Markups & JavaScript
  • Debug History
  • .Net 4 (New CLR)
  • Search Project Templates on Online Gallery
  • VS Web Development (Code Optimized) Profile
  • URL Routing in Web Forms
  • IIS SEO Toolkit
  • XML comments in Intellisense within JavaScript file
  • Dynamic named variable Intellisense in JavaScript
  • T4 Template customization in ADO.net Entity Framework
  • LINQDataSource + QueryExtender Control
  • DynamicValidation of data
  • New Markup Syntax for automatically HTML encoding . . <%: Message %>

Lots more in the Video so check it out. . . .

Monday, September 07, 2009

Diving & Exploration


Gems which I found last month :
  1. Scott Hanselman's 2009 Ultimate Developer and Power Users Tool List for Windows
    If you are a MS developer you would know Mr. Hanselman and this popular post series wherein he lists out some of the most powerful tools for windows.
  2. 50 Windows 7 tips, tricks and secrets
    One stop shop of all the cool features of Windows 7.
  3. Cloaking your ASP.NET MVC Web Application on IIS 7
    Here Howard explains the security aspects of a publish facing web application and how we can change the header information of an ASP.net MVC application on a WISA (Windows, Internet Information Services, SQL Server, ASP.NET) Platform
  4. The role of a hands-on software architect
    This is an excellent article from ‘coding the architecture’ community explaining - “What should a hands-on software architect do?” in various aspects of project life cycle.
  5. 10 Things Every Software Architect Should Know
    This is an excerpt from the Richard Monson-Haefel’s 97 Things Every Software Architect Should Know,  where he collaborated with over two dozen authors to collect 97 axioms of software architecture

Friday, September 04, 2009

SOS debugging extension on 64bit Applications


Recently I got into a problem running the SOS on a 64bit Virtual Machine. Visual Studio gave the following message :

---------------------------
Microsoft Visual Studio
---------------------------
Error while trying to run project: Unable to start program '<app path>'.

The debugger does not support debugging managed and native code at the same time on this platform.
---------------------------
OK  
---------------------------

Binging’ around I found that there is a known issue in Visual Studio 2008 Mixed Mode Debugging for 64bit Applications. Since to run the SOS we have to ‘Enable unmanaged code debugging’, hence the issue.
The only way I could make it working with VS 2008 was by changing the Platform Configuration to x86.

Tuesday, September 01, 2009

Spec# - Code Contracts in .Net 4.0


Spec# is a formal language for API contracts (influenced by JML, AsmL, and Eiffel), which extends C# with constructs for non-null types, preconditions, postconditions, and object invariants.”

Code Contracts is a library which provides a language-agnostic way to express coding assumptions in .NET programs and would be included as part of the base class library in .NET 4.0. The contracts can be called as a subset of Spec# and take the form of preconditions, postconditions, and object invariants”

Let’s see how an we leverage code contracts. After installing the code contracts create a new VS Project (I used a console app here) and add the reference to ‘Microsoft.Contracts.dll’, which you would find in ProgramFiles\Microsoft\Contracts\PublicAssemblies\v3.5. Then enable the Static Contract checking in VS (which is the whole purpose of contracts, validating things at compile time rather than runtime). Goto –> Project Properties and you check the options as shown below :

image  

Now lets see some quick examples of precoditions, postconditions and object invariants . . .

Preconditions - What does it expect? As the name suggests, precoditions are contracts to ensure that the expected data is provided while performaing an operation.
e.g. :
image
Postconditions - What does it guarantee? Postconditions are contracts to ensure certain conditions are met just before exiting an operation.
e.g. :
image
Object Invariants - What does it maintain? Object invariants express the conditions under which the object is in a good state.
e.g. :
image
(In the above customer class we have an invariant contract to check that the ID should always be greater than zero, which is being called after each public method calls and validated)
Interface Contracts
Code contracts can also be applied to Interface methods by creating a sealed classes as shown below :

image
There are many other methods in the Contract class which could be used in many other scenarios. Checkout the documentation of this library and Matthew’s blog post for more details.

Sunday, August 16, 2009

Gartner's 2009 Hype Cycle


Last week ‘Gartner’ published its 2009 Hype Cycle report which is by far the Largest to Date With the Expansion of New Topics. Gartner, Inc. has examined the maturity of 1,650 technologies and trends in 79 technology, topic, and industry areas.



No doubt ‘Cloud Computing’ is at the peak of the hype since almost every major players in the industry are talking about it and building their long term strategy around providing cost effective and reliable services over cloud.

It is interesting to see that Surface Computers and 3-D Printing are climbing high while Microblogging and Green IT are slopping down the peak.

Here is the detailed analysis of the report and if you have seen this report first time read these details to better understand the report.

Wednesday, August 12, 2009

First Look at - Silverlight SDK for Bing


Recently I downloaded and tried the ‘Silverlight SDK for Bing’. The SDK includes a very cool application with it, which basically demonstrates some of the new controls from View Control Toolkit and some of the advanced data metaphors shown in the Bing search component. Here is how the application looks :

image
with search results . . .

image

The most interesting stuff that I found in the SDK is the View Control Toolkit, which includes many reusable  controls for Silverlight for overall enhancing the visual metaphors. Below are some screenshots of those views :

  • StackView : This is very similar to a Listbox but the cool thing in StackView is that it has a build in vertical blind-style animation for each item, which fires in sequence as the items are added.
    image
  • TileView : This control also has a cool seek-from-origin style animation for each item, which fire in sequence as the items are added.
    image 
  • CloudView : This view displays the results with dual axis, one being Relevance and other is configurable based on data type. CloudView also provides a simple magnification function so that items can be magnified when clustering occurs
    image 
  • BandCloudView : This view enhances the cloudview by providing a configurable vertical and horizontal axis and an extensible model using flexible data binding and sorting. The difference between CloudView and BandCloudView is that in CloudView, items are arranged free form across a fluid Cartesian surface. In BandCloudView, items are arranged in vertical bands based on granular division. Items in each band are arranged horizontally within each band as if each band were a horizontal list. It also has a cool item animation, which animates the items from the center of the view at data binding time.
    image

The crux of all the animations in all these views is the “MultiView” control which essentially is a stack of MultiView Panel controls which animates panels into views.

The SDK also includes a detailed help on all the components with examples in both C# and VB. So to get started first you would need to create a Bing AppID, then download the Source Code and change the AppID in the SearchEnvironment.cs file - line 105 and get silvery binged  :-). . . . .

Wednesday, July 29, 2009

Managing Azure Storage with ‘Cloud Storage Studio’


Recently I had an opportunity to explore the private beta of ‘Cloud Storage Studio’ by Cerebrata

Cloud Storage Studio is a WPF app which allows you to manage your tables, queues and blob containers for Windows Azure Storage. Although there are limited features right now in the app but I really liked the overall simplicity and ease of use. 

 image

Also there are various configuration settings available which can be applied on all Tables, Queues and Containers like Maximum Tables, Entities, Queues and Blobs per Request, Request Timeout.

The one that I liked the most is the Block Size Settings for Upload/Download Blob Size. This is very important when you are uploading a large chunk of blob data. The CSS would automatically divide a large Blob data in block based on this configuration so that its faster and easier for uploading.

image 

I would definitely recommend everybody to get its private beta from here,  try out yourself and provide your valuable feedback as they are really listening with big ears :-)

Also I had a chat with Gaurav Mantri (owner of Cerebrata) about the upcoming features and vision of CSS and believe me it was super exciting, so please stay tuned and keep your eyes on this . . .  

Thursday, July 23, 2009

“Gestalt” - Writing XAML code inside your HTML


Gestalt is a library released by MIX Online Labs that allows you to write Ruby, Python & XAML code in your (X)HTML pages. It enables you to build richer and more powerful web applications by marrying the benefits of expressive languages, modern compilers, AJAX & RIAs with the write » save » refresh development model of the web.”

My First Thoughts:
· It’s a great entry point for someone to learn and try out XAML (especially for web designers)
· It is not so intuitive for building complete business apps in something like silverlight

Any more thoughts are welcomed  !!!
Cheers . . .

Monday, July 13, 2009

SharePoint 2010 Sneak Peek . . . .


Last 2 weeks were full of excitement, thrill, lots of sleepless nights and several barrels of fluids . . . . all this for :

image

The SharePoint 2010 Sneak Peek site is launched today. The site previews some of the upcoming features in SharePoint 2010. Again a good project completed with an excellent team . . .

Cheers . . . . .

Saturday, June 20, 2009

Opera Unite - Reinventing Web?


Opera Unite : “A new technology that shakes up the old client-server computing model of the Web”.

Opera unite provides the following services:


Here is good post on installing and configuring these services. The only service that I felt interesting was the ‘Web Server’. So I tried it and the first cut really went well. Below is the link of a file hosted on my laptop by unite:
http://home.jomitvaghela.operaunite.com/webserver/content/

My first impression:
While the services being offered are not at all new, the crux here is the ease of sharing this from your own device using a simple browser.


Try it out yourself and share your thoughts. . . . .

Friday, June 19, 2009

Rebuilding Microsoft.com/SharePoint


Since last couple of months I, along with my wonderful team including
Todd, Vivek, Meeta and Ritu had been working with Tony on rebuilding the Microsoft's SharePoint web site.

The web site went live last month :
http://www.microsoft.com/sharepoint . . . .


and now, there is also a 'How we did it' article on MSDN describing goals and technicals details of how we developed all the pieces and fitted it together.

Tuesday, June 02, 2009

Loading .xap files OnDemand using Composite Client Application Guidance (PRISM)


One of the challenges of porting large business applications on silverlight is the size of .xap file. A typical business app would have multiple screens, rich data visualization and lots of user interaction which would in turn increase the overall size of the xap file. Also it would have users with multiple roles and each role would have specific permissions to specific screens. 
So wouldn’t it be nice to divide the entire app into multiple silverlight modules and than load them only when required  ? This is where PRISM can help us . . .

Composite Client Application Guidance (PRISM) provides us a rich framework to divide a silverlight application into various Modules and also load them ‘on demand’. A module can be a separate silverlight app. You can watch Erick’s video for creating the basic structure of a PRISM Project.

The solution structure for our scenario would be a bit different with multiple Silverlight Applications linked to a Single Web App as below :

image

image

Now what we need is a Default View which would be loaded first and than some triggers/events which would load the other on-demand views. 
In our case “DefaultView” is in “MyPortal” app and the “VoterModule” inside MyVoterModule Application would be loaded on-demand when a button is clicked from “DefaultView”.

Next, we need to add our Modules into the ModulesCatalog :

image

ModulesCatalog.xaml

 image

The important thing to note here is that we can create groups of modules and than can specify when do we want to initialize the modules being loaded in that particular group. We can also add modules via code instead of loading it from a xaml file.

Than we need to create some event on the DefaultView which would load the VoterModule. I have created a simple button as under, but we can also add more complex business logic to drive the loading of modules :

image

That’s all we need. The VoterModule would add the appropriate view onto the region and since we have specified to load this “OnDemand” the entire .xap for that application would be loaded when we click on the button.

We can also verify this using Fiddler . . .

Sunday, May 10, 2009

Diving & Exploration


Internet is like a deep ocean with many hidden gems so I just thought to wear my scuba suit and find those gems and share them. This is what I found last month :

Sunday, March 15, 2009

Re-Sizing .VHD Files


While creating a Virtual Disk (.VHD) for Virtual PC we need to allocate a maximum size for both Dynamic and Fixed sized disks. Now once we set this size it’s really difficult to change it. I had a similar issue last week and luckily I happen to find a solution for it which I am going to share here.

Firstly we would need the Vhd Resizer tool from the vmToolkit. This tool would copy sector by sector all the contents of a VHD and create a new VHD with the new size.

vhdresizer

Once the resize is complete the added GB’s/MB’s would be shown as an unallocated partition in the new VHD file. (To view the partitions, start the VPC (with the new VHD) -> Right Click My Computer > Click Manage -> Disk Management)
Now to merge this unallocated partition we need to use a command line utility ‘diskpart’ as follows:

Open command prompt and type diskpart, press enter and you would get this prompt

diskpart

· Type list disk (this would list all the disks)

· Type select disk # (select the disk number in which you want to merge the unallocated partition)

· Type detail disk (this would display all the volumes of the disk)

· Type select volume # (select the volume number in which you want to merge the unallocated partition)

· Finally Type extend (this would merge the unallocated partition on the selected disk & volume)

Open the Disk Management again and you should see the new size of the VHD. We can also use other tools like Partition Magic for merging the unallocated partitions.

Friday, March 06, 2009

How to create context menus and capture right click event in Silverlight


Context menus & right click event is something which is not out of the box supported in silverlight but I think they prove to be very crucial while developing LOB applications. So here is a workaround on how you can create them. Basically I am using HTML/Javascript to create and render menus on top of silverlight but it involves a few tweaks which are listed below.

First tweak is – How to display a HTML Menu on top of silverlight control.
For this we need to change 2 properties on the .aspx or .html page where the silverlight control is being hosted.

      <param name="background" value="transparent" />
  
<param name="windowless" value="true" />


Than capturing the right click event in HTML and displaying our menu.

<
script language="javascript">

  function click(e) {
     if (navigator.appName == 'Microsoft Internet Explorer' && event.button == 2) {

                var menu = document.getElementById('myMenu');
                menu.style.left = event.clientX + 'px';
                menu.style.top = event.clientY + 'px';
                menu.style.visibility = 'visible';
                return false;
            }
            return true;
  }
  document.onmousedown = click

</script>

'myMenu'
is a <div> I have created on the html page which contains a simple table as below:

<
div id="myMenu" style="position: absolute; visibility: hidden; width: 75px">

   <table width="100%" style="background: #000000" cellspacing="1" cellpadding="1">
    
<tr style="background: #FFFFFF">
         <td onclick="SomeFunctionWhichCallsSilverlight()" style="cursor: hand">
             
Edit
        
</td>
    
</tr>
     <tr style="background: #FFFFFF">
         <td onclick="SomeFunctionWhichCallsSilverlight()" style="cursor: hand"> 
              Save

        
</td>
    
</tr>
     <tr style="background: #FFFFFF">
         <td onclick="SomeFunctionWhichCallsSilverlight()" style="cursor: hand"> 
              ________

        
</td>
    
</tr>


     <tr style="background: #FFFFFF">
         <td onclick="SomeFunctionWhichCallsSilverlight()" style="cursor: hand"> 
              Exit

        
</td>
    
</tr>

   </table>


</
div>

The SomeFunctionWhichCallsSilverlight() function would be the interop function to call the relevant Silverlight function as described in my earlier blog.

Now the last thing is to disable the default ‘SilverlightConfiguration’ menu

<body oncontextmenu="return false">


You can download the sample code from here

AddIn