Want to Know More About Windows 7?

As you may have noticed, the Windows team at Microsoft have been quiet during the early stages of the design and development process for Windows 7 and there are good reasons behind this decision. You can find out more about the reasoning in the newly created E7 blog:

"Related to disclosure is the idea of how we make sure not to set expectations around the release that end up disappointing you—features that don’t make it, claims that don’t stick, or support we don’t provide. Starting from the first days of developing Windows 7, we have committed as a team to “promise and deliver”. That’s our goal—share with you what we’re going to get done, why we’re doing it, and deliver it with high quality and on time."

The E7 blog is hosted by Jon DeVaan and Steven Sinofsky where they will talk about the project and receive feedback from the community so make sure you subscribe to the E7 blog.

Posted by Mehran Nikoo | with no comments
Filed under:

Visual Studio 2008 SP1, TFS SP1 and .NET Framework 3.5 SP1

As we already know, apart from bug fixes, .NET Framework 3.5 SP1 includes major product enhancements such as ADO.NET Entity Framework, ADO.NET Data Services and enhanced LINQ to SQL (which now supports the new date and FILESTREAM data types in SQL Server 2008). Clearly, this is not an exhaustive list so please refer to the release notes for more information on the new features. It is also good to know that:

  • .NET Framework 3.5 SP1 introduces the concept of a client-only subset of the framework called ".NET Framework Client Profile". The size of the runtime in the Client Profile is only 26.5MB so it is much smaller than the full framework. This allows solutions based on the client components such as WinForms, WPF and VSTO to be deployed much easier. Clearly, when you are developing your application, you need to make sure that you don't use a feature that is not part of the Client Profile. When you install Visual Studio 2008 SP1, it adds a new property to the project settings in Visual Studio that will enforce the Client Profile policy. Enabling this option will prevent you from using the types in those assemblies that are not shipped as part of the Client Profile, which is exactly what you need.
  • The setup package for .NET Framework 3.5 SP1 installs .NET Framework 2.0 SP2 and .NET Framework 3.0 SP2 first, which means you "technically" need to retest your existing .NET 2.0 and .NET 3.0 applications too.

More: Download Links, VS 2008 SP1 and NET 3.5 SP1 Dev Center

SQL Server 2008 RTM

SQL Server 2008 was released to manufacturing earlier today and the MSDN and TechNet subscribers can now download the following editions from the subscribers area:

  • Developer (x86, x64, ia64)
  • Enterprise (x86, x64, ia64)
  • Standard (x86, x64)
  • Web (x86, x64)
  • Workgroup (x86, x64)
Posted by Mehran Nikoo | with no comments
Filed under:

PowerTools for Open XML

One of the namespaces introduced in the .NET Framework 3.0 is System.IO.Packaging (in the WindowsBase assembly), which provides classes that support storage of multiple data objects in a single container, like a ZIP file. These data objects can be referenced in a hierarchical format, similar to the file system. This functionality can be used to open, read and manipulating the files based on the Open XML standard since the Open XML file format follows the same principle. A while back, I wrote a piece of code for a customer to use the classes in this namespace for setting the values for custom properties in Word 2007 documents and Excel 2007 spreadsheets. This wasn't hard but I had to use XPath queries and use the appropriate XML namespaces in order to find the elements I was trying to update.

We then had an initiative to create an SDK that provides strongly-typed part classes for use with the documents based on Open XML. This SDK was available in CTP mode until earlier this week when its first version was released. You can now download the Open XML Format SDK from the Download Center. This SDK relies on the functionality provided by the System.IO.Packaging namespace so it requires .NET Framework 3.0.

The Open XML Format SDK makes the life so much easier for the developers, but wait... we are not finished yet. Right after the release of the Open XML Format SDK, another open source project called "PowerTools for Open XML" was announced, which provides more than 30 PowerShell cmdlets to manipulate the Open XML files. So for example, there are cmdlets for manipulating the watermark, header and footer, style, etc. This means you can read and edit Open XML files on the server-side without using the Office object model and without a need for an Office 2007 license on the server machine. Here is a great screencast that includes some nice demos that show how you can use the PowerTools to go through a list of Word documents, add a watermark to all of them and make sure they all use the same text style. There is also another demo that performs a mail merge using a simple PowerShell script.


Video: PowerTools for Open XML Introduction

I remember that a few years back, I was working on a project where the customer decided to spend a considerable amount of cash on a document generation and rendering solution and the development team had to write a lot of code to populate the templates provided by the third-party solution. The integration and testing experience was quite painful too. It is great to see how the publication of Open XML as a standard and the development of great tools by Microsoft and the open source community has simplified the document generation process and I can clearly see how this will result in reduction of licensing and development costs.

Where is the Configuration Management Application Block?

This is not a new topic but since this question has been asked a few times recently, here is a quick revisit:

Most of the .NET applications use configuration management and that's why the basic support for configuration management has been included in the .NET Framework from the early versions. The configuration management functionality is provided by the classes in the System.Configuration namespace in the System assembly. But the requirements for configuration management usually go beyond the basic functionality provided by these components so one had to write lots of code to meet the application requirements using the out-of-the-box functionality. This is why the patterns and practices team developed the Configuration Management Application Block.

This application block proved to be a very popular one so the .NET Framework team decided to build this functionality into the framework, beginning with the .NET Framework 2.0. As a result, the Configuration Management Application Block was removed from the Enterprise Library 2.0 and some of the helper classes and design-time components were moved to the Enterprise Library Core. Since the other application blocks were relying on the Configuration Management Application Block, they were modified to use the new components in the .NET Framework instead. You can find more information on this subject here.

The new classes providing the configuration management functionality still live in the System.Configuration namespace, but they are compiled into a separate assembly named System.Configuration. So in order to use the new bits, you need to add a reference to System.Configuration.dll.

Posted by Mehran Nikoo | 1 comment(s)
Filed under:

WCF Best Practices

In our conversations with customers and partners, questions related to the design and development best practices are quite common and WCF is not an exception. Some of these questions are very specific to a customer scenario but most of them are generic questions around contract versioning, security, load balancing, etc. There are a number of resources on MSDN and CodePlex that cover these general topis and since I usually send these links to developers in the follow up emails, I think it is a good idea if I put these links in this blog post.

We highly recommend WCF developers to read these best practices in the early stages of the development because some of these practices need to be adopted from the very first version of your application. For example, in order to create Forward-Compatible Data Contracts you need to implement IExtensibleDataObject starting from the first version of the data contract.

So here we go... I will try to keep this list updated as I find other resources and write my own posts on this topic.

Contracts
Data Contract versioning
Service versioning

Clients
Avoiding problems with the "using" statement

Services and Hosting
IIS Hosting
Load balancing
Controlling resource consumption and improving performance

MSMQ bindings
Poison message handling in MSMQ 3.0 (Applicable to Windows XP and Windows Server 2003)
Poison message handling in MSMQ 4.0 (Applicable to Windows Vista and Windows Server 2008)

Security
WCF Security Guidance
Partial trust
Securing PeerChannel applications
Security concerns and useful tips for tracing

Communication
Reliabale Sessions

Deployment
Deploying WCF applications with ClickOnce

Posted by Mehran Nikoo | with no comments
Filed under:

How can I disable WcfSvcHost?

When we create a WCF application using some of the built-in WCF project templates (such as WCF Service Library) in Visual Studio 2008, a project type Guid (3D9AD99F-2412-4246-B90B-4EAA41C64699) is added to the PropertyTypeGuids element in the project file. When we debug a project that has this type Guid, Visual Studio runs WcfSvcHost.exe, which auto-hosts our service for debugging and testing purposes.



This is a useful feature if we want to get our service up and running quickly but we really want to use our own host application at some point so we need to be able to disable this functionality (ideally we should be able to switch it on/off). Nicholas Allen wrote a blog entry showing how to do this manually by editing the project file and removing the type Guid mentioned above. He also referred to an upcoming feature in Visual Studio 2008 SP1, which allows us to toggle this setting using the GUI.

So this is how this feature works in Visual Studio 2008 SP1 Beta. In the project properties window, an additional tab called "WCF Options" is displayed for those projects that have the WCF magic type Guid.



This tab has a checkbox entitled "Start WCF Service Host when debugging another project in the same solution" and this item is checked by default. This means Visual Studio will start WcfSvcHost.exe even if we are debugging another (let's say a console) application we want to use as our service host.





If we uncheck this box, WcfSvcHost.exe will be started only if we choose to debug our WCF Service Library project and it will not run when we debug the console application (which is our service host).

This is great as we don't have to edit the project file manually and we can easily switch this feature on/off.

Posted by Mehran Nikoo | with no comments
Filed under: ,

Ray Ozzie on Software-plus-Services Strategy

I always find Ray Ozzie's memos an interesting read. His most recent memo is about Microsoft's Software-plus-Services strategy where he talks about the guiding principles informing the design and development of Microsoft products for consumers and businesses.

These are my favourite sections from his memo:

The web is first and foremost a mesh of people. Elements of this social mesh will be a first-class attribute of most all software and service experiences, as the "personal" of the PC meets the "inter-personal" of the web. Whether in work, play, or just life, the social element of software will continue to transform the ways that we interact with people with whom we have some affinity. All applications will grow to recognize and utilize the inherent group-forming aspects of their connection to the web, in ways that will become fundamental to our experiences. In scenarios ranging from productivity to media and entertainment, social mesh notions of linking, sharing, ranking and tagging will become as familiar as File, Edit and View.

...

To individuals, the concept of "My Computer" will give way to the concept of a personal mesh of devices – a means by which all of your devices are brought together, managed through the web, as a seamless whole. After identifying a device as being "yours", its configuration and personalization settings, its applications and their own settings, and the data it carries will be seamlessly available and synchronized across your mesh of devices. Whether for media, control or access, scenarios ranging from productivity to media and entertainment will be unified and enhanced by the concept of a device mesh.

...

At the back-end, developers will need to contend with new programming models in the cloud. Whether running on an enterprise grid, or within the true utility computing environment of cloud-based infrastructure, the way a developer will write code, deploy it, debug it, and maintain it will be transformed. The cloud-based environment consists of vast arrays of commodity computers, with storage and the programs themselves being spread across those arrays for scale and redundancy, and loose coupling between the tiers. Independent developers and enterprises alike will move from "scale up" to "scale out" back-end design patterns, embracing this model for its cost, resiliency, flexible capacity, and geo-distribution.

...

Successful experiences on the web are those that are organically compelling, highly engaging, and viral across their intended audience. By applying our three principles consistently across all the markets we serve, we have an opportunity to reshape our offerings for individuals, businesses, and developers, and to deliver a broad range of compelling scenarios.

Posted by Mehran Nikoo | with no comments
Filed under: ,

WPF (70-502), WCF (70-503) and WF (70-504) Exams

As Gerry mentioned in his blog, WPF, WCF and WF exams went live on Monday last week. As you may already know, these are Technical Specialist (TS) level exams so they are added to your MCTS credentials. This is how the MCTS logo looks like when you add the WCF and WF credentials to the logo (I know it is way too wide!):


                      


If you are an existing MCPD (Win, Web or Enterprise) and want to upgrade, you will have to wait as the PRO level exams are not out yet

And by the way, the ADO.NET and ASP.NET exams are both in beta (beta period is extended until 4th May) so if you are interested in taking them use the promotion codes mentioned here.

Posted by Mehran Nikoo | with no comments

OpenXML ISO Standardization

Great news: ISO/IEC DIS 29500 (Office OpenXML) has received the necessary votes for approval as an ISO standard.

This decision was made by the national bodies in the Ballot Resolution Meeting in Geneva during the week 25-29 Feb 2008. In order to be approved as an ISO standard, at least 66% of the votes cast should be positive and no more than 25% of the votes should be negative. By the end of the ballot resolution process (at midnight on Sat 29 Mar 2008), 75% of the votes cast were positive and only 14% of the votes cast were negative so the criteria for approval as an ISO standard have been met.

Posted by Mehran Nikoo | 2 comment(s)
Filed under: ,
More Posts Next page »