May be this is the best time for Microsoft to Open Source the .NET Framework

imageJust read a thoughtful post from OdeToCode / Scott Allen – Where is .NET headed

Scott wrote,

If your business or company still relies solely on components delivered to developers through an MSDN subscription, then it is past time to start looking beyond what Microsoft offers for .NET development so you won’t be left behind in 5 years. Embrace and support open source.

At least, that’s how I see things.

As I commented there, the best move Microsoft could make at this point, with respect to .NET is - to Open Source the .NET Framework. And then launch a program like Apache Incubator around to promote ‘real’ OSS initiatives around the .NET ecosystem.

I believe, the real problem with .NET ecosystem is the unavailability of serious frameworks for solving new age problems - .NET developers are cramped with the non-availability of Proven libraries for Machine Learning, Distributed Processing, Text Processing etc. - Talk about Hadoop, Solr, Lucene, Mahout, Storm, OpenNLP etc - All written in Java and is continuously maturing, despite the fact that Sun started screwing the Java community. The .NET ports for some of these libraries bit the dust long time back, or has very little adoption compared to their prominence in Java ecosystem.

Microsoft is now trying to bridge this gap by bringing in platforms like Hadoop to Azure, and building bridges around the same for .NET interoperability.

CLR and C# are awesome - but MS just can't push forward the development of mature libraries around the same to keep up with the pace of OSS initiatives. The true future of .NET lies in the hand of OSS community at large. Hopefully, if Azure turns out to be a big success story, then Microsoft won't mind open sourcing the Entire .NET stack ;). As Scott pointed in his article,  Azure and related hosted offerings (like Office365) + Windows 8 could become the focus points for Microsoft’s revenue.

It is heartening to see that a number of frameworks like ASP.NET MVC, MEF, EF etc already got Open Sourced. But Microsoft can do better in the OSS world to ensure .NET ecosystem will grow further. I believe a lack of buy in from OSS community at large is there –and Microsoft could reduce the friction a little bit by open sourcing .NET.

Hack Raspberry Pi – How To Build Apps In C#, WinForms and ASP.NET Using Mono In Pi

imageRecently I was doing a bit of R&D related to finding a viable, low cost platform for client nodes. Obviously, I came across Raspberry Pi, and found the same extremely interesting. Now, the missing piece of the puzzle was how to get going using C# and .NET in the Pi. C# is a great language, and there are a lot of C# developers out there in the wild who are interested in the Pi.

In this article, I’ll just document my findings so far, and will explain how develop using C# leveraging Mono in a Raspberry Pi. Also, we’ll see how to write few minimal Windows Forms & ASP.NET applications in the Pie as well.

Step 1: What is Raspberry Pi?

Raspberry Pi is an ARM/Linux box for just ~ $30. It was introduced with a vision to teach basic computer science in schools. How ever, it got a lot of attention from hackers all around the world, as it is an awesome low cost platform to hack and experiment cool ideas as Pi is almost a full fledged computer.  More About R-Pi From Wikipedia.

The Raspberry Pi is a credit-card-sized single-board computer developed in the UK by theRaspberry Pi Foundation with the intention of promoting the teaching of basic computer science in schools. The Raspberry Pi has a Broadcom BCM2835 system on a chip (SoC),[3] which includes anARM1176JZF-S 700 MHz processor (The firmware includes a number of "Turbo" modes so that the user can attempt overclocking, up to 1 GHz, without affecting the warranty),[4] VideoCore IV GPU,[12] and originally shipped with 256 megabytes of RAM, later upgraded to 512MB.[13] It does not include a built-in hard disk or solid-state drive, but uses an SD card for booting and long-term storage.[14] The Foundation's goal is to offer two versions, priced at US$25 and US$35.

Another good introduction from Life Hacker is here

Step 2: Setting up your Development Environment

Let us have a quick look at setting up the development environment.

If you have a physical Raspberry Pi

Raspberry Pi boots from an SD Card. Basically, this means you can transfer an operating system image to an SD Card, and boot your Pi from there. The Raspberry Pi download page lists multiple OS images you can use to load your SD Card. You will need to unzip it and write it to a suitable SD card using the UNIX tool dd. Windows users should use Win32DiskImager. There is a simple guide about how to setup your SD card if you are wondering how to do this. Then, you can connect your Pi device to the TV using an HDMI cable, and can hook up an old USB keyboard to start hacking.

Though multiple images are available in the below mentioned download page, please note that at this point only the Soft-float Debian “wheezy” image can be used to install Mono with out issues. This is because Mono doesn’t support hard-float for Raspberry Pi (simplified version) and some runtime methods like DateTime won’t work if you are using a hard float version. So, you need to download the Soft-Float Debian image and transfer the image file to the SD card. If you feel a bit adventurous, you can try this hard-float port of Mono for the Pi, but it is not supported.

If you don’t have a physical Raspberry Pi

You can still download one of the images from the download page and boot from an emulator like Qemu, which supports ARM architecture.

Get If you are on Windows and if you are not familiar with Qemu, you can download this pre-packaged version of  Qemu + Raspberry Pi from here – How ever there is a problem. The Image file that comes with this download is the Hard float version. As we need Mono to work properly, download the Soft-Float Debian Wheezy image – and copy that to the Qemu folder, and modify run.bat in qemu folder to the below command line to point it to the correct image. (If you downloaded Qemu and Soft Float Debian Wheezy image separately, you can create a handy run.bat). Note that as of this writing, the image Soft float image is 2012-08-08-wheezy-armel.img – You need to modify this accordingly. The –cpu switch specify the CPU architecture, –hda attaches the image as the boot device and –m specifies the memory. I’m allocating 512 256 MB to my virtual machine. (Note: Updated the command line to use 256 memory based on the comment from Peter below)

qemu-system-arm.exe -M versatilepb -cpu arm1176 -hda 2012-08-08-wheezy-armel.img -kernel kernel-qemu -m 256 -append "root=/dev/sda2"

Step 3: Booting the Pie And Installing Mono

Once you boot the Pie, enter the username and password based on the image/distribution you are using (user/password is normally pi/raspberry).  Now, to install mono, we’ll use the apt-get package manager. Let us update and upgrade all the packages before we proceed with the install. Run apt-get with admin permissions, using sudo in the console/terminal.

Each of the below command will take a bit of time - so make sure you've a pressure ball around. And let the force be with you for a successful installation #lol. 
sudo apt-get update --fix-missing

sudo apt-get upgrade --fix-missing

sudo apt-get install mono-complete --fix-missing

Step 4: Writing C#

Assuming you’ve got the installation right - Time to write a little bit of C#. Mono has a CSharp command line (REPL), you can bring it up by typing CSharp. So, just play around. If you are setting this up to teach CSharp to kids in schools (original Raspberry Pi vision), the force is stronger in you than you think (Sorry, HBO is now re-telecasting all the old Star Wards stuff). What ever. Here is my CSharp console. Note that if your DateTime.Now is behaving madly, you never read my above paragraph and you’ve got the wrong OS image.

image

 

Step 5: Write And Compile Your Code – A Windows Forms app

Quit the CSharp console (quit) and start the Window manager by typing ‘startx’ – Never mind if you are already there. This should bring up the Raspberry Pi desktop.  Now, let us create a CSharp file using Leaf pad, a light weight editor in the Raspberry Pi. Either in Run or in a terminal window, type

sudo leafpad /opt/windowapp.cs
And type in some code. Let us create a quick Windows forms application to ensure this is possible in Mono in the Pi.

image

 

Now, let us compile the code using the mono compiler (gmcs). Ensure that you are providing the reference libraries we are importing using the /r switch. This should produce the windowapp.exe executable.

image

 

Cool. Now time to run it via Mono.  This should display a tiny window with width and height 100 – You can drag the corners to see the little Window we created. From here onwards, it is your normal .NET style. Add controls, build apps and have a blast.

image

Step 6: Installing The XSP Web Server For Some ASP.NET Love

Let us now install Mono XSP server so that we can run some ASP.NET code in the Pie, to use it as a tiny web server.  Let us get the XSP bits using apt-get. Fire up your terminal, and type

sudo apt-get install mono-xsp2 mono-xsp2-base asp.net-examples

Which should install XSP.

image

Cool, you got the XSP installed. Now, let us try some ASP.NET stuff in the Pi. Create a new aspx file in /opt folder using Leafpad, as we did earlier. Here is my aspx file, a simple aspx file I copied from Startdeveloper as I was lazy.

image 

Save the file to your /opt folder, and And start XSP2 in the opt folder.  Run XSP2, and open the Internet->Browser and navigate to http://localhost:8080 – You see, it works.

image

 

Conclusion

In this post, we explored how to setup Mono to build and run .NET Win forms and Web applications in the Raspberry Pi. Build a computer to learn .NET and C# for under 40$, huh. Follow me in twitter @ https://twitter.com/amazedsaint – Happy Coding.

BIG DATA for .NET Devs: HDInsight, Writing Hadoop Map Reduce Jobs In C# And Querying Results Back Using LINQ

Azure HD Insight Services is a 100% Apache Hadoop implementation on top of Microsoft Azure cloud ecosystem. 

In this post, we’ll explore

  1. HDInsight/Hadoop on Azure in general and steps for starting with the same
  2. Writing Map Reduce Jobs for Hadoop using C# in particular to store results in HDFS.
  3. Transferring the result data from HDFS to Hive
  4. Reading the data back from the hive using C# and LINQ

Preface

If you are new to Hadoop and Big Data concepts, I suggest you to quickly check out

There are a couple of ways you can start with HDInsight.

Step 1: Setting up your instance locally in your Windows

For Development, I highly recommend you to install HDInsight developer version locally – You can find it straight inside the Web Platform installer.

Once you install the HDInsight locally, ensure you are running all the Hadoop services.

image

Also, you may use the following links once your cluster is up and running.

Here is the HDInsight dashboard running locally.

image

And now you are set.

Step 2: Install the Map Reduce package via Nuget

Let us explore how to write few Map Reduce jobs in C#. We’ll write a quick job to count namespaces from C# source files Earlier, in a couple of posts related to Hadoop on Azure - Analyzing some ‘Big Data’ using C# and Extracting Top 500 MSDN Links from Stack Overflow – I showed how to use C# Map Reduce Jobs with Hadoop Streaming to do some meaningful analytics. In this post, we’ll re-write the mapper and reducer leveraging the the new .NET SDK available, and will apply the same on few code files (you can apply that on any dataset).

The new .NET SDK for Hadoop makes it very easy to work with Hadoop from .NET – with more types for supporting Map Reduce Jobs, For creating LINQ to Hive queries etc. Also, the SDK provides an easier way to create and submit your own Map Reduce jobs directly in C# either to the local developer instance or to Azure Hadoop cluster. 

To start with, create a console project and install the Microsoft.Hadoop.Mapreduce package via Nuget.

Install-Package Microsoft.Hadoop.Mapreduce

This will add the required dependencies.

Step 3: Writing your Mapper and Reducer

The mapper will read the input from the HDFS file system, and the writer will emit outputs to HDFS. HDFS is Hadoop’s distributed file system, which guarantees high availability. Checkout the Apache HDFS architecture guide for details.

With Hadoop SDK, now you can inherit your Mapper from the MapperBase class, and Reducer from the ReducerCombinerBase class. This is equivalent to the independent Mapper and Reducer exes I demonstrated earlier using Hadoop streaming, just that we’ve got a better way of doing the same. In the Map method, we are just extracting the namespace declarations using reg ex to emit the same (See hadoop streaming details in my previous article)

    //Mapper
    public class NamespaceMapper : MapperBase
    {
        //Override the map method.
        public override void Map(string inputLine, MapperContext context)
        {
            //Extract the namespace declarations in the Csharp files
            var reg = new Regex(@"(using)\s[A-za-z0-9_\.]*\;");
            var matches = reg.Matches(inputLine);

            foreach (Match match in matches)
            {
                //Just emit the namespaces.
                context.EmitKeyValue(match.Value,"1");
            }
        }
    }

    //Reducer
    public class NamespaceReducer : ReducerCombinerBase
    {
        //Accepts each key and count the occurrances
        public override void Reduce(string key, IEnumerable<string> values, 
            ReducerCombinerContext context)
        {
            //Write back  
            context.EmitKeyValue(key,values.Count().ToString());
        }
    }

Next, let us write a Map Reduce Job and configure the same.

Step 4: Writing your Namespace Counter Job

You can simply specify your Mapper and Reducer types and inherit from HadoopJob to create a job class. Here we go.

   //Our Namespace counter job
    public class NamespaceCounterJob : HadoopJob<NamespaceMapper, NamespaceReducer>
    {
        public override HadoopJobConfiguration Configure(ExecutorContext context)
        {
            var config = new HadoopJobConfiguration();
            config.InputPath = "input/CodeFiles";
            config.OutputFolder = "output/CodeFiles";
            return config;
        }
    }

Note that we are overriding the Configure method to specify the configuration parameters. In this case, we are specifying the input and output folders for our mapper/reducer – The lines in the files in input folder will be passed to our mapper instances, and the combined output from the reducer instances will be placed in the output folder.

Step 5: Submitting the job

Finally, we need to connect to the cluster and submit the job, using the ExecuteJob method. Here we go with the main driver.

class Program
    {
        static void Main(string[] args)
        {
            var hadoop = Hadoop.Connect();
            var result=hadoop.MapReduceJob.ExecuteJob<NamespaceCounterJob>();
        }
    }

We are invoking the ExecuteJob method using the NamespaceCounterJob type we just created. In this case, we are submitting the job locally – if you want to submit the job to an Azure HDInsight cluster for the actual execution scenario, you should pass the Azure connection parameters. Details here

Step 6: Executing the job

Before executing the job, you should prepare your input – in this case, you should copy the source code files in the input folder we provided as part of the configuration while creating our Job (see the  NamespaceCounterJob). To do this, fire up the Hadoop command line console from the desktop. If your cluster is on Azure, you can remote login to the cluster head node by choosing Remote Login from the HDInsight Dashboard.

  • Create a folder using the hadoop fs –mkdir input/CodeFiles command
  • Copy few CSharp files to your folder using hadoop fs –copyFromLocal your\path\*.cs  input/CodeFiles

See I’m copying all my CS files under BasicsRevisited folder to input/CodeFiles.

image

Now, build your project in Visual Studio, open the bin folder and execute your exe file. This will internally kick start MRRunner.exe and your map reduce job will get executed (The name of my executable is simply MapReduce.exe). You can see the detected file dependencies are automatically submitted.

image

Once the Map Reduce job is completed, you’ll find that the combined output will be placed in output/CodeFiles folder. You can issue the –ls and –cat commands to list the files and view the content of the part-00000 file where the output will be placed (Yes, a little Linux knowledge will help at times Winking smile). The part-00000 file contains the combined output of our task – see the name spaces along with their count from the files I submitted.

image

Step 7: Loading data from HDFS to Hive

As a next step, let us load the data from HDFS to Hadoop Hive so that we can query the same. We'll create a table using the CREATE TABLE hive syntax, and will load the data. You can run ‘hive’ command from the Hadoop command line to run the following statements.

CREATE TABLE nstable (
  namespace STRING,
  count INT)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY '\t'
STORED AS TEXTFILE;

LOAD DATA INPATH 'output/CodeFiles/part-00000' into table nstable;

And here is what you might see.

image

Now, you can read the data from the hive.

And there you go. Now you know everything about writing your own Hadoop Map Reduce Jobs in C#, load the data to the Hive, and query the same back in C# to visualize your data.  Happy Coding.

Reflection API Changes in .NET 4.5 Applications and Fun with Custom Reflection Context

imageBefore .NET 4.5, as you are aware, the Type class in System namespace was used for most of the reflection scenarios. Though you can use Type class to inspect meta data, this is really heavy weight. As most reflection scenarios are just read only (for example, using attributes for providing meta data etc),  Microsoft decided to introduce a light weight, alternate Type API as part of .NET Core profile. If you are wondering about different .NET profiles, here is a good list compiled together.

Type and TypeInfo

So to keep the long story short - in .NET 4.5 onwards, Type class got ‘shrunk’ to provide a shallow, high speed read only view of an object’s structure (definition). And TypeInfo class got introduced that contains the actual type definitions with more detailed information. See Type and TypeInfo – and check out the platform specific support for it’s members. You can read more about the Reflection API changes here

The TypeInfo class represents type definitions and the Type class represents type references. Given a Type object, you can get the name of the type as a string, without any requirement to load anything more. Alternatively, if you need rich information about a type, you can get a TypeInfo object from a Type object. 

In .NET full profiles used for desktop and web applications, the old Type API (Accessing everything through Type) is still available to maintain backward compatibility, along with the new Type API (TypeInfo etc). And For .NET Framework profiles for new platforms like WinRT that don’t need backward compatibility, Type class got shrunk by removing a number of members as discussed, and TypeInfo is the only way to dive deep into reflection. If you are writing code that should target multiple framework versions (as in Portable Class Libraries), you should use the new API. Otherwise, you can continue to use the old API as .NET framework versions on full profile actually returns the self contained Type object as previously.

Using TypeInfo

You may call GetTypeInfo on any type object as shown below to get the TypeInfo for a Type, and may use the new API (like DeclaredProperties) to traverse the members.

	//Get the basic type
        Type myType = "somestring".GetType();

        //Get more information about that type
        TypeInfo myTypeDetails = myType.GetTypeInfo();

        foreach(var prop in myTypeDetails.DeclaredProperties)
            {
                Console.WriteLine(prop.Name);
            }

Also, you may use TypeInfo to check the relations between types. For example, here is how to use IsAssignableFrom method of TypeInfo to determine variance.

  //Can I assign a string to an object - True
   var canAssignStringToObject = typeof (object).GetTypeInfo()
                                  .IsAssignableFrom(typeof (string));

  //Can I assign an object to a string - False
  var canAssignObjectToString = typeof(string).GetTypeInfo()
                                 .IsAssignableFrom(typeof(object));

Custom Reflection Context

Custom Reflection Context is a new addition in .NET 4.5, to customize how a consumer using the TypeInfo based new Reflection API views reflected information about your types. This will be extremely helpful when you write Libraries and design components that take advantage of meta data. This is much like customizing Type information using techniques like type descriptors. The new API provides run time virtualization over reflection, and looks quite intuitive - I wish this was there when we spend years writing custom tools for extending Visual Studio few years back, to virtualize type information for existing and new components.

You can override properties in CustomReflectionContext to add virtualized properties, custom attributes etc. For example, here is a quick PropertyAdder context that’ll inject some properties while accessed through the custom reflection context

.
    //Just a dummy Dog class
    //See that we don't have any properties
    class Dog
    {

    }

//A PropertyAdder context
    //To add custom properties to the reflection context
    class PropertyAdder : CustomReflectionContext
    {
        private readonly Dictionary _properties;

        public PropertyAdder(Dictionary properties)
        {
            _properties = properties;
        }

        protected override IEnumerable AddProperties(Type type)
        {
            if (type == typeof(Dog))
            {
                foreach (var p in _properties)
                {
                    yield return
                        CreateProperty(MapType(p.Value.GetType().GetTypeInfo()),
                                       p.Key,
                                       (o) => _properties[p.Key],
                                       (o, v) => _properties[p.Key] = v);
                }
            }
            else
            {
                base.AddProperties(type);
            }
        }
    }

And here is a quick example for using our PropertyAdder. Essentially,

  • We are creating a new instance of PropertyAdder
  • Then decorating our Dog class’s type information by mapping the type information via the custom reflection context.
  • Finally, we are creating an instance of Dog class, and look ma- we’ve got the properties via reflection

So, here we go.

    //Main Driver
    class Program
    {
        static void Main(string[] args)
        {

            //Properties we want to add
            var properties = new Dictionary
                {
                    {"Name", "Joe"},
                    {"Age", 10}
                };

            //An instance of our custom reflection context
            var adderContext = new PropertyAdder(properties);

            //Get the type in the default reflection context.
            var dogTypeInfo = typeof (Dog).GetTypeInfo();

            //Get the type in the customized reflection context.
            //We'll map the context with our PropertyAdder
            var customDogTypeInfo = adderContext.MapType(dogTypeInfo);


            //Just an instance
            var d = new Dog();

            //Display properties and values using custom reflection context. 
            foreach (var prop in customDogTypeInfo.DeclaredProperties)
            {

                //We'll really see the properties we added above
                Console.WriteLine("{0}={1}",prop.Name, 
                    customDogTypeInfo.GetProperty(prop.Name).GetValue(d));
            }

            Console.ReadLine();
        }
    }

And here is the output. You’ll see that we are accessing the properties we added via the reflection context. Here you go.

image

So this is fun especially when you work with libraries that leverage meta data and on the tooling side. For example, the RegistrationBuilder class in MEF 2.0 inherits custom reflection context to provide meta data based conventions that describes rules for decorating entities.

Happy Coding Smile. Also, see my other C# posts here

Azure Hadoop HDInsight Tools – Wrote A VS Add In For LINQ To Hive Model Generation and Hive SQL Queries

imageThis post is about the HD Insight Tools Visual Studio Add In -  for accessing Azure Hadoop Hive  from Visual Studio. I hacked together the same on my way back from the MVP summit, and a post is due. If you are new, last week I wrote about issuing LINQ queries against the Hive meta store – read that post for a general introduction about LINQ to Hive.

You may use HDInsight Tools Visual Studio Add In for

  • Generating wrapper classes for Hive tables for easily executing LINQ to Hive queries.
  • Running Hive SQL queries from Visual Studio and for viewing the results

Please note that you need to provision a Hadoop cluster in Azure, or need HDInsight installed locally (See these earlier posts related to Hadoop on Azure - Analyzing some ‘Big Data’ using C# and Extracting Top 500 MSDN Links from Stack Overflow ).

Installing The Add In

You can install the Add In from Visual Studio Tools –> Extensions and Updates.

image

 

Generating LINQ To Hive Model Classes

Once you install the Add In, Goto View-> Other Windows –> Hive Explorer to bring up the Hive Explorer tool Window. Click Add Connection to add a hive connection, by providing the server details, port, user name and password and click Save.

image

Once you add a connection, you can expand the connection to view the tables and fields in the Hive. Now, you can right click on the Added connection name in the tool Window, and click ‘Generate Code’ context menu to generate the model classes. Also, make sure you install the Microsoft.Hadoop.Hive nuget package by issuing the install-package Microsoft.Hadoop.Hive –pre nuget command.

image

You can use the generated model to query Hive using LINQ as mentioned in the previous article.

Issuing Queries

You can use the Queries window of Hive Explorer to issue Hive Queries. Choose the connection in the combo box, and shoot your query to view the results.

image

Happy Coding. I’m soon uploading the source code of Hive Explore to Github after some clean up once I’ve some time. Smile

About That ‘Feelings’ In Software Industry

imageWhen I read Built to Last few years back, I got stumbled upon this fact – it is all about building a cult. And a cult is not a bad thing. You can base it on some ethical values, and can sprinkle stories and sutras around the same to make it more exciting. Or, you may brand it as your corporate culture. But in the end of the day, it is all about building a cult which looks original and rallying your employees and customers around the same with out shaking their belief.

In the last ten years, Steve Jobs did that much better than any one else. I think he learned about the art of creating a cult when he was wandering in India, may be from Neem Karoli Baba. Today, people worship Apple.

I believe successful organizations are good in assembling together such a framework that can yield repeatable behavioral patterns from all stakeholders, most importantly, customers. Any successful organization need at least one iconic leader with charisma to grow beyond mediocrity. People buy a brand not just because of its usability – They buy or act when they believe in the cult of the brand, when they buy in to that ideology and find the trust.

As Simon points out in this Ted Talk, great leaders inspire action – they inspire employees and customers and other stake holders to align with the cult or self of the organization. I think the justification for all this lies deep with in, we are wired to follow a cult. For example, our feelings and instincts influence a purchase decision – probably much more than the numbers we have in our head.

So, I believe everything from Brand loyalty to architecture decisions are influenced by aspects like peer recommendations and herd mentality in a big way. That’s why a number of CXOs invest in ‘Big Data’ and ‘Cloud’ with out knowing the intricacies.

Even software has it’s FADs right now. So, it is of no surprise that the industry is also driven by its own fashions and styles at times. Some of these FADs will burst as bubbles. Who cares. The world works on chaos theory, and it is not really predictable all the time – so decisions based on gut feeling and intuitions are acceptable to some extent, isn’t it? Though, generally I don’t recommend subjectivity over objectivity.

AutoCommand For MVVM – More tricks With Lambdas and CallerMemberName

imageFew days back I ranted about Lamdba Patterns in C# and Init Time branching.  I also had a generally insane example regarding Init Time branching using CallerMemberName attribute, and got few comments about the usefulness (or the lack of the same).

While I generally agree with the comments, here is a may be useful, still crazy AutoCommand for your next basement MVVM application. First, here is how the AutoCommand will work.

 

//Our simple View Model
public class SimpleMathViewModel : BaseViewModel
    {
        public SimpleMathViewModel()
        {
            Commands = new Dictionary<string, Action>
                {
                    {"Add", ()=>Result=A+B},
                    {"Substract", ()=>Result=A-B},
                    {"Multiply", ()=>Result=A*B},
                    {"Divide", ()=>Result=A/B}
                };
        }

        //Your commands should get automatically wired up

        public ICommand Add { get { return new AutoCommand(this); } }
        public ICommand Substract { get { return new AutoCommand(this); } }
        public ICommand Multiply { get { return new AutoCommand(this); } }
        public ICommand Divide { get { return new AutoCommand(this); } }

        //Other blah blah properties
        public int A { get; set; }
        public int B { get; set; }

        private int _result;
        public int Result
        {
            get { return _result; }
            set
            {
                _result = value; OnPropertyChanged();
            }
        }
    }

Also, Look ma, there is no dirty property name string in the OnPropertyChanged method call to raise the PropertyChanged notification as it is inferred  - but I'm sure you might have read some where else how to use CallerMemberName to do the trick. If you are still wondering, see the method implementation in the BaseViewModel code below.

Leaving that aside – how’z the wiring works for AutoCommand? Alright, guess you guessed it. Here is the AutoCommand implementation.

   public class AutoCommand : ICommand
    {
        private readonly BaseViewModel _instance;
        private readonly string _caller;

        //Just keep the caller name and the base view model instance
        public AutoCommand(BaseViewModel instance, 
                [CallerMemberName]string caller = "")
        {
            _instance = instance;
            _caller = caller;
        }

        public bool CanExecute(object parameter)
        {
            return true; //who cares
        }

        //Fetch the right command to execute from the dictionary
        public void Execute(object parameter)
        {
            _instance.Commands[_caller](); //get the ICommand based on the caller name
        }

        public event EventHandler CanExecuteChanged;
    }

 

And if you are wondering how we've implemented the BaseViewModel, it is trivial. There only interesting piece there is how we inject the property name to the base class method.

 public abstract class BaseViewModel : INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;
        public Dictionary<string, Action> Commands { get; set; }

        protected virtual void OnPropertyChanged([CallerMemberName]string propertyName="")
        {           
            PropertyChangedEventHandler handler = PropertyChanged;
            if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName));
        }
    }

This is not a best practice show case, was just discussing a language feature and few possibilities. Happy and Insane coding Smile

A Quick introduction to Hadoop Hive on Azure and Querying Hive using LINQ in C#

imageEarlier, in a couple of posts related to Hadoop on Azure - Analyzing some ‘Big Data’ using C# and Extracting Top 500 MSDN Links from Stack Overflow – I showed how to use C# Map Reduce Jobs with Hadoop Streaming to do some meaningful analytics.

Now, a preview version of the .NET SDK for Hadoop is available, making it easier to work with Hadoop from .NET – with more types for supporting Map Reduce Jobs, For creating LINQ to Hive queries etc.  You can experiment with Hadoop and C# either by creating a cluster in http://hadooponazure.com or you can obtain Hadoop in your machine by installing Microsoft HDInsight using WebPI.

In case you are new to Hadoop on Azure, I suggest you read the introductory concepts here before you start. This post is just a quick example that shows how to use LINQ to Hive.

Hive is a data warehouse system for Hadoop that facilitates easy data summarization, ad-hoc queries, and the analysis of large datasets stored in Hadoop compatible file systems

Installing the libraries

To start with, you can fire up Visual Studio, Create a console project, and install Microsoft.Hadoop.Hive libraries via Nuget.

install-package Microsoft.Hadoop.Hive -pre 

Also, head over to http://hadoopoonazure.com and create a new cluster. And you are now set.

Creating the typed wrappers

To access Hive, you need to create a strongly typed wrapper – as of now, you need to roll this out your own, as there is no automated generation support. When you provision a Hadoop cluster, the Hive will be pre populated with a sample table (hivesampletable), and I’m using the same for the below example for brevity.  You can connect to the Hive via ODBC and see the hive tables in Excel.

So, let us go ahead and create a hive connection (much like an EF data context) and a typed representation for a row in the table. HiveConnection and HiveTable types are in the Microsoft.Hadoop.Hive namespace.

    
    //Our concrete hive connection
    
    public class SampleHiveConnection : HiveConnection
    {
        public SampleHiveConnection(string hostName, int port) 
            : base(hostName, port, null, null) { }

        public SampleHiveConnection(string hostName, int port, 
                            string username, string password) 
            : base(hostName, port, username, password) { }

        public HiveTable<DeviceInfo> DeviceInfoTable
        {
            get
            {
                return this.GetTable<DeviceInfo>("hivesampletable");
            }
        }
    }

    //A typed row. Property names based on field names hivesampletable
    
    public class DeviceInfo : HiveRow
    {
        public string DevicePlatform { get; set; }
        public string DeviceMake { get; set; }
        public int ClientId { get; set; }
    }

Querying the Hive using LINQ

Now,  you may perform LINQ queries against your Hive context, thanks to the Hadoop SDK we installed via Nuget. Just make sure to substitute the connection string, username and password with your own.

class Program
    {
        static void Main(string[] args)
        {


            //Create a hive connection
            //I've my cluster in https://www.hadooponazure.com
            var hive = new SampleHiveConnection(
                    "saintcluster.cloudapp.net", //your connection string
                    10000,                       //port                    
                    "user",                      //your username
                    "yourpass");                 //your password


            //Get the results
            //Make sure you goto the dashboard and turn on the ODBC port
            var res = from d in hive.DeviceInfoTable
                      where d.ClientId < 100
                      select d;

            //Dump it to the console if you like
            var list = res.ToList();     

        }
    }
That is cool. Your LINQ query will be submitted to the Azure cluster via the ODBC driver, and will be compiled and executed in the Hive.

Book Reviewed - Kinect for Windows SDK Programming Guide By Abhijit Jana

Recently, Abhijith Jana published his Kinect For Windows SDK Programming Guide – And I’m one of the three technical reviewers. The Book is very pictorial in the explanations, with crisp code samples and cited annotations. I was particularly impressed with the way Abhijit tied the features of Kinect with Real use cases. The book covers all the hardware and software aspects, with lot of illustrations and examples. I liked the easy to understand, simple narration followed by Abhijit.

The Tone of the book

He starts with unpacking the Kinect, introducing you to the hardware and software components. And in the next couple of chapters, he is slowly familiarizing you to the camera, making sense of the color and depth image streams, Skeleton tracking, Speech API, Gesture detection etc. The book also covers various third party Kinect related APIs (including Coding4Fun Kinect Toolkit, few Gesture Libraries etc).

The last couple of chapters is all about what you can build using Kinect, with some cool examples that demonstrates how to interface Kinect with multiple platforms including Azure, Windows Phone and few Micro Controllers. There are a number of cool graphics/illustrations to enable readers to visualize various aspects like depth detection, gesture detection etc.

About the Content

More importantly, I believe this turned out to be a practical guide for any one to write real world applications using Kinect. One of my observations during the review stage was to include a lot of practical examples.  I am glad to see these countless examples in the book and should commend Abhijit for his hard work. There are lot of practical scenarios covered, including

  • Using Kinect Windows SDK to build gesture capabilities in your Windows applications
  • Adding night vision using IR sensors
  • Audio processing
  • Building an intrusion detector using Kinect
  • Using Kinect Speech recognizer capabilities to integrate Speech detection
  • Making Kinect and Netdunio work together to have some serious fun etc.

I recently showed this book to some enthusiasts during my “Natural User Interface using C#” sessions in Rutgers as well as in Cupertino, and the response was quite amazing. As it assumes no prior knowledge in NUIs, this was a good starting point for a number of hackers. Also, one startup I met in CA mentioned that they are building a 3D Scanner in Kinect to use with the 3D printers, by extracting the point cloud and to convert the same to a 3D format that can be passed to the printers.

I may be a bit biased about the book as I was working with Abhi very closely for the review, but I suggest you to have a look at Amazon listing and see the reviews there. Suggest you should buy the same, if you ever tried hacking cool stuff. Or, what about building interactive Advertisement boards using Windows 8? Or a private intrusion detector for your home? Just Go ahead and buy one. – I’m so confident that you’ll love it..

Lambda patterns in C#?

I had few interesting discussions during the MVP Summit around using patterns from other programming languages in C#. Earlier, I’ve blogged about some of these scenarios.image

I’ve over heard Florian’s session this time during the summit, where he elaborated few interesting patterns from Java script that could be used in C#. He has a pretty good Code Project article regarding the same – Way To Lambda – and it is pretty good to see a formalized approach towards re-using these patterns in C#

One of my favorites is the C# version of Init-time branching (See Javascript Init time branching here)

   enum Mode
    {
        Http,
        WebSocket
    }

    class Messenger
    {

        public Func<string> Read { get; private set; }

        public Messenger(Mode m)
        {
            if (m == Mode.Http)
            {                
                Read = ()=>"Stub read logic using http"; 
            }
            else
            {
                Read = () => "Stub read logic using websocket";
            }
        }
    }

The above is a very simple version of Init time branching – but Instead of setting up the method (in this case the Read method) based on some configuration parameter, you can inject the same via the constructor or to the property – and in this way abstract out the branching as part the DI.

Convention Based Strategy Pattern *_*

Disclaimer: The remaining portion of the article is just not for regular use cases, and you can easily shoot yourself in the foot.

Now, let us use Init-Time branching to attain some kind of ‘Convention based’ strategy pattern. Branching will be done based on the caller’s semantics. Let us assemble a simple Serializer, that uses some convention based on the caller’s name. Note that we are using the Caller information attributes to extract the caller name.

class ConventionSerializer
    {
        public Func<string> Serialize { get; private set; }

        public ConventionSerializer([CallerMemberName] string memberName = "")
        {
            if (memberName.Contains("Xml"))
            {
                Serialize = () => 
                { /* serialize to xml */
                  return "xml"; 
                };
            }
            else
            {
                Serialize = () =>
                { /* serialize to json */
                    return "json";
                };
            }
        }

    }

And then, you may consume the same from the methods WriteXml and WriteJson.

       static void WriteXml()
        {
            var ser = new ConventionSerializer();
            Console.WriteLine(ser.Serialize()); //output xml
        }

        static void WriteJson()
        {
            var ser = new ConventionSerializer();
            Console.WriteLine(ser.Serialize()); //output json
        }

Was just bringing up an alternate perspective, requesting purists not to get offended. Happy Coding Smile

Portable Library and WinRT support for ElasticObject

image

Read these articles if you are catching up about Elastic Object

image

If you loved using my ElasticObject implementation, here is some good news for you

Ariel Ben Horesh recently added  Portable Library project type and WinRT support for ElasticObject recently. So, enjoy the wicked evilness of ElasticObject in your Portable Libraries and WinRT projects.

Top posts from 2012 – Roundup Post

imageI would like to wish all my readers an amazing 2013 filled with joy and enthusiasm. Here are some of the top 2012 posts/publications

Changing times for web developers

Extracting Top 500 MSDN links from Stackoverflow using Apache Hadoop, Azure and C#

Writing Hadoop Jobs in C#

Introducing Signal Wire

5 Points C# developers should know about WinRT

Introduction to TypeScript for C# developers

Top MSDN links from Stack Overflow

Self hosting Web APIs

XML Driven code generation using C#

Happy Coding Smile

A quick note on Closing lambda loop variables in C# 5.0 - Breaking Changes in C# 5.0 compiler

This pimageost is regarding a breaking change in C# 5.0 related to using variables in lambdas with in a loop.

For example, prior to C# 5.0 compiler, the following code

        
     //** Code Example 1 **
 
     static void Main(string[] args)
        {
            var items = new List<int>() { 1, 2, 3, 4, 5 };
            var queue = new List<Func<int>>();
            foreach (var item in items)
                queue.Add(() => item);
            foreach (var q in queue) Console.WriteLine(q());
            Console.Read();
        
    }
will produce the following output

image

This is because prior the C# 5.0, the compiler closes/captures the reference of the lambda/loop variable than its actual value. And hence the value defaults to the current value at the time of invocation (here, when invoking the q() method) instead of the value at the time of using the variable in the expression (when adding it to the queue). So, earlier, the compiler forced you to declare a local variable in a loop (counter intuitive any day)   because if you want to see the expected output, you need to manually close the variable by assigning it to some other variable, like

    //** Code Example 2 **

   static void Main(string[] args)
        {
            var items = new List<int>() {1,2,3,4,5};
            var queue = new List<Func<int>>();
            foreach (var item in items)
            {
                //Prior to C# 5.0 this was required to correctly
                //capture the value
                var val = item;
                queue.Add(() => val);
            }
            foreach (var q in queue) Console.WriteLine(q());
            Console.Read();
        }
    }

And this should give the output as below.

image

From C# 5.0 onwards, the compiler will capture the value of the variable instead of it’s reference when you use a variable in a lambda expression with in a loop. So, Code Example 1 will provide Output Listing 2 that eliminates the need to capture the value manually, and you can write better code with out being forced to have local variables with in a loop.

‘HTML5 vs. Hybrid vs. Native Dilemma’ When You Build Enterprise Mobile Applications - The Bigger Picture

This post is mainly about building Enterprise Mobile applications. Today I was reading Charlie's post about building mobile applications, and was analyzing the hybrid application scenario from an Enterprise Standpoint.

image

The Bigger Picture

Most of the recent conversations I had about building enterprise mobile applications starts with questions like “Whether I should go Hybrid or Native”. It is true that a lot of organizations are interested to go the ‘hybrid’ way because of cost concerns – but in my opinion, any decision should be customer driven instead of cost driven. So, the answer for this question should be driven by “What will give the best user experience to the end user”, instead or/along with asking questions like “how we can reduce the cost”. This is true for all apps, not just for enterprise mobile apps.

Beyond this, from an Enterprise Standpoint, I think achieving end point independence is another way to reduce your cost and future proof your investments. So, while “HTML5 vs Hybrid vs Native” is just one decision parameter, there are few more parameters to consider when you talk about a mobile strategy. Including,

Concerns during envisioning phase

    1. Target user analysis
    2. Choose a simple framework to begin with, like Forrester’s POST approach
    3. Gap analysis and portfolio rationalization

Deciding a strategy for Mobile Application development & Delivery

    1. Mobile Web/Pure HTML/JS
    2. Hybrid apps (HTML5/JS apps in Native containers  - Like Phone Gap and/or native parts/plugs like in Titanium)
    3. Native apps

Concerns regarding a Common Service Layer

    1. Building/Implementing a scalable Common Service Layer
    2. Implementing a scalable broker system between the service layer and legacy systems
    3. Ensuring standards (like using REST)
    4. Identifying and integrating a Content Delivery Network (CDN) for media delivery

Testing Model

    1. Security and Performance
    2. Device based testing

Submission Governance

    1. Payment model
    2. Keep track of submitted applications
    3. Analytics
    4. Feedback tracking
    5. Continuous improvement

So, all these are parts of your mobile strategy.  Especially when you talk about Enterprise mobility,  achieving Mobile End Point independence is a key concern, and organizations understand the necessity of making their business logic and data available to multiple end points. REST is evolving more and more as a default choice for building a public service layer, around your existing data and intelligence.

Hybrid vs Native

Now, specifically about Hybrid vs Native. Here are the main Pros and Cons as I see it.

For Hybrid applications

Pros:

  • No need for device specific development
  • Better ROI as same code base can be re-used (to an extent) across multiple platforms
  • You can still access some of the device features
  • Can be packaged for additional channels, (Chrome Packaged Apps, Awesonium)

Cons

  • UI specialization is difficult
  • Can’t be as responsive and feature rich as ‘pure’ native applications
  • May hit limitations when implementing specific, optimized features

For Native Applications

Pros

  • High degree of customization, can satisfy edge conditions
  • High degree of usability

Cons

  • Scattered/multiple platforms
  • Investment required for each platform
  • Non unified code base, not much re-usability
  • Teams with multiple skill sets required

And More

That said, again, think beyond the “Hybrid vs Native” point when you think about Enterprise Mobility.

From a Middleware Perspective

  1. Select a strategy where storage and compute resources of your Mobile apps can reside in Mobile devices, on-premises servers and Cloud computing infrastructure.
  2. Use a brokered service for connecting, communicating and brokering between Mobile apps, on-premise resources and Cloud/Middleware environment.
    • Custom implementation on top of brokers like Windows Azure Service Bus
    • Build on a Mobile ready WOA stack like Marlabs Matrix platform
    • Third party Mobile Middle ware platforms like Syclo etc
  3. Use Cloud based federated authentication services and security systems if you need support for multiple authentication providers – Like Azure Federated Authentication.
  4. Adopt cloud/service based push notification services for sending and receiving notifications from your Mobile devices.
  5. Choose a proper content delivery network that supports bit rate streaming to deliver video content. For example, Azure CDN or Limelight True Reach API.
  6. Enable APIs for provisioning, tracking and feedback reporting.

From a Middleware Perspective

Submission governance includes deciding a proper strategy for payment model, usage tracking, analytics and feedback reporting. The Submission Governance should ensure

  • Minimum criteria for submitting an application to the app store
  • Users are heard properly – Feedbacks and ratings should be used for identifying features
  • Releases and updates are following user expectations

So, happy coding!!

Changing Times For Web Developers – 6 Tips You Should Read To Survive

image

The context of this post is about the changing times for a web developer, and I see a lot of web developers still lagging behind especially in the .NET world.  If you haven't yet started mastering your art and adapting to the changing trends, you should start today.

Think about crafting your web applications properly. Use commonsense to mix and match based on scenarios. Here we go with 6 Tips to be a responsible web developer, and to stay on top of what you do.

1 – Learn to write better JavaScript and CSS

If you don’t write proper JavaScript and CSS, you are dead.

Familiarize yourself with a higher level abstraction language to write JavaScript once you are comfortable with plain Javascript – Like CoffeeScript or TypeScript. Also, master the common Javascript libraries, including these essentials

More

Oh yes, start learning TypeScript especially if you have a Microsoft technology/C# background.

On the CSS Side, familiarize with SASS and/or Less –  Skim through the CSS 3 techniques, keep an eye on the CSS 3 features available in various browsers. Understand responsive concepts and start using media queries.

2 – Familiarize yourself with a Responsive Framework

These days, the usage of web is increasing more and more in mobile devices, so most websites are expected to work in different form factors by default. If you don’t want to hand craft all those web pages using media queries, better familiarize yourself with few responsive frameworks.

Responsive web design (often abbreviated to RWD) is an approach to web design in which a site is crafted to provide an optimal viewing experience—easy reading and navigation with a minimum of resizing, panning, and scrolling—across a wide range of devices (from desktop computer monitors to mobile phones)

My personal choices include Twitter Bootstrap and Zurb’s Foundation. I’ve done quite a lot of work with Bootstrap, and I’m pretty impressed with the capabilities of foundation too. 

Essential reads.

3 – Learn the most useful JavaScript MVC frameworks

Be a first class JavaScript developer. There is a jungle of Javascript MVC frameworks out there for client side development, but familiarize yourself with at least five (Yes, at least 5). I’ll pick some of these to start with.

To compare and contrast them, have a look at TodoMVC – I found it pretty useful. It is

A project which offers the same Todo application implemented using MV* concepts in most of the popular JavaScript MV* frameworks of today.

4 – Understand REST and HTTP

Understand Restful services and master a server side technology to create one. For example, Node Js. If you are in the .NET world, start with Web APIs.  More than that, understand proper REST. Understand Hypermedia. Go beyond the terms, and carve out some examples. Tie your REST services with one of the above MVC frameworks, and create something useful. Use proper HTTP codes for your services.

Essential reads

The above reads should help, to start with. Also, keep an eye on implementations, like Meteor, SignalR etc that could leverage Web Sockets once they are ready.

5 – Understand HTML5 Beyond the Buzzword

HTML5 standard is not yet finalized and is still in progress, but already there is lot of adoption every where. Along with developing websites, there are lot of containers available (like PhoneGap etc) that’ll allow you to package your HTML5 applications with a browser like container for mobile devices (hybrid applications), to distribute them much like you distribute native applications.

HTML5 is a markup language for structuring and presenting content for the World Wide Web and a core technology of the Internet. It is the fifth revision of the HTML standard (created in 1990 and standardized as HTML4 as of 1997)[2] and, as of November 2012, is still under development. Its core aims have been to improve the language with support for the latest multimedia while keeping it easily readable by humans and consistently understood by computers and devices (web browsers, parsers, etc.).

There are lot of good articles about HTML5

Familiarize yourself with the most useful and exciting HTML5 Javascript APIs and features. Like Web Sockets, Application Cache, Canvas API, Vide/Audio features etc. Start using something like HTML5 boiler plate as the baseline. http://www.initializr.com/

Understand the HTML 5 features and value adds you can use.

Also watch for the big players in the space who are leveraging HTML5 as a platform for building cross platform hybrid applications – not for web, but also for desktop and mobile.

6 – Optimize

Optimize what ever you do, optimize when you are ready.

Alright, that was lot of tips. So, happy coding.

Meet Ms. Roslyn – Article in DNC Magazine

I wrote a couple of articles here about Ms. Roslyn earlier.  Roslyn provides language services and APIs on top of .NET’s compiler services, and this will enable .NET developers to do a lot more things – including

  • Using C# and VB.NET as scripting languages
  • Use compiler as a service in your own applications for code related tasks
  • Develop better language and IDE extensions etc.
  • Write code analysis and manipulation tools around Visual Studio IDE

See my previous articles on Roslyn

So, I was more than happy to contribute when the Amazing Dotnet Curry Magazine team reached out to me for an article on Roslyn. Go, download and subscribe the DNC Magazine here. It is a free Magazine, and kudos to the great work from Suprotim, Sumit and team for the awesome work they are doing for the community by bringing this out. You can get the magazine issues for free here.

 

image

 

Happy Coding!!

Why I’m truly excited about Windows 8 – It is all about connecting the dots

I think the true pitch of Microsoft is all about connecting the dots – Read a stable cloud platform, a plethora of PaaS offerings, A truly modern and fresh operating system that works seamlessly across multiple form factors, proper interfacing with existing devices like XBox – and all this working together.

image

 

If you are reading this before the Windows 8 launch event – You can watch it live here today (25th October 2012).

Windows 8 versions include

  • Windows 8 (Normal, Pro and Enterprise versions)  that runs on Intel and AMD processors
      • This will be available with most of the PCs, Desktops and hybrids. This can run legacy Windows applications as well along with Metro applications. Has got both Metro and Desktop interfaces.
  • Windows RT that runs on ARM chipsets
      • This version is mainly for tablets, a stripped down version of Windows that can’t run legacy applications. Though this also has a desktop mode, the desktop mode will only support touch optimized Office 2013 apps.

As of now, Microsoft’s own Surface device is available with Windows RT, and a version with full Windows 8 will be available soon.

It is all about Connecting the dots

Make no mistake, today’s Windows 8 release is something that I’m truly excited about. But I’m more excited about the way Microsoft played all these strings together to create a symphony with all their different technologies, to create a connected and co-syncing user experience across devices and platforms - and I think they got it right this time. Along with this, add all the back end and front end platforms (and integrating points) they have for developers to create truly magnificent applications for both enterprise and consumer markets.

This enables a lot of possibilities. Like using my Windows 8/Win RT tablet or phone as a remote control. Like using your television as a second screen for your Tablet. Like chatting about a movie with your friends when you watch it.

See this Smart Glass Video

This wave of releases from Microsoft will connect all your screens together – PCs, TVs (X Box),  Tablets, and Phone (Yea I know, it might take few months for Windows Phone to reach there eventually to provide full Win RT support).

Few key un seen ingredients people miss when they talk about the pitch from Microsoft include

  • A properly baked cloud ecosystem with enough PaaS and SaaS offerings in the backend to co-sync user experiences for both enterprise and consumer market (Azure, Office 365, Sky drive etc)
  • Proper interfacing of Windows 8 with devices like X Box to provide seamless user experience (Smart Glass)
  • Easy integration and up gradation for enterprise customers

A number of devices to choose from

It was a good move from Microsoft to raise the bar with it’s own Surface tablet. Windows 8 enables lot of hardware manufacturers to experiment with new generation hybrid devices, and I believe this new set of Windows 8 PC/Tablet/Laptop convertibles are awesome, and provides a lot of options when you want to pick your Windows 8 or Win RT device. You are not just locked in to Microsoft’s own Surface tablet (Though I may buy one) and it’s form factor.

You have a lot of form factors to choose from, based on what you need. For example, see this 20 inch marvel from Sony.

The productivity factor

I always struggled with my iPad to do serious stuff – When I want to create good presentations, edit documents, and check and reply to my mails. Windows 8/Win RT along with Microsoft Outlook and Office Suite should take my worries away.

The app ecosystem as of now is not as large as what iOS is having – for good and bad. As a developer, I think it is good because my applications will get noticed soon in the Windows market place. As an end user, may be having lot of apps is a good thing – though I’m more interested in quality rather than quantity anyway.

The enterprise features finally will enable a controlled BYOD strategy for enterprises to bank on – so far they were ducking away from the Android and iPad tablets due to the lack of seamless integration with existing IT infrastructure. So I can see my enterprise customers caching in on Windows 8 devices for productivity boost.

© 2012. All Rights Reserved. Amazedsaint.com