04 Cloud Computing Architecture

Let's Cloud Series - 03 Cloud Computing ArchitectureThe Cloud Computing Architecture comprises of many Cloud Components, but we have two main parts of the Cloud Computing Architecture:

  • Front End
  • Back End

Each of them are connected through a network via Internet.

04 cloud computing architecure -  front end vs. back end


Refers to the client part of cloud computing system. It consists of interfaces and applications that are
required to access the cloud computing platforms.
Example: Web Browser.


Refers to the cloud itself. It consists of all the resources required to provide cloud computing services. It
comprises of huge data storage, virtual machines, security mechanism, services, deployment models,
servers, etc.


Migrate your Win/WP 8.1 Apps to Windows 10 (UAP)



In this blog post, we will walk through How to integrate your Windows/Windows Phone 8.1 apps to Windows 10 Apps (Universal App Platform).

“Writing for Windows 10, is writing for all devices.”

First of all, we will have to make some modifications in package.appxmanifest but, unfortunately there’s no tools in Visual Studio CTP and Windows 10 Developer Tools yet.

But, to solve this problem at the meanwhile, there’s a Powershell script is written to do most of work till the full version, and you can get this file from HERE.

After you download the Powershell file, unzip it and place unzipped folder in the C Drive.

And you can get these tools from HERE.

Now, Let’s Start 🙂

  1. Open your Win/WP 8.1 Project and Right Click the project and hit Open in File Explorer.
  2. Click File > Open command prompt > Open command prompt as shown:
  3. Then, write following command.
    And hit Enter.
    This will convert the .csproj to UAP and will update the package.appxmanifest
  4. Now, you will find your project migrated to UAP.
  5. Make some edits in package.appxmanifest by adding uap: before some capabilities and Application Extensions and Protocols like shown below:
  6. And if you are migrating Windows 8.1 App, Change the tile size like shown below:
    Win8.1 Tile size
  7. Before you run, you have to add some extensions to solve Platform Specific issues (e.g phone back button), Right Click References and then hit Add Reference > Universal App Platform > Extensions
    Add: Windows Desktop Extension SDK and Windows Mobile Extension SDK
  8. Now, Run your App, you might face some issues in xaml like Phone Styles, change them to public style that could run in Windows 10 UAP.
  9. About the Charms, they are not existed anymore in Windows 10 with the same UI but, you should replace them with in-app UI for (Search – App Settings – Sharing).

And Here are some tips to put in your consideration while migrating to Windows 10:

  • Don’t forget to add Reference to Platform Extension SDKs, if needed.
  • Review conditional code (#if…) and convert to adaptive code where appropriate.
  • Replace calls to deprecated APIs, if any.
  • Replace references to undefined styles in XAML (as we mentioned above).
  • Update code that integrates with Charms bar.
  • Extend your UI to create a great, adaptive UI that works across multiple device families.(The most Important)

This was a very simple scenario for migrating you Win/WP 8.1 App to Windows 10.
Keep in mind, it’s still a preview 😉

Integrating Cortana | Part 3


In the two previous blog posts, you should be finished of the first two steps of integrating Cortana.

So, in this blog post, you will perform the last step of integrating Cortana and the most important one which is How to Handle the voice commands.

What we did in the two past blog posts is:

  1. We Created the VCD file which contains the Voice Commands Which the user should say to Cortana.
  2. Then, we registered this VCD file on App Startup to let the System/Cortana recognize which command is activated by the user later.

And Now, we will walk through How to Handle the Voice Command when the user Activate it by saying it to Cortana,  in other words, What the action should be performed when the user say a specific Command. Continue reading

Integrating Cortana | Part 2


Integrating Cortana | Part 1

In the previous blog post, we have already demonstrated How to Integrate Cortana through Three easy steps and we walked through the First Step “Create Voice Command Definition File”.
In this blog post, we will walk through the Second Step “Register VCD xml file on App Startup”.

2. Register VCD xml file on App Startup

After Creating the Voice Command Definition File, we have to register this file on App Startup to let the Phone System and Cortana able to Recognize these Commands.

To Register the VCD File:

  1. Open App.xaml.cs
  2. Add this snippet of code in OnLaunced Method

    Uri uriVoiceCommands = new Uri("ms-appx:///vcd.xml", UriKind.Absolute);
    StorageFile file = await StorageFile.GetFileFromApplicationUriAsync(uriVoiceCommands);
    await VoiceCommandManager.InstallCommandSetsFromStorageFileAsync(file);

    And this code should be performed under Try/Catch to Handle Exception Errors.

Continue reading

Integrating Cortana | Part 1

CortanaIn this blog, you will learn How to integrate Cortana into your Windows Phone 8.1 Runtime App.
But, before you integrate Cortana, you have to know Who is Cortana?
So, let me introduce Cortana to you, or actually she will 😀

Who is Cortana?

Cortana is your Digital Personal Assistant, it was developed by Microsoft for Windows Phone 8.1, Microsoft Band and it will be available in Windows 10.
Cortana was announced for the first time at Microsoft BUILD Developer Conference April 2014 and before that she was a character in Halo video game series.

If you have a Windows Phone Device, try asking Cortana “Who are you?” and “Tell me more about yourself.” 😉

Cortana’s Core Functions

Cortana has Three Core Functions:

  1. Communicate
    It can make a call, send text message and text dictation task and so on.
  2. Reminder
    Help the user complete the task now, or help them remember for later.
  3. Find
    Finding content in large catalogs, from large lists, etc…

What can Cortana do?

If you have a Windows Phone Device, try asking Cortana the below commands between the double quotations. Continue reading

App Bar, Rate and Share

In this blog post, you will learn the following:wp_ss_20150316_0001

  • Add App Bar (XAML)
  • Add Rate and Review Button in your App
  • Add more apps Button “related to you on the store”
  • Add App details Button
  • Add Share Button

Let’s get started 😉

Add App Bar (XAML)

  1. Open Visual Studio, Create new project (Windows Phone 8.1 > Blank Template).
  2. In Solution Explorer, Open MainPage.xaml and Add this code outside the main Grid:

Now, you have been created an App Bar but, we need to handle these AppBarButtons 😀

Add Rate and Review Button

In Solution Explorer, Open MainPage.xaml.cs and Add this code in RateBtn_Click event handler:

await Launcher.LaunchUriAsync
 (new Uri("ms-windows-store:reviewapp?appid=" + Windows.ApplicationModel.Store.CurrentApp.AppId));

Add More Apps Button

This button navigates to related apps in the store, maybe other apps for you in the store or any related apps to you using a keyword in store search bar.

Add this code in moreAppsBtn_Click event handler:

string keyword = "Mohammed Emam";
var uri = new Uri(string.Format(@"ms-windows-store:search?keyword={0}", keyword));
await Windows.System.Launcher.LaunchUriAsync(uri);

Add App Details Button

This button navigates to your app details page on the store.

Add this code in detailsBtn_Click event handler:

var uri = new Uri(string.Format("ms-windows-store:navigate?appid={0}", Windows.ApplicationModel.Store.CurrentApp.LinkUri));
await Windows.System.Launcher.LaunchUriAsync(uri);

Add Share Button

This button will share your app’s link.

Add this Method in MainPage.xaml.cs

private void RegisterForShare()
     DataTransferManager dataTransferManager = DataTransferManager.GetForCurrentView();
     dataTransferManager.DataRequested += new TypedEventHandler<DataTransferManager,

private void ShareLinkHandler(DataTransferManager sender, DataRequestedEventArgs e)
     DataRequest request = e.Request;
     request.Data.Properties.Title = "Title";
     request.Data.Properties.Description = "Description";
     request.Data.SetWebLink(new Uri(""+ Windows.ApplicationModel.Store.CurrentApp.LinkUri));

Then, call this method in shareBtn_Click event handler and add this line of code:

RegisterForShare(); //Calling the method


Download the entire code sample from HERE

Simple OOP

OOP1What is OOP?

It refers to “Object-Oriented Programming”, OOP is a Design Philosophy/Programming Paradigm/Programming Methodology based on the concept of “objects“.

Before OOP

There was a procedure of programming was known as “Traditional/Procedural Programming“, e.g(C, Pascal, etc).

Traditional/Procedural Programming Disadvantages:

  • Difficult Maintenance
  • Slow Development

That’s why OOP came to us.

OOP Advantages

  • Re-usability
  • Fast Development
  • Organized Code allows Fast and Easy Maintenance

OOP Concepts

  • Objects and Classes
  • Encapsulation
  • Abstraction
  • Inheritance
  • Polymorphism

What is Object and Class?


An object can be considered a “thing” that can perform a set of related activities. And these activities define the Object’s Behavior.
e.g A hand is object, and it performs some activities like holding.


A class is a collection of objects of similar type.
Class is composed of three things: (Name, Attributes and Operations).

public class Customer
Customer object1 = new Customer();

This code demonstrates how to create a class which is Customer, and how to use this class by taking an Object which is object1.



A set of elements have the same Properties and Behaviors collecting them together in one place which is Model.
Properties => Variables
Behaviors => Methods
Model => Class

That idea of encapsulation is to hide how a class does its business, while allowing other classes to make requests of it.

public class Person
    // Properties
    public string name;
    public string tall;
    // Method 
    public void Speak()


Abstraction refers to the act of representing essential features without including the background details or explanations.
Classes use the concept of abstraction and are defined as a list of abstract attributes.
Storing data and functions in a single unit (class) is encapsulation.
Data cannot be accessible to the outside world and only those functions which are stored in the class can access it.


The ability of a new class to be created, from an existing class by extending it.
Inheritance provides reusability, like, adding additional features to an existing class without modifying it. This is achieved by deriving a new class from the existing one. The new class will have combined features of both the classes.

public class Vehicle
public class Car : vehicle

Car Class inherits from Vehicle Class, Which means that Car class will have all of the public properties and methods of Vehicle class, and also Car class can modify a specific implementation of a certain method in Vehicle class.


Polymorphism is a generic term that means ‘many shapes’. More precisely Polymorphisms means the ability to request that the same operations be performed by a wide range of different types of things.

Polymorphisms is achieved by using two different techniques named method overloading and method overriding,

Method Overloading

The ability to define several methods all with the same name, but with different signatures.

public class Person
public void SetName(string lastName)
  //Implementation goes here
public string SetName(string firstName, string lastName)
  //Implementation goes here

The two methods here have the same name, but different signatures(No. of Parameters and Return type).

Method Overriding

Method overriding is a language feature that allows a subclass to override a specific implementation of a method that is already provided by one of its super-classes.

public class Person
    public virtual void SetName()
        //Print "Person Name"
public class Male : Person
    public override void SetName()
        // Print "Male Name"

To perform method overriding:

  • You have to use Inheritance
  • Method in Super-Class should have the keyword “virtual” to allow overriding

Finally, here’s a code sample demonstrating simply OOP LINK 😀