Wednesday, July 01, 2015

Learn AngularJS for free to build web and mobile apps at scale

AngluarJS is a modern JavaScript library to build enterprise web and mobile applications at scale. AngularJS is widely used JS library by all frond end and web developers worldwide in different programming languages to build scalable web and mobile applications.

AngularJS is a library backed by Google. Microsoft started to support AngularJS with great IntelliSense in VS developer tools including the following templates:

a) VS Web project templates including web forms & mvc templates.
b) VS Hybrid cross platform mobile app using Apache Cordova

Today you can start building AngularJS applications in Visual Studio 2013 and 2015.

To learn AngularJS basics before jumping into code. Microsoft offers a free course in Microsoft Virtual Academy (MVA):
http://www.microsoftvirtualacademy.com/training-courses/introduction-to-angularjs

This course is a great start to understand the basics of AngularJS.

Also, there is a free course on AngularJS website, here is some links to learn AngularJS:
https://docs.angularjs.org/tutorial
http://campus.codeschool.com/courses/shaping-up-with-angular-js/intro


** If you live in DC metro area,  I will be covering basics of AngularJS along with Building Cross platform mobile apps using Cordova, link to the event (7/15):
http://www.meetup.com/NoVaJS/events/223495406/


Hope this helps.

Friday, June 19, 2015

What is npm ? How to get started with npm with Visual Studio 2015

This blog post is for following audience:
a) Microsoft stack and .NET developers.
b) New developers using Apache Cordova.
c) An engineer who has not been using any open source tools in Visual Studio.

This blog post will answer the following questions:
1) What is npm ?
2) Why would i use it ?
3) How to use it ?

npm is a package manager for: JavaScript, Node, Cordova, JQuery, mobile, angular, react and other famous JavaScript libraries and frameworks.

You will use npm when you want to install any js library or framework in your Visual Studio project. For example: if you want to install node.js, Cordova js libraries or any other js library such as: ionic or react!

To get npm js package manager, you need first to install Node.Js which contains npm package manager tool.

https://nodejs.org/

Once you download and install the installer, you would have npm package manager tool in your system!

How to use it?
Open your command line after you installed node.js installer and type the following to install ionic framework:

npm install -g cordova ionic



Hope this helps you how to get started using npm package manager!

-- ME

Thursday, June 18, 2015

What is TypeScript? Why would i strongly recommend to use it in your next project



As all of us know, Building large applications in JavaScript is hard! It gets messy and hard to manage and test.

The Problem
Because of the nature of JavaScript, it is not "favorable & easy practice" for non JavaScript developers to write classes, modules, OOP code in an easy, clean and straight forward way.

This was the reason of the rising & popularity of JS libraries and frameworks such as: jQuery, Angular, Knockout and much more amazing js libraries.

Recently, I have been thinking to build a Hyprid mobile application using Cordova, and this open source platform helps developers to build cross platform native apps using standard web technologies in JS and HTML.

I was thinking what is the right and best approach to start structuring my project in an organized pattern such as MVC, so i have bunch of views and controllers and my code is clean to build robust solution!

The Solution
You have different ways to implement this, One is to use Angular JS library that helps you strcture your code in a MVC patterns and design your views that are linked to models and js files that have all your controllers implementations.

Another approach, is to use TypeScript which gives your the ability to write clean client scripting and it generates JS code for your and it works in all browsers!

If you are using any OOP programming language such as: C# or Java. It will so easy for you to add TypeScript (*.ts) file in your project and start writing classes, interfaces and all OOP code with IntelliSense and type casting capabilities within VS IDE.

So, you write C# Like code in TypeScript file, it generates JS code and it works in al browsers.

Here is a play ground site to test it some code and see generated code:
http://www.typescriptlang.org/Playground

The same site has tons of materials to learn, samples and get started:
http://www.typescriptlang.org/Tutorial


TypeScript is available and supported if you use VS 2013 (update 2) or VS 2015!

Hope this helps!

Friday, June 12, 2015

How to start ASP.NET 5 Development on OS X Mac



It is the day when Microsoft @ BUILD conference in 2015 announced the availability of Visual Studio Code to allow OS X and Linux Developers to tap into .NET development

I am writing this blog post to show in step by step from ,net development perspective how to install and configure your macbook pro to have VS and starting developing and debugging asp.net applications.

Here is what you need to get you up and running:

1) Install Visual Studio Code: https://code.visualstudio.com/
It is a straight forward installation as we used for all MS products installation. Once you install it you will be able to run the VS Code as shown above.

2) Install Homebrew for managing missing packages for OS X:
You need to open the Terminal window and type (copy & paste) below command:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

This command install homebrew which is the missing package manager for OS X. It is same as Nuget console manager we do have in VS in windows to install any needed packages to our projects.

homebrew homepage url: http://brew.sh

Below screen shot show brew installation in the terminal window.


Once you hit enter, it will ask to enter your password and hit enter.
below show the completion of brew installation.



3) Install asp.net 5 and DNX:
Run the following 3 commands to install asp.net and DNX:

brew tap aspnet/dnx
brew update
brew install dnvm
Below screen shot shows the successful installation of DNX and ASP.NET on my macbook pro.



Now we have Mono, asp.net 5 is installed on our MacBook Pro! Hooray...

There is not further steps to do, but if you want to test compiling, debugging and running asp.net apps. You can install samples from github: https://github.com/aspnet/home#os-x

This sample contains console app, asp.net mvc and aspnet web app.
Below link shows you how to run the samples as well:
https://github.com/aspnet/home#running-the-samples

Hope this helps!




Wednesday, June 10, 2015

How to start mobile apps development using Cordova in Visual Studio 2013/2015


I am writing this blog to show how to start developing cross platform mobile native applications using Cordova.

Cordova is a platform for building native mobile applications using HTML, CSS and JavaScript. It is an open source platform which means it is free to download and start building cross platform native applications using standard web technologies skills set.

If you would like to read more about Cordova project and its capabilities, here is the Cordova project homepage: https://cordova.apache.org/

Microsoft has started to integrate Cordova into VS 2013 and VS 2015. In this blog post i am showing how to start working with Cordova in VS 2013 by getting all the tools in step by step fashion.

Once you open VS2013, Click on Start a new project.

Under JavaScript Template, Select Multi-Device Hybrid App, then double click on Install Tools for Apache Cordova.



This will open up a new browser windows to start installing all the tools. download the executable file.




Next, Make sure to close VS before start installing Apache Cordova for VS 2013 tools (vs2013mda_0.3.1.exe)



Open up VS again, You will find a blank App (Apache Cordova) project template in VS 2013!


Hope this helps!

UPDATE 06/12/2015: Microsoft recommends to use VS 2015 for all Cordova applications because VS 2015 is using a new project structure to support third party CLIs, while VS 2013 is still using the old/deprecated project structure.


Friday, May 29, 2015

Build Apps for Office (Word & Outlook) and Office 365 API

Hi All,

During my sessions in the office 365 DevCamp in Atlanta, I have demoed how to build applications for Office (Word & Outlook) and How to integrate with Office 365 API from ASP.NET MVC application.

 I have uploaded the source of 3 applications, The zip file contains the following:

1) Word Application: Read items from SharePoint lists and interact with a word document.

2) Outlook Mail App: An app that read email messages content and extract links within the message and has the ability to add these links to SharePoint lists.

3) MVC Research Tracker App: an MVC application that is connected to office 365 tenant and read user's contacts, files (from OneDrive) and add content to SharePoint lists.

These applications you can download, register these apps against your Office 365 tenant AD and run them (F5) and have fun!

Source files download link: http://1drv.ms/1Feqy1I

I have uploaded the manifest files as well, that contains the registration information i have for each of these applications in my office 365 tenant Active Directory. These files are json files, you can open it in Notepad and configure the settings and permissions as needed. DON'T copy any Auto Generated Ids such as client id or AppKey.

All these demos require an office 365 tenant to develop against, so you will be able to have: mail, OneDrive, SharePoint sites and more, if you don't have, create a new account (30-day trial) here:

Sign up for Office 365 Development Account



Word App is running (Task Pane) inside Office word 2013:


Enjoy!

Monday, May 25, 2015

My Study notes for 70-533 Exam: Implementing Microsoft Azure Infrastructure Solutions

Hi All,

Happy memorial day! I am posting this blog post to share my study notes for Implementing Microsoft Azure Infrastructure Solutions exam.

I passed this test last week and i used to keep all my written notes to share it with others to help them get prepared for the test and eventually pass it from the first round -:)

Here are my tips and topics you need to be knowing before taking the test:

1) Add a VM to existing Virtual Network (VNet) in Azure using: New-AzureQuickVM
2) How to configure a cloud service to join a VNet in Azure by updating the csdef file.
3) How to configure Corp VNet for new employees using:
    a) Create a VPN Subnet.
    b) Enable Point-to-site connecting to Corp VNet.
2) Using DirSync with Azure Active Directory (AAD) to synchronize on-premise AD to AAD.
3) Working with Access Control Services in Azure.
4) How to configure an application as a multi-tenant application.
     Ref.: https://code.msdn.microsoft.com/Multi-Tenant-Cloud-8015b84b
              https://msdn.microsoft.com/en-us/library/ff966499.aspx
5) Active Geo-Replication is available in the Premium Services Tier.
6) Managing access to anonymous and external users using access policy in Azure Storage.
7) All logs are stored in $logs container when storage analytics is enabled.
8) Deploy protection between two on-premises VMM sites.
    Ref.: https://msdn.microsoft.com/en-us/library/azure/dn168841.aspx
9) Configure custom script extensions in VMs.
10) How to configure Data Protection Manager (DPM) with Azure backup service.
11) How to enable anonymous users to access blob storage container in Azure.
12) To integrate AD domain services (ADDS) with Azure AD (AAD):
       a) Setup a DirSync Server.
       b) Setup an active Directory Federation Services Server.
13) Work with Graph API  RESTful endpoints in Azure AD in SaaS apps.
14) Service Bus permissions:
      a) Send: for all send operation.
      b) Listen: opens up listeners and receive messages.
      c) Manage: to observe or manage the state of the service bus tenant.
15) Use Monitor page in Azure portal to setup metrics for your webroles.
16) Use Configure page in Azure portal for endpoints and rules for yor webroles.
17) To control access to VM, use Set-AzureAclConfig PS Cmdlet.
18) To add disk to a VM, use Add-AzureDataDisk PS Cmdlet.
19) Connect branch users to your corp network using: Site-to-Site configuration in Azure.
20) Connect remote users to your corp network using point-to-site configuration in Azure.
21) Free and Shared provides 1GB of Data in Azure as storage.
22) Basic provides 10GB of Data in Azure as storage
23) Standard provides 50GB of Data in Azure as storage.
24) Copy Databases using BACPAC from one server to another using blob storage.
25) Update cloud services with primary and secondary access keys in cscfg files:
       Ref.: http://blogs.msdn.com/b/jennifer/archive/2010/03/02/why-do-you-need-a-primary-and-a-secondary-access-key-for-windows-azure-storage.aspx
26) To create a reserved IP and associate it with a cloud service: New-AzureReserveIP
27) How to setup 2 solutions to communicate in two different subscriptions:
      a) Add local networks to the VNets.
      b) Create a dynamic Routing Gateways.
      c) Connect the VPN Gateways.
28) You must be Enterprise and Global Admin to run Directory Sync Tool.
29) Use Set-AzureResource PS Cmdlet to change properties of  Microsoft.com/Sites
30) You need to enable VM extensions checkbox while provisioning a new VM.
31) Select-zureSubscription -SubscriptionName "NAME" -Current  ->to set current subscription.
32) Web Jobs Path in Azure:
      site\wwwroot\App_Data\jobs\{JobType}\{JobName}
Where JobType could be continuous or triggered.

Hope these notes will help you pass the test! drop me a line if you have any suggestions!


All my best wishes!