Showing posts with label WinRT. Show all posts

What percentage of Windows apps are written in JavaScript?

Windows 8 provides a new touch first experience for Store apps. You can write Windows Store apps using a common API (WinRT) with language projections (bindings) to C#, Visual Basic, C++, and JavaScript. XAML (Extensible Markup Language) is used to create not only Windows Store apps, but also Silverlight and WPF applications. There are differences between Windows Store apps, Silverlight, and WPF apps, but knowing one makes the others easy. JavaScript uses HTML5 markup and CSS3 to create fully native apps.

Here is the breakdown according to Robert Evans, Microsoft Technical Lead for Windows Store App Labs (Source):

  • 59% XAML/.NET (C# and Visual Basic)
  • 36% HTML/JavaScript
  • 5% XAML/C++  

During my inspection of apps, there seems to be even a higher percentage of XAML/.NET apps; however, I trust the submission numbers. Just the ones I tend to use are generally written in XAML/.NET.

You can inspect your installed apps, too. You can look behind the Windows 8 curtain.

Despite the numbers, in my view all of us could be writing TypeScript/JavaScript or some other variant someday soon. I always thought that it would be a dynamic language, but never thought it would be based on JavaScript.

Whatever you pick, enjoy it.

Update: These percentages are based on over 4000 apps that have come through the app labs. These are mostly consistent with the numbers that I have found through limited inspection. Here is how:  http://www.pursuitofgreatdesign.com/2013/02/a-look-behind-curtain-of-windows-8.html

A look behind the Windows 8 curtain

Windows 8 provides new kind of touch first apps available from the Windows Store. These Window Store apps use WinRT—the new windows runtime—not to be confused with Surface RT (the new ARM based tablet from Microsoft). WinRT provides language projections (bindings) for C#, Visual Basic, C++, and Javascript.

Loosely speaking, WinRT can be thought of as an object-oriented sandboxed secure replacement for Win32.

In my view, you will like Windows 8 Store apps even on a desktop or laptop. Give them a try. The Modern UI style that Windows 8 Store apps use can provide a better experience.

This quick look behind the curtain for Windows 8 Store apps answers these basic questions:
  • Where are the Windows Store apps located?
  • Where do the apps run?
  • Where do apps store your data?
  • Where is the WinRT?
  • Where do XAML apps get their style?

Where are the Windows Store apps located?


Windows Store apps are stored in the directory C:\Program Files\WindowsApps.

Each app will have its own subdirectory.  

Now, you will not be able to open the directory without first changing the ownership of the directory, so I have included terse instructions at the bottom of this post: [How To] change permission on the WindowsApps directory.
 

Once you dig deeper into the WindowsApps directory, you will notice a directory for each app (and an additional one for updates).

Digging further, you will notice that the majority of apps are written with XAML/C# apps, not HTML5/Javascript.

As you will see, one of the disturbing things about HTML5/JavaScript apps is that you can read the JavaScript code. While you can decompile C# code as well, it is a bit more disturbing just to see the source sitting there. This is a good reason to obfuscate and minimize your Javascript before shipping. Most JavaScript developers are already used to this since the majority is delivered to web browsers.

Where do the apps run?  


If the app was developed using HTML5/JavaScript, then it runs in a host process called WWAHost.exe. This host process runs Trident and Chakra engines along with the JavaScript projections to WinRT. You will have to view the command line parameters via ProcessExplorer or Task Manager to view the command line parameters to narrow down the app.

.NET Language C#, VB, and C++ are compiled into their own binary. MyApp.exe for example.   

Where do apps store data?


There are three main types of app storage:
  • Local: Persistent data that exists only on the current device   
    • Typical location: C:\Users\{username}\AppData\Local\Packages\{app_id}\LocalState

  • Roaming: Data that exists on all devices on which the user has installed the app. The current limit is 100K. The limit can be founding using the following WinRT call: ApplicationData.Current.RoamingQuotaLimit
    • Typical location: C:\Users\{username}\AppData\Local\Packages\{app_id}\RoamingState  

  • Temporary: Data that could be removed by the system any time the app isn't running
    • Typical location: C:\Users\{username}\AppData\Local\Packages\{app_id}\TempState  

Where is WinRT?


The API is specified in the following directory using but the code runs elsewhere winmd:

C:\Program Files (x86)\Windows Kits\8.0\References\CommonConfiguration\Neutral

The Windows Store apps (Metro) .NET profile can be found in the following directory:

C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETCore\v4.5\

Where do XAML apps get their style?


When styling your XAML apps, you will likely edit StandardStyles.xaml located in the Common directory of your app—by default. As you will notice, these styles reference other styles that do not seem to exist. You can find these referenced (default) styles in the following directory:

c:\Program Files (x86)\Windows Kits\8.0\Include\WinRT\Xaml\Design\themeresources.xaml". Generic.xaml

You can redefine the desired styles such as Font color from the default in your StandardStyles.xaml.

I find it useful to put them into corresponding sections called Standard Styles Overrides.       

Sidebar: [How To] take ownership of the Windows App directory
In order to take ownership of the Windows App directory, you will have to be Administrator.
 
You might also first need to set the option to display hidden directories. Once you can see the directory, then select the "Windows App" folder and select Properties of the following directory: C:\Program Files\Windows Apps\.
 
Select the "Security Tab" from the Properties window and select advanced. Change the owner using the "Change" link. Give yourself ownership. You will have to be Administrator in order to do this. 
 
Sorry for the terse description. If you need more help, you can search the web for how to take ownership of Windows directory.


I hope that this quick peek behind the Windows 8 curtain helps you understand how apps run, store data, and get their style.

Enjoy.

Top 10 reasons why TypeScript will be widely adopted

TypeScript is a new programming language launched this week by Microsoft. TypeScript is an open source JavaScript superset that adds classes, interfaces, modules, and arrow lambdas to JavaScript.

With a computer science career (or any other for that matter), it pays to pick the right technology; the one that will ultimately prevail. We invest a lot of time and energy in learning a new technology—granted it is fun—but it helps to be on target. It is easier. Companies and projects benefit as well; the development velocity increases when you pick a good technology, the approach, and business processes are simpler. Training and architecture are inherently easier. No matter the size, these matter.

Here are, in my view, the top 10 Reasons why TypeScript will be widely adopted:

#10: Works well with existing projects
TypeScript can be easily be adopted by any project that uses JavaScript today.

#9: Uses structural interfaces
Structural interfaces are automatically implemented by any object/prototype that complies structurally. This means that you can define an interface for existing JavaScript library as long as the object/prototype complies structurally; that is, it has the same properties and functions. It is powerful and practical.

#8: Generates JavaScript
TypeScript is compiled into Javascript to ensure compatibility. This means that it can instantly run in just about any browser—just needs to be ECMA Script 3 compliant.

#7: Great tool support
Even though TypeScript is at 0.8, there is great tool support especially in Visual Studio. Also, text editor support for Sublime Text, EMACS, Vim. Visual Studio IntelliSense is amazingly good for the TypeScript plug-in and the compiler is built-in.

#6: Simplicity
TypeScript has a simple design. The TypeScript compiler is written in TypeScript—an example of computational reflection—a beautiful thing. The C# compiler will only be implemented in itself in the next version. The typescript compiler is less than 25k physical lines of code excluding test cases and harness. Check it out the code out for yourself at CodePlex.

#5: Open Source
Microsoft has open-sourced the implementation and libraries. This is still in the best interest of Microsoft—internally they have large JavaScript projects to support Office, web properties that they own such as MSN, Windows 8 apps, etc. The code is available at CodePlex under an Apache 2 License.

#4: Anders Hejlsberg is involved
Anders Hejlsberg is a prominent Microsoft Fellow who co-designed several popular and commercially successful programming languages and development tools. He was the original author of Turbo Pascal and the chief architect of Delphi. Anders is the lead architect of C# and core developer on TypeScript.

I have admired Anders’ work since his first product: Turbo Pascal. Turbo Pascal, an amazing compiler and IDE, was written single handedly by Anders and it ran in less than 64k of memory. It was also lightning (turbo) fast. 

#3: TypeScript is a Javascript superset
TypeScript extends the JavaScript syntax. Any existing JavaScript program or library works with Typescript without a change. Existing frameworks such as JQuery and Node.js are full supported. In addition, type declarations are provided. You can also install via Node.js.

#2: Aligned with future JavaScript standards: ECMAScript 6
TypeScript is essentially an ECMAScript 6 bridge for us. Microsoft's aim is to get the class, interface, and module constructs added to the upcoming ECMA script 6 standard.

#1: Enables programming in the large
Introduces classes, interfaces, and modules—essential ingredients for programming in the large. JavaScript has often been criticized for not allowing programming in the large. In essence, moving us back. In my view, a great developer can produce good code in any language, but it is essential to have modules and other constructs to help with large teams.

Closing
Do not necessarily jump ship from .NET and start writing all your code in TypeScript. No doubt, we all have to write JavaScript from time-to-time and TypeScript can help improve the structure of it and increase its scale. Large scale JavaScript can be necessary for Windows 8 JavaScript/HTML apps.

This week, Scott Hanselman (@shanselman) tweeted, "he who is most likely to make declarative statements is most likely be to called a fool in retrospect." In my view, TypeScript will be widely adopted (or I am a fool). Tell me what you think?

Additional Resources
There are many ways to contribute to TypeScript: discuss the spec, write libraries, contribute to the CodePlex project, write code, submit bug reports, answer questions, learn it, provide feedback, and tell others.

TypeScript: http://www.typescriptlang.org/

Anders Hejlsberg introduction video: http://channel9.msdn.com/posts/Anders-Hejlsberg-Introducing-TypeScript

TypeScript Dart vs. TypeScript comparison by a Dart team member: http://www.reddit.com/r/programming/comments/10rkd9/welcome_to_typescript/c6g37xd

It is all about elegant code: simple yet powerful—the more the better; otherwise, much less is better. Enjoy.

Top WinRT .NET needs

WinRT is the new Windows 8 runtime used to create Windows Store apps. WinRT provides language projections (bindings) for C#, Visual Basic, C++, and Javascript.

Loosely speaking, WinRT can be thought of as an object-oriented sandboxed secure replacement for Win32.


In my view, the top WinRT .NET needs are as follows:

Need: Mock testing framework
Mock objects are simulated objects that mimic the behavior of real objects in controlled ways. A programmer typically creates a mock object to test the behavior of some other object, in much the same way (Source). 

Currently, there are no mock testing frameworks such as RhinoMocks available for "Windows Store" app development.

The reason: there is no dynamic proxy generation due to a missing namespace in the "Windows Store" profile: System.Reflection.Emit.

Workarounds
Use other kinds of test doubles such as fakes and stubs instead; this has been my approach.

Microsoft Fakes, is a new framework that generates test code for interfaces instead of dynamically mocking them but in a mock like fashion.  Microsoft Fakes is only available in Visual Studio 2012 Ultimate.

MoQRT like Microsoft Fakes in that it generates the test code for an interface instead of dynamically mocking them.


Need: ADO.NET and other APIs
The API for "Windows Store" apps is very tight and does not contain ADO.NET and Entity Framework. Mobile apps should also work when you are offline. Since WinRT is the future platform for Windows development, then there will be very sophisticated apps developed with WinRT. Sophisticated apps need sophisticated storage.

The WinRT profile is a significant subset of the full .NET 4.5 profile. In addition, many classes were moved into the Windows.* namespace (WinRT) which helps make them available to C++ and Javascript. This just creates an exercise in mapping the old to the new.

On the other hand, WinRT is tight. We are back to time where it is possible for the system to be understood by a single person.

Workarounds
Storage alternatives; these bits are even fresher than WinRT’s so be aware: http://winrtstoragehelper.codeplex.com/
http://winrtdatabase.codeplex.com/
http://siaqodb.com/
SQLite


Conclusion
Despite the needs, developing for Windows 8 still feels years beyond developing for iOS. Developing for iOS is like being back in 1995. Hey, the 90's were a blast, but it is time to move forward. Luckily, tooling is not a problem for Windows 8 development. 

I have been developing with Visual Studio 11 (2012) and Windows 8 since I was given a prototype tablet about a year ago at Build by Microsoft. These needs have been on my mind since.

Please share any new frameworks or workarounds that you discover, and also the needs that are at the top of your list.

Update: Removed one of the needs thanks to a clarification by Jayson Go. It also inspired me to do an entire series on async programming and design.

Why has Microsoft's Metro design language captured the essence of modern interface design? 5 key elements.

What is Metro?
Metro is a typography-based design language. Metro style is guiding a new unified experience on Windows 8, Xbox, Windows phone 7, and can even be experience on Windows 7 in the form of Zune, and Windows Live. A design language, such as Metro, is used to guide the architecture of a group of products by capturing the principles and elements of a design approach into a single concise set. Metro gets its name from way finding systems found in metropolitan areas such as airports, subways, and urban areas. Metro gets its inspiration from modern design (reductionism), Swiss design (clear, honest, and beautiful), and motion design (the force of time—the way we experience the world).

In my view, great interface design gets out of the way and Metro gets out of the way by focusing on the content. Metro has captured the essence of modern interface design based on five key elements. 

The 5 key elements

1. Typography
Metro is founded upon clean beautiful typography.
Proper color, weight, and size can help eliminate all of the chrome, color, and graphically over manipulated design elements. Even hierarchy can be easily and cleanly shown with just typography. It is not just about typography, it is about the content.

2. Authentically Digital (Inversion of Focus)
With Metro, the user is not focused on the chrome elements such as menus, buttons, panels, and color images with in the chrome that are shaded, the user is focused on the content.

With Metro, there has been an inversion of focus. Great interfaces get out of the way.

Metro is not just about typography, it is about content. By removing all chrome, it helps put the focus on the content whether it is text, images, or video.

With a modern interface, we do not need chrome to indicate what can be pressed or manipulated. Now, the content can be manipulated. After 40 years of WIMP based interfaces, we all know how to use a computer.

3. Spacing with thoughtful reduction
Spacing is important—and made possible with the removal of all of the chrome and over-manipulated design elements. Even if there is room for another button or feature, it certainly does not mean that you should add it. In fact the opposite, you should challenge every element. It takes focus. From a visual design perspective, no longer do we need chrome on top of chrome nested in chrome.

4. Motion (fast and fluid)
Motion, used properly, can create a fun fluid interface. It brings the experience to life. In my view, motion is more important than graphic design. Metro uses animation in the right places and for the right reasons:

     Delight the user
     Simplify the task
     Hint towards interaction
     Provide a feeling of moving forward
     Respond to user behavior
     Teach the user how to interact

5. Asynchrony and intelligence
It is easy to overlook the importance of this element just as Steve Jobs admittedly missed object-oriented programming when he visited Xerox Parc where he became inspired to produce the Mac. It is easy to miss Async Programming in the same way.

Asynchrony helps make an experience fluid.

Closing
Originally developed by Xerox over 40 years ago, the traditional desktop metaphor is a bit tired at least from a design and metaphor perspective. In addition, analog design elements and metaphors are not what digital design needs today. We know that live elements can be tapped or swiped. We do not need 10 pixels of shading and blasted with color inside of a box that is further shaded wrapped in a panel with indentation—you get the idea.

There is a design revolution at Microsoft. In my view, Microsoft is leading Apple at interface design—I know sounds like heresy. Metro and Windows 8 are not perfect, but the direction is game changing. It is easy and safe to jump on the Apple design bandwagon because mostly their designs are great. But I am not afraid to point out that Apple is not the only company that is doing great design and appreciates great designers. Now, it seems that almost every company cares about great design. Design matters.

In my view, the Metro design language has captured the essence of modern interface design. Metro is modern and clean—fierce reductionism, simple, and fluid. 

Enjoy the pursuit

5 Reasons to use the Feature pattern in your product

A design pattern is a formal way of documenting a solution to a design problem.

The "Feature" design pattern is a simple yet powerful mechanism that enables you to rollout features based on configuration settings. It provides the ability to turn these high-level features "on" or "off" by changing the configuration parameter values. The basic idea: use a simple mechanism to control the features that are presented to the end user.

5 Reasons to use the "Feature" pattern in your product

1. Reduces the need to branch: The longer your branch remains unmerged, the greater chance that it will never make it. By being able to not turn the feature "on" until ready in production, but continue to work in the main or trunk branch is valuable.

2. Partial rollbacks (isolated): A single new feature will not hold up a production deployment, it can be turned "off" until ready. It keeps progress moving and a feature rollout does not have to necessarily coincide with a code rollout.

3. Different features for different folks: Will make it easier to turn a feature "on" for testing in a particular environment, but "off" for your production environment. It can also help with partial user and A/B testing.

4. Helps reduce risk: With the ability to turn features "off" until ready, it can allow you to increase development velocity without necessarily increasing risk.

5. Used by #winners: Facebook, Amazon, and many others. Today, Facebook has many new features that are not yet turned on yet but deployed to their production environment. Although not an intended reason, Facebook has even turned on features in production to react to new features from Google+. Features ready to be turned "on."

My hope: the "Feature" pattern will help you for the same reasons.

For more details about the Feature pattern, see the somewhat terse pattern description below along with the source code. There is not much to this simple yet powerful pattern.


Pattern Name: Feature

Intent
Provide a simple yet powerful way to turn features "on" and "off" via configuration. This enables certain environments to have certain features turned "on."

Also Known As
Feature toggle.

Motivation (Forces)
Demand for high development velocity and the need to mitigate risk.

Applicability
Web apps, freemium business models, mobile apps, services, etc.

Structure
The pattern structure is simple and consists of the Feature class. 

Participants
Feature: Represents a Feature that can be turned on or off based on an app setting. You can take an action if it is on, off, or both.

Collaboration
Here is an example code fragment that interacts with Feature:

           Feature.BasedOn("Product.Feature.IsOn")
                .IfOn(() =>
                {
                    // do the feature
                })
                .IfOff(() =>
                {
                    // do the alternative or not
                });

If the the configuration parameter "Product.Feature.IsOn" is set to "true," then the IfOn action will be invoked; otherwise, the IfOff action will be invoked.

Consequences
Be sure to get granularity right.  Be wary of adding features at too fine of detail. Complex feature interaction can also complicate testing. Although a more general discussion, make sure that each feature is justified. However, even in a design world driven by YAGNI and KISS principles, you still need some flexibility—just make sure that it is justified.

Implementation
Here is a simple implementation of the Feature pattern in C# below:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Configuration;

namespace Product.Support
{
    /// <summary>
    /// Represents a Feature that can be turned on or off
    /// based on an app setting. You can take an action if it is 
    /// on, off, or both.
    /// </summary>
    public class Feature
    {
        /// <summary>
        /// Based on this app setting. 
        /// </summary>
        public string AppSettingKey { get; set; }

        /// <summary>
        /// Create a feature based on the given setting.
        /// </summary>
        /// <param name="appSettingKey">The app setting that determines whether the feature is turned on or off.</param>
        /// <returns>Newly created feature.</returns>
        public static Feature BasedOn(string appSettingKey)
        {
            if (string.IsNullOrEmpty(appSettingKey)) throw new Exception("setting key cannot be null or empty.");
            Feature feature = new Feature();
            feature.AppSettingKey = appSettingKey;
            return feature;
        }

        /// <summary>
        /// Whether the feature is turned on; that is, if the app setting
        /// has a value of true; otherwise, false.
        /// </summary>
        /// <returns>Whether the feature is on; that is, if the app setting
        /// has a value of true.</returns>
        public bool IsOn()
        {
            if (AppSettingKey == null) return false;
            string value = ConfigurationManager.AppSettings[AppSettingKey];
            return (value != null && value.ToLower() == "true");
        }

        /// <summary>
        /// Performs the given action if the feature is turned on.
        /// </summary>
        /// <param name="action">The action to take.</param>
        /// <returns>The feature</returns>
        public Feature IfOn(Action action)
        {
            if (IsOn())
                action.Invoke();
            return this;
        }

        /// <summary>
        /// Performs the given action if the feature is turned off.
        /// </summary>
        /// <param name="action">The action to take.</param>
        /// <returns>The feature</returns>
        public Feature IfOff(Action action)
        {
            if (!IsOn())
                action.Invoke();
            return this;
        }
    }
}

Sample Code
As sample code, here are some unit tests that interact with the Feature class:
using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Product.Support
{
    [TestClass]
    public class FeatureTests
    {
        [TestMethod]
        public void Feature_IsOff_Success()
        {
            // arrange
            bool isPass = false;

            // act
            Feature.BasedOn("Product.Feature.IsNotOn")
                .IfOn(() =>
                {
                    isPass = false;
                })
                .IfOff(() =>
                {
                    isPass = true;
                });

            // assert
            Assert.IsTrue(isPass);
        }

        [TestMethod]
        public void Feature_IsOn_Success()
        {
            // arrange
            bool isPass = false;

            // act
            Feature.BasedOn("Product.Feature.IsOn")
                .IfOn(() =>
                {
                    isPass = true;
                })
                .IfOff(() =>
                {
                    isPass = false;
                });

            // assert
            Assert.IsTrue(isPass);
        }
    }
}

Known Uses
Facebook, Amazon, and others.

Related Patterns
For a couple more previously unpublished patterns (Instrumentation and Service Protector), check out this article that I wrote for the Microsoft Developer Network last year, WCF Decision Framework:
http://gregcowin.blogspot.com/2011/08/why-use-decision-framework.html


Enjoy the pursuit of great design.

What geeks do during the holidays?

Just so you know: geeks have a bright inner spirit that is just hidden beneath a few layers of logic and critical thinking. Although not comforting to think about, geeks even require a bit of love.

In this spirit, here is my workstation.





Moreover, here is the other side sporting some Windows 8.




Happy Holidays! Do great work for people that you care about and it will lead to happiness. 

One last thing: don't forget to treat your geek right.

Why is the next major paradigm shift in software design about to happen?


What is the next major paradigm shift?
In my view, the next major paradigm shift in software development will be asynchronous (or async) programming and design. It is our next paradigm shift because it helps alleviate pressures and follows a surprising progression. Only when we change the way that we program, does it change the way we design. When we significantly change the way we design—a major paradigm shift occurs. This change has been brewing for over ten years, but only now is it about to happen.

What is async programming?
Async programming uses asynchronous method calls instead of synchronous calls especially for potentially long-running methods. The idea: you make an asynchronous call and then provide a mechanism to run code when the result returns. Async programming is necessary for responsive browser, mobile, and upcoming Metro style apps that are mono-threaded as well as for intensive multi-threaded server applications. When all components are async, it can be fluid, natural, and resilient.

Why is async design the next major paradigm shift?
The main reason is that it helps satisfy a strong and growing need: to make use of multi-core processors and to make mono-threaded user interfaces highly responsive. In-browser apps allow only one thread.  Async programming makes both possible. New mechanisms for async programming in upcoming C# 5.0 makes it much easier. Asynchrony dramatically affects design.

The shift also follows a surprising progression. Realize that for the past 50+ years, we have had stable high-level programming elements: data, functions, and threads; although combining them was a challenge.

Even though structured programming and design (SP/SD) techniques are still used today, before the mid 90's, it was the conventional or mainstream way to build applications. The problem: structured design treated data, functions, and threads as complete separate abstractions.

Today, object-oriented programming and design (OOP/OOD) techniques are the conventional way to build applications. Object-oriented programming and design combine data and functions into a single mechanism: the class or object.

Async Programming and Design (AP/AD) gives us a simple way to combine all three into a simple unified mechanism. An async object or agent consists mostly of asynchronous method calls. New mechanisms in async programming make it easy to combine data, functions, and threads.

These paradigm shifts (structured, object-oriented, and async) have gradually combined these high-level programming elements. Each paradigm shift has always started with changes to programming, and then to our designs. Only when it moves to design do we realize that a paradigm shift has occurred.

High-level programming elements in relation to paradigm shifts.
If this is truly the progression, then async programming will lead to async design. It might also hold true that async design is a natural evolution in computational thinking. Moreover, it provides an easy way to map to multi and mono-threaded applications and to avoid deadlock, latency issues, and race conditions.

Why is it about to happen?
It is about to happen because great mechanisms for Async Programming are about to become mainstream that will make it much easier. And once async programming becomes mainstream, then so will async design. Our designs are about to significantly change and a major paradigm shift will follow. This has been brewing for over ten years. Just as with structured design and object-oriented design, it took over ten years for it to evolve and become mainstream.

What are the implications?
Today, best of breed architectures consist of a directed-acyclic graph (DAG) of object-oriented components. Fully async objects or agents can help flatten this DAG of components reducing overall dependencies. Realize that most of today’s software architectures are probably not the best of breed.

Looking back, structured design led to some of the least desirable forms of cohesion and coupling. OOP/OOD led to much more desirable defined shapes of software. For me, the revelation at a time of uncertainty for the OOP/OOD paradigm shift was that it naturally led to more desirable forms of cohesion and coupling.

One of the key benefits of Async Design is that it leads to even better shape, and reduces overall dependencies. Flattening the DAG will be the required for ever-increasing architectural complexity. Great software design will, eventually, require software intelligence.

Asynchronous systems are radically different and will require new patterns, architectural viewpoints, mechanisms, and education. Unlike synchronous systems, asynchronous systems will not be halted like an assembly line due to a single point of failure or delay. Asynchronous systems will be even a truer reflection of the way a real company operates—like an organism—not an object-oriented an system.

A new category of software patterns will emerge. These new patterns will help us deal with more autonomy and system intelligence.

We will begin to design fully autonomous objects that consist primarily of async methods that leverage mono and multi-threaded environments.

Where can you go from here?
Change the way you program and it will change the way you design. Check out some of the resources below for more information on async programming for .NET.

You know you are close to crossing this chasm within your company or team when the last objection is performance. Unbelievably, functions were thought too costly for structured programming and dynamic binding was thought too costly for object-oriented programming. Once people overcome the performance objections of asynchronous methods, we will know that the industry is about to shift.

Soon, great designs that are fluid, intelligent, natural, and resilient will be async.

Where ever we go, make the most of it. If you do not enjoy programming and design, then you are probably doing something wrong.

Additional Resources
Async CTP (can be used with .NET 4.0)
Metro async/await 
C# 5.0
C# Specification



What is the key to developing great mobile apps?

The key is focus. You must find the essence of the product. You must deliver the key features needed—not all of them—just the essential ones. It requires focus because that is what people want and expect. People want the NUI (Natural User Interface) experience to be better, simpler, and to satisfy their goals in a simple natural way. Just because there is room for another link, gadget, button, or ad, does not mean you should add it. The friction that is created, conceptual weight, and maintenance usually don't justify it. It is just a different way of thinking. Simple, minimal, and beautiful—the attributes all apps should have. By focusing on what is important, you could even change your whole company. Focus leads to great design.

Five perspectives why Build could be the best conference ever


Build is a new Microsoft conference that replaces the PDC (Programmers Developer Conference), and also possibly combines MIX and even WinHEC (Windows Hardware Engineering Conference) moving forward. The idea for the first Build: combine developers, designers, and hardware partners to create a new platform and a unified ecosystem around Windows 8. Build 2011 is in Anaheim, CA from 9.13 – 9.16.

Build sold out by the end of August even though there is no real agenda defined yet—even now two days before the conference begins.  While Windows 8 has been demoed and talked about before, Microsoft is keeping most of the details to be revealed at Build (Source, Source). We do know that it will be about Windows 8. Windows 8 or whatever it might be called could be a radical departure from traditional Windows architecture and create an entirely new ecosystem.

Five perspectives why Build could be the best conference ever

Perspective #1: Personal

One of the main reasons why I switched from Java to .NET over seven years ago is because of the CLR. When Microsoft originally launched .NET, I thought, “Wow, Microsoft finally has great technology and it is the CLR with .NET. Eventually, I know it will become Microsoft’s future platform someday.” I went out and bought a copy of the original Visual C# .net that was launched in 2002 to begin learning C# and the .NET framework.

In my view, the CLR is great technology.  Microsoft had dedicated big resources to .NET, Visual Studio, CLR, etc. The CLR is fundamental technology that now makes many things now possible such as the Azure fabric controller, which is really a utility of computing by hosting CLRs in different roles.

Could the CLR be the future of Windows 8 as well? Will the CLR become the future of Microsoft’s platform? What will Microsoft’s core API be for Windows 8? How radically different could it be? What is the name of it? Rumors of Silverlight’s death been greatly exaggerated?

As it could turn out based on a leaked Windows 8 build (Source), Hyper-V will run both Windows 8 and the traditional Windows (think 7 branded as 8) side-by-side—not one on top of the other. The distinction is important. This traditional Windows is said to not even load until it is touched.

Therefore, Windows 8 could be a CLR with a new framework based on top of DirectUI and a XAML based NUI (Natural User Interface). Could it be the CLR a top MinWin? It appears that this Modern Shell will not sit on top of Win32. It will likely be a departure. Windows 8 will also need to incorporate XNA. XNA an Silverlight can be mixed even with Windows Phone 7.

I have also been using Silverlight for the past 3 years. I want to find out if it is the primary way to develop for Windows 8 and what are the other ways? Is there HTML5 tooling?

No doubt, Java developers are doing just fine especially with mobility dev.  Some of my Java friends must be at least a little curious about this conference. My plan is to live blog the entire event (details at end the end of the post).

The great thing from a personal perspective: I will have a front row seat to find out that I could be very wrong Windows 8. Either way, it will unfold in a couple of days.

Perspective #2: As a Developer and Designer

 From a developer and designer perspective, a week of energy, time, and focus dedicated to understanding many new technologies and a new ecosystem that could potentially unify the three screens (with NUI) and the cloud. Think NUI with Xbox 360 and Kinect. As a developer, the CLR, .NET, Visual Studio, and other frameworks makes it easier to develop for Windows 8, Mango, and potentially the Xbox. Clearly, development will be much easier with better technology when compared to iOS development. This factor should help the ecosystem grow.

Some of the new technology areas and sessions to attend (although no session titles announced yet):

  • RedHawk (Source)
  • Jupiter
  • AppX
  • Visual Studio 2012
  • Expression Blend/Web Next
  • New Windows 8 frameworks and APIs
  • MOSH (MOdern SHell) Design
  • Azure

I will post more of these with sources.

Perspective #3: Product Development

From a new product development perspective, there could be many new product opportunities for this new ecosystem with a marketplace that could unify an API and tools for Windows Phone, Xbox, PC, and tablet.  Clients are already waiting for Windows 8 for a possible large field deployment.

The screens combined with Azure can create new opportunities for consumer and line of business apps. This new ecosystem will provide opportunities and potential for new products.

Perspective #4: As a User

From Windows 8 user perspective, it will be interesting to experience and review Windows 8 in the tablet form factor. The rumor is that a quad core arm HD tablet will be issued to all conference attendees (Source). If it is true, I will take some images and video of the tablet and a review. I will even try to use it to help with the live blogging, email, etc. if possible. I believe that it could finally be a great NUI content creator not just mostly consuming.

No doubt: the iPad is great design with a beautiful form factor. My view is that the experience with a Windows 8 tablet could even be better than the iPad for some of the same reasons why Windows Phone 7 is better than the iPhone.  I look forward to experiencing and reviewing the interface first hand.

Perspective #5: Pure Fun

Build is at the Anaheim Convention center which is just a couple of towns north of where I went to high school. It is a very nice area in Orange County.

The only thing really on the agenda so far is a Tuesday night reception and a Wednesday Party. There should be some great conversations and energy. Sushi!

One other fun factor: all you have to do is give a bunch of geeks a quad core arm HD tablet with Windows 8 and they will go wild (Source). Geeks gone wild.


Live Blog of Build 2011

Follow the live blog (text, photos, audio, and videos) of Build including any geeks gone wild: http://build2011.tumblr.com or http://build2011.tumblr.com/mobile

I have been excited about Windows 8 since Sinofsky showed it off at D9 (Source) in June this year.