ASP.NET Core in 10 minutes

With the recent release of version 2.0, ASP.NET Core is now more ready and complete. ASP.NET Core is an open-source framework for building web apps and services, IoT apps and mobile backends. It is a cross-platform ecosystem, meaning that you can develop, test and run it on Windows, macOS, and Linux. It is also designed to unify building web apps and APIs, as well as integrate with modern client-side frameworks like Angular and React.js. Essentially, ASP.NET Core is lightweight and ships entirely as NuGet packages, thus allowing code optimization using only needed packages. Performance wise, it has proven to be one of the fastest frameworks on the planet.

If you consider yourself an avid web developer and have been wondering when to adopt ASP.NET Core, trust me, the time has come. You will surely be impressed by the architectural changes made to the new platform and how this new ecosystem differs from the older ASP.NET web development framework. If you are coming from such a background, this article will definitely help you get started.

Wait, what is .NET Core ??

There are a lot of. NETs out there in the world today. We have .NET Framework, .NET Core, Mono, Xamarin and.Net Standard… Don’t panic. These are all just different flavors created for different environments. The .NET Standard provides the spec which all should implement, meaning that .Net Standard is the intersection of all those runtimes. .NET Core implements it and is made to run on Linux, Mac, and Windows, allowing other frameworks like ASPNET to be cross platform.

An ASP.NET Core application can target either the .NET Core or .NET Framework runtime, .NET Framework can be only targeted on Windows machines. Apps can be developed using Visual Studio for Mac or Windows, or Visual Studio Code for Mac, Windows, and Linux. Continue reading

Posted in C# | Tagged , , , , , , , , , | Leave a comment

Alma Mater of the AUB

I was listening to Richard Feynman’s 1964 lectures at Cornell University and this is the first time I realized that Cornell’s Alma mater sounds exactly like the Alma mater at the American University of Beirut. Well, it is the same music!

Richard Feynman is one of my favorite scientists and teachers. He has this remarkable gift of explaining science in the most interesting way. With great passion, he makes you imagine things and link them to physics and natural phenomena with a joyful and fascinating manner. My favorite piece is his fire explanation (here).


Back to AUB’s Alma mater, It seems that many universities used that same melody. Visiting Cornell’s Department of Music website, I found the below.

“The original melody was taken from a melancholy ballad, Annie Lisle, written by Boston musician H. S. Thompson in the late 1850s. Although Cornell is believed to be the first school to have used the melody for its Alma mater, it has since been copied by high schools and universities around the world, including Indiana University, the University of Missouri, the University of Georgia, the University of North Carolina, and even the American University in Beirut.” Cornell University Department of Music (source)

Here is the original melody: Annie Lisle by H.S. Thompson

Posted in Uncategorized | Tagged , , , , , | Leave a comment

Microsoft Data Amp 2017

With 12 billion dollars yearly investment in R&D, Microsoft is really shaping our future with their amazing innovation. I just watched Microsoft Data Amp keynote by Scott Guthrie and got so excited about all the new technologies injected to the data platform ecosystem.

Microsoft Data Amp was on April 19, it is an online event focused on Microsoft data platform. It is of interest to developers and anyone working with data, analytics, and artificial intelligence. Below are some of the announcements from the event:

SQL Server 2017

  • SQL Server for Linux, you can now install it on Linux!
  • You can also install it on any Docker-based system
  • Adaptive query processing (the database will fine tune your queries intelligently)
  • Introducing SQL Graph, an extension to create graph objects and schemas
  • Support for R and Python with the new Machine Learning Services on SQL Server

These added features are really impressive for a commercial database.

Migration Service for Azure SQL

You can now literally migrate an Oracle, MySQL or SQL Server on premise to an Azure SQL running on the cloud. Just run a wizard on the Azure Portal.

Azure Analysis Services made GA (generally available)

An enterprise grade OLAP engine and BI modeling platform offered as a fully managed platform-as-a-service. This will let you combine data from multiple sources and create your own BI semantic model. You can connect it to Power BI, Excel and even Tableau.

Azure SQL additional features

SQL Agents, Service Brokers, SQL Profiler, R support and Transaction Replication are all made available to the cloud database.

What's more impressive is the new Threat Detection for Azure SQL which leverages machine learning to secure your database and guard its performance.

DocumentDB Spark connector

DocumentDB is one of the loveliest things on the platform, a highly available NoSQL database that stores your data as JSON objects (documents) and with an added value of indexing on all properties of the document. With the new Apache Spark connector, you can get the most efficient processing and simply scale to a global level while using DocumentDB as a data lake.

Also to mention more announcements on the Cortana Intelligence, U-SQL, Azure Data Lake Analytics and Azure Data Lake Services GA. Also R Server 9.1

You can check the event and keynote on the below links:


All sessions:

Posted in Uncategorized | Tagged , , , , , , , , , | Leave a comment

Async & Await for Beginners

In response to the complexity of Threading in .Net, async and await keywords step in .Net 4.5 to make asynchronous programming easier. Asynchrony is quite essential when doing certain tasks like: calling web services, working with files and working with images. Microsoft technologies like Windows 8 and Windows Phone rely heavily on this new async programming.

So here is an elementary sample on async and await:

        public Foo()
            displayMessage = "Getting Message…";
        private async void LazyMethod()
            string result = await LazyMethodAsync("Geeks live longer");
            displayMessage = result;

        private Task<string> LazyMethodAsync(string message)

            return Task.Run<string>(() => "Welcome to " + message);


Async and await are always a pair. You can have multiple awaits in one method as long as it is marked async.

For more visit full msdn documentation.

Posted in C# | Tagged , , , , , | Leave a comment

Top Samples : Windows Phone 8

Many of the times looking at a working code will cut through the confusion and get us straight to the thing we want to implement or the feature we are adding to our wp8 app. 

Below is a chart of top 30 samples that walk through Windows Phone 8 features and technologies.

Windows Phone Samples Chart



Other Samples 

Learn through code :

Nokia Code Samples :

Developer Code samples


Happy coding !

Posted in Windows Phone | Tagged , | Leave a comment

Open source frameworks on Windows Phone 8

For the first time, and since the release of the new sdk, WP8 now supports so many open source platform frameworks. This shows how much communities are excited to work with Windows Phone.

This means a lot to developers, to be able to use their own acquired skills and expand the market opportunity. In the same time it’s extremely important for Windows Phone Market Place.

Check out the various supported frameworks:

  1. Apache Cordova (known as PhoneGap) now supports Windows Phone 8
  2. The next release of Sencha Touch 2 arrives with added support for Windows Phone 8
  3. A new jQuery Mobile theme for Windows Phone 8 is available
  4. SQLite can be used to build Windows Phone 8 applications. You can find the bits here.
  5. Here is a preview version of Cocos2D supporting Windows Phone 8
  6.  Ogre3D on Windows Phone 8
  7. has been updated to support Windows Phone 8
  8. SharpDX (an open-source C#/Managed DirectX API for.NET) is now available for Windows Phone 8
  9. Popular open source MVVM Light Toolkit gets a fresh new version supporting Windows Phone 8. Read the details on Laurent Bugnion’s blog

This added support for Windows Phone 8 in diverse open source and cross platform frameworks was made possible thanks to new features in Windows Phone 8: native C++ programming and Internet Explorer 10 expanded HTML5 support.

Developers who have applications based on these frameworks can publish them to the Windows Phone Store in record time. And this applies to various domains, like gaming with C++ or C# frameworks such as Cocos 2D, Ogre 3D and SharpDX, or cross platform development with HTML5 and JavaScript leveraging Apache Cordova,, Sencha Touch or jQuery Mobile. Developers using popular open source tools and frameworks such as SQLite or GalaSoft MVVM toolkit will also be able to reuse their code and skills.

Posted in Windows Phone | Tagged , | Leave a comment

New Features for Developers in Windows Phone 8 – Part II

VoIP and Video Chat voip

•Incoming VoIP calls work like any other call
•Integrates with built-in phone features
•VoIP apps continue to run in the background
•Available to all developers

Bluetooth and NFC

•Create apps that communicate with other phones using Bluetooth technology
•Bluetooth API enables the following scenarios for Windows Phone 8:bluetooth

•App-to-app communication
•App-to-device communication

•Proximity API enables:

•App-to-app connection using Bluetooth technology
•Establish a Wi-Fi, Bluetooth, or Wi-Fi Direct connection between your app and an instance of your app on a proximate device
•Send data between devices using NFC.
•Use a phone to interact with NFC tags 

Other Networking Enhancements

•Windows.Networking Windows Phone Runtime API

•New networking API highly compatible with Windows 8

•Incoming Sockets

•Supported in both System.Net.Sockets and Windows.Networking.Sockets, which means your app can listen for an incoming network connection

•Support for IPV6

•Winsock native API support

•Helps porting of existing native libraries that use the Winsock API

Storage – Read from SD Card

•Apps can use the Microsoft.Phone.Storage API to read files from an SD cardsd

•User can also use SD card to extend device storage for their personal files and media

•Store photos, music, videos

•Can install apps from a MicroSD store

Custom Contact Store

•Create a set of contacts owned exclusively by the app, though visible through the phones built-in Contacts app
•APIs are provided to create, update, delete, and query the app‟s contacts
•Sync the app‟s contact list with a remote list maintained by the app‟s cloud service

File and Protocol Associations

Enables App to App Communicationfileandprotocol

•App can register a File Association

•Automatically launch your app when a file of the registered type is received as an email attachment or opened in the browser, or through Sharepoint

•One app can launch another by sending it a file of the registered type

•App can register a protocol

•Allows your app to automatically launch when another app „opens‟ a special URI

•Protocol is the first part of a URI, e.g. myprotocol:/ShowProducts?CategoryID=aea6ae1f

•App launches another and passes it data in the remainder of the launch URI

In-App Purchase

  • Attract a larger user base with free baseline experience
  • Upsell users to purchase paid digital goods and services that enhance or extend the app experience in the app itself
  • Add and modify different paid options for different user segments

Enterprise app deployment

License apps directly to business

  • Build enterprise apps, for example LOB, Expense reports, Remote Access, HR, Sales
  • Promote and offer the apps to enterprise customers
  • Design the right business model, e.g. volume discount

Company Hub

company hub

Localization and Globalization

RTL and BiDirectional Support

•Windows Phone 8 supports languages such as Arabic, Hebrew and Persian that are read from right to left

FrameworkElement.FlowDirection property allows right-to-left layout in StackPanels and other content controls

FlowDirection property also enables RTL text display in text controls

•Sometimes RTL languages contain content that flows from left to right. For example, a network share name such as \\server1\folder\file.ext, should always be displayed LTR

•In such cases, you can use the Run element to contain the LTR text, and then set the FlowDirection property on the Run element to “LeftToRight” 

Languages: 26 new


Camera and Photos


•Type of extensibility available to apps that provide unique camera functionality via the camera APIs
•As a lens, your app provides the user with a viewfinder experience and interacts directly with the camera

•New Picture.GetPreviewImage() method to return thumbnail images
•New Photos extensibility features

•In addition to extending the Photos Hub, the photo app picker, and the share picker, your app can now integrate with the photo edit picker or register as a rich media editor

•Background Photo Auto-upload

•Automatically upload photos to a photo storage service using a resource-intensive background agent

•Advanced camera capture APIs for apps that require fine control of the camera

•Use the PhotoCaptureDevice class to control photo properties such as ISO, white balance, and exposure. You can even programmatically adjust the focus position.
•The AudioVideoCaptureDevice class offers a similar level of control for video and audio recording 


•Music media library

•Add and remove music files from the user‟s music collection with the SaveSong and Delete methods of the MediaLibrary class

•Pictures media library

•In Windows Phone 8, for each picture saved on the phone, the following two thumbnail images are automatically created and can be retrieved by your apps
•A small thumbnail image. You can retrieve this thumbnail with the GetThumbnail method of the Picture class.
•A preview image that has the same dimensions as the phone's screen. You can retrieve this preview image with the new GetPreviewImage extension method of the Picture class.

•Background Audio

•New PlayStateChangedEventArgs returns data when the state of the BackgroundAudioPlayer changes 

Windows Phone 8 Apps Run Faster

•Managed Apps are NGEN‟d for you (compiled to native) in the Windows Phone Store in Windows Phone 8, so typically start and run faster J

•When you build your app in Visual Studio, the code is not compiled into a native image, but into a machine-independent Common Intermediate Language (CIL) binary file (formerly known as Microsoft Intermediate Language, or MSIL)

•When you submit your app to the Windows Phone Store, you submit the CIL file

•On submission, CIL file is converted to optimized Machine Dependent Intermediate Language, or MDIL

•When a user downloads your app to a device, it is pre-jitted to a native image 


Windows Phone 8 has very many new features

The shared core means that at a low level, components of the OS are the same between Windows 8 and Windows Phone 8

Windows Phone 8 supports XAML+managed, XNA+managed, Direct3D+native app development, and hybrids of those

Apps built for Windows Phone OS 7.1 in general run without modification or recompilation on Windows Phone 8 



Posted in Windows Phone | Tagged , | 1 Comment

New Features for Developers in Windows Phone 8 – Part I

The new WP8 sdk ships with many new features that give developers access to all of Windows Phone 8’s new APIs .
Here is a quick overview of the cool new stuff:

Tile Templates and Tile Sizes

•Windows Phone 8 supports three Tile templatestiles
•Flip – flips from front to back (similar to the WP 7.1 Tile template)
•Iconic – clean iconic layout designed to reflect Windows Phone design principles
•Cycle – cycles through up to nine images

Lock Screen on Windows Phone 8

•You can register your app as a lock screen provider, which enables:lock
•User can select your app to show detailed status on the lock screen
•Can select your app as one of the five apps to show quick status (icon and count)
•Can select your app as the lock screen background image provider

New Launchers



The new Maps controls use technology supplied by Nokiamaps
•New features:
•Vector-based for faster rendering
•Four cartographic map modes
•Light and dark color modes
•Display landmark and pedestrian features

Location and Location Tracking

New Location API in the Windows Phone Runtime API set
•Similar to Windows 8 Location API
•Windows Phone OS 7.1 .NET Location API still supported
•Background location-tracking apps
•Run continuously in the background when the user navigates away from the app
•Enables scenarios such as Run Trackers, turn-by-turn navigation


Windows Phone 8 allows you to enable users to robustly interact with your app using their speechvoice
•Two types of voice interaction are new:
•Voice Commands – Allows users to deep-link into your app by holding down the Start button and speaking a prefix you specify for your app, followed by a command that you define.
•Speech Recognition and Text-to-Speech APIs – While in the context of your app, allow users to provide input using their voice, and readout text to users via text-to-speech


Credit & Debit Cards
Loyalty & Membership Cards
Access Saved Deals
Supports NFC Tap to Pay

UI Controls

•Flat lists
•Grouped lists – with headers
•Jump List
•Formerly in the Silverlight Toolkit
•Pivot and Panorama now in ROM
•WebBrowser control now based on Internet Explorer 10

3 Screen Resolutions


Posted in Windows Phone | Tagged , | Leave a comment

Windows Phone 8 Jump Start

With the revolutionary Windows Phone 8 and Windows 8 platform, it is now easier to target both Windows phones and Windows 8 apps.
For WP 7.x developers, shifting to WP8 is quite easy, free and exciting !!

All you need to do is download the new sdk , which contains all necessary tools.
Many new features has been added to the sdk, you can check at Introducing Windows Phone SDK 8.0


Continue reading

Posted in Windows Phone | Tagged , , | 1 Comment

Useful links: Windows Phone development

This article shows a list of few great MSDN resources on Windows Phone 7 development. Note that here are other useful links on the Windows Phone area of this site, and a similar list on MSDN : How-To Index for Windows Phone.

Continue reading

Posted in Windows Phone | Tagged , | Leave a comment