BitCrazed

Code, technology, opinion ... and who knows what else?

Month List

RecentComments

Comment RSS

An Accurate Windows 8 Platform Architecture Diagram?

Since Microsoft unveiled details of Windows 8 to the world during the //BUILD conference in September 2011, there has been some confusion about where and how the new WinRT API sits in relation to .NET and Win32.

Part of this confusion is due to the oversimplified, ambiguous and misleading platform architecture diagram unveiled during the conference (click image for un-obscured version):

image

In this diagram, it appears as though there is no more .NET & CLR, it looks like Silverlight doesn’t exist and, worse, makes it look as though WinRT is an entirely new Windows subsystem that sits alongside Win32!

I spent a lot of my career at Microsoft building and presenting architectural diagrams to explain the relationships between the various technologies I worked on and other current and new technologies. But I don’t think I ever created something as confusing, misleading and ambiguous as the diagram above!

A tip for whoever designed the above diagram: If you’re going to unveil your brand new OS & app platform architecture to your developer community, make sure your architecture diagram is clear and accurate.

Win32 & .NET are NOT “going away”!

During and since the //BUILD conference I’ve had MANY conversations (and overheard many more) with people expressing concern that .NET and Win32 are “going away”! I’ve seen people state that WinRT doesn’t utilize Win32 API’s and that it “resides directly on top of the kernel just like the Win32 API”!! Nothing could be further from the truth!

The reality is that Win32 and .NET are not going away! WinRT is not magic – it’s simply a collection of native COM objects that are exposed to the outside world using .NET/ECMA-335 compatible metadata (rather than the traditional IDL metadata format employed by all COM objects in the past). This allows WinRT objects to be consumed by native C/C++, managed C#, Visual Basic, etc. and Javascript via Microsoft’s Chakra Javascript engine.

Several other people have attempted to provide a more accurate diagram with varying levels of success. Fellow ex-Microsoftie Doug Seven posted his re-rendering of the Win8 architecture, and MVP & author Shawn Wildermuth recently posted his perspective while explaining how Silverlight sits in this architecture.  Famed Microsoft-watcher Mary Jo Foley also has a post discussing the angst caused by the poorly designed Windows 8 architecture diagram above.

While these newer attempts to describe the new architecture are increasingly accurate, they don’t deal with the issue of the relationship between WinRT and Win32. Nor do they clarify the position of .NET & CLR.

To clarify reality:

Because of the continuing confusion I thought I would offer-up what I believe to be a pretty accurate diagram summarizing the Windows 8 platform architecture:

Windows 8 Platform Architecture

Hopefully, this new architecture diagram should make things a lot clearer. This new diagram is by no means perfect, but I believe it accurately expresses the major components of the existing and the new OS components. Let me know if you think it needs any further changes in the comments below.


Permalink | Comments (0) | Post RSSRSS comment feed

How NuGet hosed my Javascript Intellisense but still saved the day

NoJquery

The Issue

I have been banging my head against a brick wall over the last few days trying to get JavaScript & JQuery Intellisense working in Visual Studio 2010 for a web project I am currently working on. I have read all the threads over at StackOverflow, I have read many of the threads on MSDN’s discussion forums and on many pages around the web.

All to no avail – as you can see above, no matter what I did, I could not get any JQuery Intellisense. But why? While it’s not perfect, Visual Studio 2010 has some pretty good (and rapidly improving) Javascript Intellisense support. I know this because I’ve used it on many projects in the past. But for some reason, it was just not working in this current project.

The Problem

I hunted high and low:

  • I made sure I had the JavaScript sources local to the project (to rule-out CDN/connectivity issues)
  • I checked that I was referencing the correct version of JavaScript
  • I added “///<references path=”Scripts/JQuery-1.6.4.js" to my source
  • I checked that there were no errors being reported in any of the sources

Nada. Nothing. It should work, but it wasn’t Sad smile

I thought I’d check in case there were any JQuery updates published to NuGet, so I opened up the NuGet Package Manager console window in VS and typed the following:

PM> update-package

I was surprised to see a number of errors returned, including:

Update-Package : 'jQuery' was not installed in any project. Update failed.
...
Update-Package : 'jQuery.vsdoc' was not installed in any project. Update failed.
...

Huh? That’s odd. Let’s see what packages we have installed:

PM> get-package

Id                             Version      
--                             -------      
dotless                        1.2.1.0      
EntityFramework                4.1.10331.0  
EntityFramework                4.1.10715.0  
jQuery                         1.6.2        
jQuery                         1.6.4        
jQuery.UI.Combined             1.8.16       
jQuery.Validation              1.8.1        
jQuery.vsdoc                   1.6          

To quote Chris Griffin: ”WHAAAAAAAAAT?” Two versions of JQuery? SRSLY?

The Remedy

I remembered that just a couple of weeks ago, I’d updated my NuGet packages and noticed that a new version of JQuery had been downloaded, the old version appeared to be removed from my project and replaced with JQuery-1.6.4. I thought it had been done right, but I guess something must have gotten screwed up in the upgrade.

So, I used "uninstall-package …" several times for each JQuery library until all references to JQuery were removed. Then I used "install-package JQuery” to re-add the latest JQuery to my project. I ran “Rebuild” to re-generate the JavaScript Intellisense, and was delighted to see JQuery Intellisense restored to its full working glory:

image

WOOHOOOO! Smile

I hope this post helps anyone else out there who’s been struggling to get JavaScript Intellisense working in VS 2010.


Permalink | Comments (0) | Post RSSRSS comment feed

ASP.NET MVC 3, NuGet 1.0, IIS 7.5 Express & Web Matrix 1.0 Released

image

It’s a web technology download bonanza this week! Not only have Microsoft released ASP.NET MVC3 – by FAR the most powerful web development platform available today, but they’ve also released NuGet 1.0 IIS 7.5 Express and Web Matrix 1.0.

I won’t reiterate here what others have already covered in depth, but I do encourage you to download the latest releases of these powerful and liberating new technologies and go get to work on them.

Use the Web Platform Installer to download and install all the above goodness … and more!

Phil Haack announces the release of MVC3 & NuGet

Official Web Matrix introduction page

Now all we’re waiting for is VS 2010 SP1, SQL CE 4.0 and the new Entity Frameworks. When these final pieces of the puzzle are released, Microsoft will, for the first time in a very long time, have the most complete and compelling web development and hosting platform available, bar none.

Can’t wait!


Permalink | Comments (0) | Post RSSRSS comment feed

Great new features coming in Silverlight 5

Silverlight Firestarter 2010

Direct from the Silverlight Firestarter event here at Microsoft campus, Redmond, WA.

Silverlight 5 is coming and includes some great new features that will not only delight Silverlight developers, but will also wow users.

Silverlight 5 3D support

Yep, you read it right. Finally, Silverlight 5 will include hardware accelerated 3D support and introduces an immediate-mode API.

Luigi and Guido Rosso from Archetype, demonstrated a demo application they wrote in less than a week which displayed a full 3D model of Scott Guthrie’s body, skeleton and musculature. They were able to control the opacity of Scott’s clothes, skin, musculature and skeleton and were able to animate the entire model, spinning him around and zooming deep into his torso … to show his beating heart! :) The demo was extremely smooth and fluid, animations were blindingly fast and many chuckles were had at Scott’s ripped torso!

The key takeaway here was that Silverlight 5 will ship with exceptionally powerful 3D features that enjoy full hardware acceleration and will completely revolutionize the kinds of applications that can be built with Silverlight, eliminating the need to install 3rd party 3D ActiveX controls etc.

TrickPlay: Variable playback speed

One of the best features of Windows Media Player is the ability to speed-up or slow-down the playback speed of videos and audio (e.g. podcasts) without altering the pitch of the audio. This is a great way of watching some/all of a long video or podcast more quickly. Alas, however, this feature is currently missing from Silverlight … but it’s coming in Silverlight 5!

This means that you’ll be able to watch all of the content you care about from events like the PDC more quickly than real-time! :)

Quality, performance and power through hardware acceleration

ScottGu made it clear several times throughout his keynote that the Silverlight team has spent a great deal of time and effort further improving the quality, performance and power-consumption aspects of Silverlight.

Scott stated that they’ve made significant improvements to the time it takes to start-up Silverlight applications. This mirrors news I’ve heard from other ‘softies who have told me that  there are some significant improvements coming to start-up times for .NET applications. Faster booting apps are ALWAYS a good thing and I can’t wait to see what develops on this front.

Scott also mentioned that Silverlight 5 will also include a native 64-bit version. This is a big deal for Silverlight developers as Silverlight is often used as the UI to large, complex  databases which can easily consume more than 4GB data in order to render their data.

Video playback is now fully hardware accelerated. Text rendering quality has been improved significantly and animation quality has been significantly improved through improved hardware acceleration.

This will also result in Silverlight 5 applications consuming less power (important for mobile scenarios) because more graphics-intensive processing is being offloaded to the GPU rather than being performed by the CPU.

Remote Control support

Yep, you read that right – Silverlight 5 will support remote control – as in the little box that you use to change channels and control the volume of your TV. This is a great feature – as someone who is increasingly sourcing movies and videos from the web (e.g. Netflix, Hulu, Amazon, etc.), having to control the movie via the PC it’s running on is a pain. I cannot wait until I can control movies streamed from Netflix without having to leave the couch!

Speculation: I wonder if this is an indication that, perhaps, Media Center in Windows 8 will be built on Silverlight?

Developer goodness :

Silverlight 5 also comes with some significant improvements for developers:

Data binding debugging

Ever run into issues with Data Binding in your Silverlight apps? Ever wanted to set breakpoints on your binds and the ability to examine step through your data binding code? You can’t do this in Silverlight today, but it’s coming in Silverlight 5!

Coded UI recording and testing

John Papa also demonstrated new Coded UI tests that can record your every action against your site’s UI. Each action is recorded into a series of steps which you can modify if you wish to remove unnecessary actions. You can then replay these actions and compare the values of individual HTML elements against expected results from within a test.

This is a really massive deal which will make testing your actual UI a great deal easier and more effective than ever before.

Further reading:

As usual, ScottGu has posted further details on his blog – be sure to go read his announcement:
http://weblogs.asp.net/scottgu/archive/2010/12/02/announcing-silverlight-5.aspx


Permalink | Comments (0) | Post RSSRSS comment feed

Wahoo - Razor Syntax Highlighting available now

imageIf, like me, you’ve fallen in love with the new ASP.NET Razor syntax, then you’ll be delighted to know that the Intellisense & syntax highlighting ships as part of the newly released ASP.NET MVC 3.0 Release Candidate (RC).

Be sure to go read the write-ups from the Gu and Phil Haack on what goodies ship in the MVC 3.0 RC, such as a newer build of NuGet (which replaced NuPack), Partial Page output caching, Unobtrusive JavaScript and a whole host of other goodies.

imageThe easiest way to get this stuff onto your machines is, of course, the Web Platform Installer which itself has been somewhat overhauled recently.

If you’d rather, you can just download the MVC3 RC bits here.

So stop reading right now and rush over to get all this new goodness installed on your machines!


Permalink | Comments (0) | Post RSSRSS comment feed