Windows 8 Dev Stack–My take on it

With the BUILD conference just completed where Microsoft showed off a huge number of new features in it’s upcoming Windows 8 OS, the major questions revolving around the developer story was about the relationships between the different components to create apps for it. “Is .NET/SilverLight dead?”, “Do we create only HTML5/CSS/JS apps now” etc. were the ones that everyone had. However, while the conference cleared up a lot of things, it still kept the discussions going.

Here’s my take on the Windows 8 Developer Stack. This was created after a lot of discussion with very knowledgeable and bright people – my fellow RDs. Any omissions or errors are mine.

win8 Dev Stack

Let’s dissect this image for a better understanding.

First and foremost, there are now going to be two “types” of apps – the traditional Desktop apps – everything that you’ve seen and worked with in Windows till now, and the new “Metro” apps. The Metro apps run on the new touch screen paradigm and use a whole new stack for development.

The traditional stack remains more or less the same – you can create native Windows (forms) apps with C++ and Win32. Or you can use .NET (now in a new 4.5 flavor) with WinForms or XAML as front-end and C#/VB/C++ as the language. For better compatibility with future versions of Windows, it seems sticking to the XAML path would be more beneficial.

The new “Metro style” apps is where all the enhanced stuff sits. You can create Metro apps using a combination of HTML5/CSS + JavaScript OR XAML + C#/VB/C++. Note that the XAML used for Metro (which I term as M-XAML above), while syntactically identical to the Desktop XAML, has other enhancements and changes tailored for Metro specifically.

The other main change is that the C#/VB/C++ code runs not on ".NET per se, but again a syntactically identical, but Metro enhanced runtime called WinRT. This is a new base API that does not replace Win32 API completely (as yet) but provides services (in the form of services and APIs) that can be used by Metro style apps. WinRT can still call and use subsets of .NET and Win32 as and when needed. I assume that in the future .NET will embed completely into WinRT and Win32 will be replaced by this new stack.

What does this mean for developers? Well, if you are on .NET today, you can simply start learning the new WinRT using the M-XAML/C#/VB route and start creating Metro apps. If you are a HTML/CSS/JS developer, ramp up on HTML5/CSS3 and the JavaScript extensions and frameworks available as well as the WinRT code. If you want to build an application that would run both on Windows 7 and Windows 8 you can create it with XAML and then for Windows 8 also provide a M-XAML frontend. We will of course need to see how all of this comes together as we start getting more information out of Microsoft.

Windows 8 looks really nice and brings in a new way of interacting with your apps and devices Make sure you get on board right now.


Tags: , , ,
Categories: Development | Windows 8

30 Comments
Actions: E-mail | Permalink | Comment RSSRSS comment feed

Windows Phone 7–India Readiness Workshops

With the Windows Phone 7 launch just completing in the US and most of the world, including Europe and parts of Asia getting ready to receive the WP7 handsets this or the next month, it’s only natural that lots of us in India are also waiting for them.

Unfortunately, there is going to be a delay before the handsets are available to purchase in India. This is expected to happen hopefully in the first quarter of 2011. Till then you will need to just read the rave reviews for the phone all over.

But here’s the good news. I’ve been working with the WP7 team here in India and Microsoft India has graciously offered to lend handsets for testing existing applications developed locally during a workshop. We are planning to conduct 1 or more workshops in cities in India for WP7 application development and testing.

The workshop will be for 2 days consisting of a few development sessions and hands on where you can test apps you have developed on real handsets rather than the emulator.You can work with us to figure out issues in your apps and optimize them for submission to the Marketplace. Not only that every participant will also get a bunch of goodies – one of which I can’t describe here but is potentially a great gift for getting visibility for your app.

If you are an individual or part of a company developing an app for Windows Phone 7, please contact me with the following details via email (through the Contact me link above) or via twitter (@vinodunny). Please do note that we are looking for apps that are well into development and for submission into the Marketplace and are not demos or samples that you’ve built for learning WP7 development. You can of course submit more than one app.

These are the details I’ll need:

Your Name:
Company Name:
WP7 Application Name:
Application Description:
State of Readiness:
City:
Contact Info (email, phone, twitter, etc.):

We’ll be collating this information and sending out invites for workshops that we conduct in your city. Please note that the seats are limited in each city (which are still in planning stage), so please do reply to me quickly.

Looking forward to seeing you at the workshop soon.


Tags: ,
Categories: Development | Gadgets | Windows Phone

17 Comments
Actions: E-mail | Permalink | Comment RSSRSS comment feed

Application Page Ribbon & Dialogs on SharePoint 2010

One of the cool new features in SharePoint 2010 is the availability of the Office Ribbon. Using the simple XML syntax, it is quite easy to add your own Ribbon controls and tabs to existing lists, libraries, and even your own web parts. You can even add contextual ribbon tabs to web parts hosted in your own custom Application Pages.

Now it’s easy to get a “global” Ribbon by simply omitting the RegistrationId and RegistrationType attributes in the Elements.xml file. You’ll find ways of doing this in tons of blog posts all over. What is not so obvious, however, is the way to do add a Ribbon to a particular Application Page when the page does not host any Web part or user control. So here’s some help for you. I’ll also take a look at interacting with a modal dialog using the new framework in SharePoint from this ribbon.

More...


Tags: , , ,
Categories: Development | Office | SharePoint

18 Comments
Actions: E-mail | Permalink | Comment RSSRSS comment feed

Convert/Display PDF & Word Files as Images in .NET

Recently I had to write some code as a sample to be able to display Word and Acrobat files on a Web page in a 2-page view. We couldn’t simply use a plugin or application on the user’s machine to do so. The solution was to export each page out to an image and then display the pages in any way we needed. We therefore needed to do some document export code from our application.

Word to Images

Converting Word files (.DOC & .DOCX) to images was fairly simple, although I do think I probably took a longer approach. The problem is that the older DOC format and the newer DOCX format have different APIs to work with. So instead of doing this, I simply exported them both to XPS and then used the XPS API to retrieve images for each page. This last part was not obvious to me till I found the one line of code required to do this on a forum – I apologize for not linking to this as I can’t find that link anymore. The credit for that part is wholly the original author’s.

PDF to Images

Converting PDF to images was a major issue. There is no direct way of doing this. There are many 3rd party components that are available to do this, but most of them cost a bomb. Some free ones like PDFSharp are able to iterate pages but there is no way to export a complete page to an image without walking through the entire structure of the page and redrawing everything.

This is where I found the GFLAX library. This requires GhostScript for Windows to be installed on the machine as well. You can register the DLL and then reference it in your .NET code.

Code Sample

I’m attaching the entire code sample to this post as a download. The code is released with the open source BSD license. All external components (Word and Office interop assemblies, GFL, etc.) have the copyright of their owners and must be adhered to.

Usage

Once you download the attachment and extract it, open it in Visual Studio 2008. Make sure you’ve installed GhostScript from the link above and run a “regsvr32 GFLAX.dll” for the GFLAX Library. Add reference to Microsoft.Office.Interop.Word on your machine (and remove the marked lines from Web.config) from the .NET tab and to GFLAX from the COM tab.

Run the application and upload .doc, .docx and .pdf files and you can then view them in the browser directly.

WordDisplay 
Two page display of an uploaded Word file. Works with PDF files too.

Download:
Tags: , , ,
Categories: ASP.NET | Development | Office | Tips | Download

7 Comments
Actions: E-mail | Permalink | Comment RSSRSS comment feed

Three Articles in August 2009 PCQuest

PCQuest has just published 3 of my articles in their current issue. It was actually supposed to be 4, but the one on ASP.NET 4 got lost in the mail and a resend was received too late for this issue. You can read these articles here:

I’m also going to try and compile a list of articles I’ve written in PCQuest over the last few years and link to them here.


Tags: , , , ,
Categories: Windows 7 | SilverLight | Office | Development | ASP.NET

4 Comments
Actions: E-mail | Permalink | Comment RSSRSS comment feed

Loading Child Table Data in SilverLight & RIA Services

I’m currently working with the .NET RIA Services SDK with Silverlight 3 for getting and modifying data from the server using LINQ. Now there are a ton of samples and blog posts available that show you how to work with data from the server. However, one thing in common with all these posts is that they usually work with only one table at a time. What if you want to show the result of a join on the table? This is where a relatively unknown feature called the IncludeAttribute comes in. Let’s take an example for this to explain it in detail.

More...


Tags: , ,
Categories: Development | Tips | SilverLight

7 Comments
Actions: E-mail | Permalink | Comment RSSRSS comment feed

SilverLight 3.0 Out of Browser Mini Tutorial

SilverLight 3.0 has just been released to the web. And there is now an even more important reason to start using this great technology – running apps written for the browser can now be run as a standalone application from the user’s desktop as well. This post takes a detailed look at how you can start using this new feature. More...


Tags: , ,
Categories: Development | SilverLight

5 Comments
Actions: E-mail | Permalink | Comment RSSRSS comment feed

Windows 7 and Application Compatibilty

I’m updating my blog after a long time since I’ve been tied up in doing a large number of Windows 7 Application Compatibility workshops all across India with a number of Independent Software Vendors (ISVs) for their products. We’re basically testing out their products on the Windows 7 RC to see any issues that might surface and what they need to do to resolve them.

Most application run just fine on Windows 7. However, in the cases where there is an issue, it almost invariably turns out that the product has not been tested on Windows Vista and therefore it also fails on Windows XP. Vista and 7 have a tighter security mechanism called UAC that needs to be addressed in applications – and is something that many developers face problems with.

So here are two of the biggest issues that I’ve seen and their solutions: More...


Tags: , ,
Categories: Windows 7 | Tips | Development

8 Comments
Actions: E-mail | Permalink | Comment RSSRSS comment feed

Managed Win7 Taskbar Enhancements

Windows 7 has a ton of new enhancements right there in the Taskbar itself. A quick list of them includes:

  • Unified Launching and Switching
  • Jump Lists
  • Destinations
  • Tasks
  • Thumbnail Toolbars
  • Icon Overlays
  • Progress Bars
  • Notification Area
  • Interactive Thumbnails

Your applications too can start using these features’ in them if you want. The documentation for these are available at MSDN here. The only issue is that this is currently possible only with un-managed APIs – COM & Win32.

So what happens if you’re a .NET WinForms/WPF developer and want these features in your applications as well? Well, fear not there is a way out. There are two open source projects that allow you to use the Win7 taskbar enhancements in your managed code applications as well.

The first is a project on CodePlex called Windows 7 TaskBar Extensions. This is a new project with only a few things currently implemented but seems to be heading in the right direction for a small, lean implementation of the Taskbar features in .NET.

The second is a much more comprehensive project called very simply “Windows 7 Taskbar”. This is based upon the excellent Vista Bridge library and offers all the features that are currently possible. There are a number of sample applications as well that demonstrate many of the different features. The only part that didn’t work for me is creating Jump Lists.

So if you’re a Windows application developer and want to add the new features of Vista and Windows 7 into your application, Vista Bridge and these other two libraries are surely something that you will want to try out.


Tags: , , ,
Categories: Windows 7 | Rave | Development | Windows Vista

6 Comments
Actions: E-mail | Permalink | Comment RSSRSS comment feed

Saving Changes in Table Design in SQL Server 2008

One of the new things that happens in SQL Server 2008 is that it prevents saving table structure changes that require the table to be dropped and re-created. While this is a great feature to prevent accidents from occurring, on a developer machine it can be quite frustrating. This is the dialog you get when trying to make changes in a table design.

image

Unfortunately, this dialog doesn’t tell you where to turn this feature off! Clicking on the small “?” on the title bar does get you to a help page that tells you how to do it.

Anyway, the place to do it is Tools > Options > Designers > Table and Database Designers > Prevent saving changes that require table re-creation. Turn this option off and you will be able to save the tables again.

image


Tags: , ,
Categories: SQL Server | Tips | Development

27 Comments
Actions: E-mail | Permalink | Comment RSSRSS comment feed