What’s new in Visual Studio 2015

Visual Studio 2015 introduces several exciting features. Here’s a list of some of them:

  1. Cross Platform Development.

This is perhaps the biggest and most exciting feature. Although part of it was introduced in Visual Studio 2013 as well but 2015 takes it to next level. Now applications for Windows, Linux, iOS can be created in Visual Studio 2015. It bundles both Apache Cordova and Xamarin Starter Pack. And thanks to windows 10 the apps can run on Windows desktop, tablet, mobile and XBOX One. Pretty soon apps will run on Microsoft HoloLens and Surface Hub as well.

2. ASP.NET 5

ASP.NET uses CoreCLR which allows the web apps to run on Windows, Linux and Mac. MVC wise it comes with version 6. Visual Studio 2015 supports dynamic web development which means no recompilation of the code is required to see the rest of changes made to the source code. Simply save the code and refresh the browser to see the changes.

3. Open Source

.NET Framework went open source quite a while ago even before Visual Studio 2015 hit RTM. Microsoft went with GitHub as the platform for hosting open source .NET Framework Base Class Libraries as well as the compiler (Roslyn).

,

No Comments

MuleSoft Summit 2015 in Toronto

On July 16, I attended a one-day MuleSoft Summit in Toronto. In a nutshell, Mule is trying to add more API management capabilities to their platform. They are not alone in this rather crowded space with IBM, Mashery (the “inventor” of API Management), WSO2, et al, helping companies make their internal APIs and other information assets publicly available. Usually, this is done via RESTful endpoints (deployed in a cloud or on–premise) for consumption by AJAX-wired clients.
Read the rest of this entry »

No Comments

Future of Windows OS

In the past Microsoft focused on releasing a new major version every few years. It has been a risky model since some versions were a major success, like Windows 95/XP/7, where as others have been somewhat of a miss, like Windows Vista/8/Windows Mobile/Windows RT. Also, some organizations used to skip a version in between due to cost and lack of program compatibility.

Based on news it seems like Microsoft has decided to ditch the traditional development cycle and going to stick with Windows 10 for a very long time come. Windows 10 is a platform that will run on a desktop,laptop,tablet,mobile and XBOX. Microsoft plans on adopting a more agile approach which means Windows 10 will see more frequent and mostly smaller changes(iterations). There will still be major changes(releases) but not as huge as coming out with a brand new OS. That’s a more akin to Linux / MAC OS / iOS which should encourage an average consumer and enterprise organization to remain more up to date than things have been in the past. Windows 10 is around the corner and getting shipped sometime this summer. It’s next update us code named Redstone which will come out in two waves in 2016.

,

No Comments

What’s new in C# 6.0

C# has seen several changes since it got launched when .NET Framework came out. e.g. C# 2 had closures (anonymous methods), generics, C# 3 introduced LINQ, C# 5 saw task-based asynchronous pattern and now we have C# 6.0. Although you can enable C# 6.0 in Visual Studio 2013 but it’s not recommended since not all the new features will be available in the older IDE. If you still want to persist with 2013 then the plugin can be downloaded from https://github.com/dotnet/roslyn. The best way to use C# 6.0 is to get Visual Studio 2015. Currently, RC is available for download but the final version isn’t far away.

Here are some of the newer features in C# 6.0

1. Number Literal Formats

How many times did we have to write some number and then count the digits to see if it’s thousand, hundred thousand or million. E.g. in the past we declared numbers like this:

Thousand Comma Underscore

var thousand = 1000;

var tenThousand = 10000;

var hundredThousand – 100000;

var million = 1000000;

I despise counting digits to ensure it’s the right number. C# 6.0 to the rescue now we can declare them like this:

var thousand = 1_000;

var tenThousand = 10_000;

var hundredThousand – 100_000;

var million = 1_000_000;

As you can see an underscore (_) is doing the trick here.

Binary Literals

Binary numbers are easier to write. So, we can use something like this:

int binary_1 = 0b00_00_00_00_00_00_01; // 0x0001
int binary_2 = 0b00_00_00_00_00_00_10; // 0x0001
That will make things a lot easier when it comes to using bit shifting operators. e.g.
i
nt one = binary_2 >> 1; 

2. Declaration Expression

This essentially allows you to declare variables in certain scenarios. E.g. let’s examine int.TryParse
var convertedValue;
var isConverted = int.TrParse(“123”, out converted);
Here, we had to declare “converted” variable upfront before using it in int.TryParse. 
In C# 6.0 now it’s possible to do the same thing in a single line like this:
var isConverted = int.TryParse(“123”, out var converted);
As you can see we were able to use var, or we can use explicit type, along with out keyword.

3. Static Using Statements

We have several static class / functions in C#. e.g. Console, File etc. 
Let’s see how code was written before C# 6.
   1:  using System;
   2:   
   3:  public class Program
   4:  {
   5:      public static void Main()
   6:      {
   7:          Console.WriteLine("Please enter your name");
   8:          var name = Console.ReadLine();
   9:          Console.WriteLine("Welcome, " + name);
  10:      }
  11:  }

In C# 6.0 it’s possible to use static using statements so we don’t have to use static class name over and over again. So, the new code will look like this:

   1:  using System;
   2:  using System.Console; // this line is doing the magic
   3:   
   4:  public class Program
   5:  {  
   6:         public static void Main()
   7:        {
   8:                WriteLine("Please enter your name"); // no need to write Console
   9:                var name = ReadLine(); // no need to write Console
  10:                WiteLine("Welcome, " + name); // no need to write Console
  11:         }
  12:  }

4. Auto Properties with Initializers

auto properties were available in the past. So, we were able to do some thing like this:

   1:  class Country
   2:  {
   3:    public int CountryId {get; set;}
   4:    public int CountryName {get; set;}
   5:  }
   6:   

Auto properties used to have problem when it used to be an array or collection. So, for a collection we had to create a private backing field or we had to use a constructor. With backing field it used to look like this:

   1:  class Country
   2:  {
   3:    public int CountryId {get; set;}
   4:    public int CountryName {get; set;}
   5:    public List<string> Provinces {get; set;}
   6:   
   7:    public Country()
   8:    {
   9:       Provines = new List<string>(); // initializing collection in constructor
  10:    }
  11:  }
  12:   

Now, in C# 6.0 it’s possible to use auto property syntax and initialize it as well in a single line. New code looks like this:

   1:  class Country
   2:  {
   3:    public int CountryId {get; set;}
   4:    public int CountryName {get; set;}
   5:    public List<string> Provinces {get; set;} = new List<string> ;
   6:  }
   7:   

There are several more new features in C# 6.0, like indexed members, element initializer and primary constructors.

,

No Comments

SQL Server 2016

SQL Server is evolving rapidly. Just last year we received SQL Server 2014 and 3 years ago we received SQL Server 2012 and now we are already expecting SQL Server 2016. SQL Server 2012’s main features were Always-On, and Contained databases. SQL Server 2014’s main features were In-Memory OLTP and integration with Windows Azure. Here are some of the main features of SQL Server 2016:

1. Always Encrypted

It’s a security related feature, as obvious from the name. In the past we did have TDE for encrypting the entire database which required creation of encryption keys. In Always Encrypted seems like the encryption key will reside on the application side. More will get know when the preview software gets released.

2. Support for JSON

JSON has become a power house when it comes to data format used for data transfer. XML is already supported by SQL Server as a native data type with XQuery / XPath syntax. Now JSON is getting added to SQL Server 2016 which means a lot smaller footprint, compared to XML.

3. Advanced Analytics, PolyBase, Mobile BI

Business Intelligence is getting more love from Microsoft in SQL Server 2016. PolyBase will allow folks with T-SQL skills to extract value from structured and unstructured data. Data visualization tools will be available on Windows, iOS and Android mobile devices. Exactly how the applications will look like? We will find out soon.

4. Stretch Database

Storage is getting cheaper but still there are cases where we struggle and run out of storage. Stretch database feature allows us to archive data that’s not part of day to day transactions. So we can call the important data “warm transactional data” and rest of it that we want to archive can be called “cold transactional data”. Cold transactional data can be archived to Windows Azure cloud storage. It seems like reports can still be created based of warm as well as cold transactional data.

There are several more features but above features. Waiting anxiously for the preview release which is expected sometime this summer.

, , , , , ,

No Comments

Provisioning Tomcat with the Amazon EC2 Service

In this blog article, I will walk you through the steps required to quickly provision an instance of the Tomcat web server in the Amazone EC2 service. When Tomcat is up and running in EC2, you can upload your WAR (Web ARchive) file that gets automatically deployed and made available for processing HTTP requests from the Internet.

My assumption is that you have an account with Amazon Web Services (AWS) which includes the EC2 service and you have a WAR file that you want to deploy in the cloud.
Read the rest of this entry »

No Comments

Linux Containers

What are Linux Containers

LinuX Containers (LXC) is an OS-level virtualization that allows multiple Linux systems to run on a single physical machine in a multi-tenant arrangement. This type of virtualization is extremely lightweight with every virtual machine (container) being mapped into the booted host OS obviating the need to boot from their own OS image; all the needed resources of the host machine — CPU, the filesystem, system libraries, network access, etc. — are received by containers on a shared basis. Basically, LXC re-uses the same single kernel of the host machine for all hosted containers.
Read the rest of this entry »

No Comments

Standing Up DevOps

While originally DevOps was popularized by Web (Cloud) -based companies, such as Flickr and Netflix, large enterprises, in one form or another, have long been using select DevOps practices.

For deeper penetration of DevOps in the Enterprise space and establishing it as a true enterprise capability, it needs to be placed under control within the existing enterprise governance processes.

For sure, there is no cast-in-stone rules on how to set up the DevOps capability and every organization finds its own organizational form for DevOps. For example,
Read the rest of this entry »

No Comments

DevOps in a Nutshell

DevOps is nowadays a big thing and in this post we will try to explain what this practice is in practical terms.

The term DevOps is rather limiting, indicating that only Development and Operations are involved, which is not absolutely true (as is always the case in this life) — DevOps is not only about Development and Operations!

If you wish, you can view DevOps as

  • a culture, or
  • a cross-team software delivery discipline (paradigm)

In essence, DevOps tries to reconcile the clashing cultures and views on software delivery of Development and Operations that are summarized in the table below.
Read the rest of this entry »

No Comments

Netflix in Flames

Recently I came across this blog post. The title sounded quite intriguing and when reading it, I found some points of interest that I will summarize and present at the end of my blog post.
Read the rest of this entry »

No Comments