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 American University in Beirut

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:

Keynote: https://www.youtube.com/watch?v=0uT46lpjeQE

All sessions: https://www.microsoft.com/en-us/sql-server/data-amp

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()
        {
            LazyMethod();
            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

wp8sampleschart

 

Other Samples 

Learn through code : http://aka.ms/wp8samples

Nokia Code Samples : http://developer.nokia.com/resources/code-samples

Developer Code samples

 http://code.msdn.microsoft.com/site/search?f%5B1%5D.Value=Windows%20Phone%208

 

Happy coding !

Posted in Windows Phone | Tagged , | Leave a comment