Passionate about your results
  About Us      Services      Products    Industries  Partners    Careers    Awards News Contact Us 29

Marlabs Blog

Stay connected with the
worldwide business
Marlabs’ Windows 8 Developer Preview Part 2 Tuesday, November 8, 2011

In the first part of  Marlabs’ Windows 8 Developer Preview  we examined some of the interesting features that Windows 8 offers for end-users. Now let us take a look at what Windows 8 promises for developers.


Features for Developers


Windows 8 comes with WinRT, a new object oriented native/unmanaged API for developing ‘Metro’ applications for Windows. WinRT APIs are expected to replace the Win32 APIs. WinRT projects types using Meta data, and is fully object oriented and you can access WinRT directly from managed languages like C#. Here are a couple of interesting reads about WinRT.


Developing for WinRT


WinRT is going to the ‘the runtime’ for Windows, across multiple devices like PCs, Tablets etc. You can develop Windows Metro style applications on top of WinRT in:


C#/VB.NET and Xaml


Xaml libraries with WinRT are now re-written in C++, and don’t have any .NET dependencies. WinRT XAML is a subset of the earlier XAML libraries that was available with .NET, and doesn’t support some features like DataTriggers etc as of now. Presently, you can access only a subset of the .NET BCL/Runtime from your C#/VB.NET + XAML WinRT application.


This doesn’t even support .NET Client Profile, it is just .NET core profile with access to a minimum set of .NET namespaces, combined with XAML namespaces now in Windows.UI. The entire CLR will be loaded at the time of execution, but you’ll be able to access only a subset of that. As simple as that. This is to ensure that you are running in a sandboxed environment, and CLR comes into play as a thin layer only for binding your calls to WinRT at run time. As WinRT is object oriented and has managed data, you are any way developing directly against WinRT.


C++ and XAML


If you are developing in C++ and XAML, your code will be compiled directly to an unmanaged library. I assume this provides the maximum performance advantage, as your code is directly compiled to native code.


Javascript + HTML5


From Javascript, you can call WinRT methods directly and in that sense it is native. The UI is rendered in HTML5. If your application is a Javascript + HTML5 application, it will be run in a ‘shell’ which uses the same rendering engine in IE10.


You may continue to develop .NET/C#/Silverlight applications for classic desktop scenarios, but if you need to develop Metro applications, then you have to develop against WinRT.


New APIs and Extension Points


Windows 8 Features a number of new APIs and Extension Points. These include:


  • Windows.UI – The Xaml library is now re-written in C#, and is part of WinRT
  • Charms – Apps can share charms, to inter-operate. For example, an “Insert Picture” dialog box can show you results from other applications that can handle the image/picture data type.
  • Direct Compute API -  Enables you to leverage the power of GPU in your applications
  • Sensor Fusion API
  • A Single API for all your sensors like Accelerometer, magnetometer and gyroscope
  • Communication APIs for  Sockets, Streams and all
  • Devices APIs for Geolocation, Sensors, Near Field Communication etc
  • Media Apis for Playback, Capture, Effects
  • Other OS Services – Application services, Threading, Memory Management, Authentication etc.


Windows Live Integration


The whole suite of Windows Live services are neatly integrated to Windows 8.All these Windows Live applications (Mail, Calendar, Photos) are now developed in Javascript/HTML5 and is native. You can connect multiple devices via Windows Live.


Support for Wide Variety of Hardware


The hardware support for Windows 8 seems really awesome. The demos features Windows 8 running on a variety of hardware devices. New and improved features include:


  •  Multi monitor support with start button on all screens
  •  Hyper V Support for client
  • USB 3 Support
  • Hardware acceleration for all applications
  • Malware detection in boot strapper
  • A boot mode called “Cold Boot“ which is super fast




After installing Windows 8, and exploring the same, I should say I’m pretty much convinced that Microsoft has got the equation right. They corrected the Tablet part of the equation, and got the entire “Cloud and all the screens” stack in place, with proper platforms and a nice set of developer tools. And without doubt, Windows 8 tablet devices are going to be a definite competitor for Android and iOS/iPad in the tablet market space.With Windows 8 in its kitty, Microsoft has officially entered the post PC era, and may pose some tough questions for Apple.

Tags: , , , , , , , , ,
Posted by Anoop Madhusudanan | No Comments
Top Seven Coding Standards and Guideline Documents for C#/.NET Developers Wednesday, June 22, 2011

In my last post, I had collated a list of seven must read, free EBooks for .NET Developers, and a number of people found the list to be useful. Encouraged by this, I have put together a similar list of standard guidelines/checklists for .NET /C# developers.

While it may not be a huge stretch in coming up with such a document, the key lies in implementing these standards using internal trainings, peer reviews, check in policies, automated code review tools etc. You can take a look at FxCop and StyleCop for automating the review process, and you can customize the rules based on your requirements.

So here we go. The order is not significant.

1 – IDesign C# Coding Standards

IDesign C# coding standards is a pretty good and compact (27 pages!) coding standards document. It covers naming conventions, best practices, and framework specific guidelines.



The document even has guidelines for project settings, build configuration, versioning etc.

Download IDesign C# Coding Standards

2 – Encodo C# Handbook

Encodo C# handbook is more recent and has 72 pages of guidelines on structure, formatting, and naming. It also has a ‘patterns and best practices’ section, which is a must read for any .NET/C# developer.


You can download the handbook here:

Download Encodo C# Handbook

3 – Microsoft Framework Design Guidelines

MSDN has a section on guidelines for designing class libraries, which covers a set of best practices related to type design, member design etc. You can find it here:

Read the Design Guidelines for Developing Class Libraries

4 – Dennis’ C# Coding Standards Document

Dennis created an initial version of C# coding standards, which was published as the Philips Health Care C# coding standards document (~70 pages). The document categorizes guidelines for areas such as naming, exception handling, control flow etc.

  • Update: The Initial Version I have linked here has now been superseded by the Coding Guidelines for C# 3.0 and C# 4.0. Paul Jansen of Tiobe will update his site soon with the new version. In the meantime, you can download the guidelines and a few companion documents here:

5 – Microsoft’s All-In-One Code Framework Coding Guideline

Microsoft’s All In One Code framework has a coding style guideline document. The Microsoft All-In-One Code Framework is a free, centralized code sample library provided by the Microsoft community team. It has typical code samples for all Microsoft development technologies along with a guideline document on code styles.

Download All In One Code Framework Guideline Document

6 – Brad’s Quick Post on Microsoft Internal Coding Guidelines

Brad had a post on Microsoft Internal coding standards. It is a short post that delves into styling and naming conventions.

Read Microsoft Internal Coding Guidelines Post

7 – Mike’s C# Coding Style Guide

Mike Kruger (Sharpdevelop) has published a 13 page C# Coding Style guide. Again, the focus is on casing, naming conventions, declaration style etc.

Download C# Coding Style Guide

Tags: , , , ,
Posted by Anoop Madhusudanan | No Comments
  Blogger Profiles
  Linked in
  Marlabs on
  Follow us
on Twitter
  Read our Feed