Pages

Saturday, June 28, 2014

Microsoft has announce that Visual studio is going to support a lot of open source technology. They have collaborated with a lot of open source developers to bring their support in. Recently Mr. S. Somasegar ( corporate vice president of the Developer Division at Microsoft) gives some idea that how Microsoft is  going to support Open source community. Here are some of the points from his blog.

Open Source in Visual Studio 2013 and TFS 2013
Visual Studio 2013 builds upon a lot of great open source software.  In fact, many developers are surprised to hear just how much OSS is part of Visual Studio and Team Foundation Server.  Scott Hanselman has been sharing this slide in some of his talks, summarizing the open source projects used in various Visual Studio offerings.
 
Some of these are projects started by individuals or teams at Microsoft, and now developed as open source.  Others are projects where we have become contributors to successful existing open source projects.  And others are places where we have been able to build on top of the great work in the open source community to provide richer capabilities in Visual Studio.
We couldn't ship Visual Studio without these projects, and I'd like to join Scott in thanking everyone who has contributed to these projects for the support they've provided to Visual Studio 2013 and TFS 2013.
To highlight some of the flavor of open source in Visual Studio, here's a few examples:
LibGit2
Visual Studio and Team Foundation Server now support Git source control natively, and Visual Studio developers are using distributed version control via Git across a wide variety of development activities in Visual Studio.
Our support for Git builds upon the libgit2 project, also used by GitHub and others in the Git community.  Several Microsoft employees in our version control team now actively contribute to this project, helping to support this cross-platform, linkable, Git library written in C, as well as providing first-class support for the library on Windows.  We also actively contribute to the libgit2sharp project which provides a .NET wrapper around the libgit2 library.  This makes it easy for any .NET developer to quickly build integration with Git. 
Building upon these two libraries in our Visual Studio integration enabled us to deliver great support for Git in Visual Studio while contributing back to the community and providing additional testing and validation for the open source library.
Node.js Tools for Visual Studio
We recently released a preview of Visual Studio support for Node.js.  This project supports editing, project management, profiling and debugging for the open source Node.js platform from within Visual Studio. 
The Node.js Tools for Visual Studio project is developed on CodePlex and has had major contributions from industry partners, including NPM management UI and Edit and Continue support.  The project also builds upon the open sourceNode.js platform generally, with support for debugging based on the open-source V8 engine's debugger protocol.
Speaking of Node.js, we also have an open source Node.js SDK for Windows Azure.  We have partnered with Microsoft Open Tech, our open source subsidiary, to make contributions to Node.js core to ensure it works great on Windows and Windows Azure.
ASP.NET Web Stack
Two years ago, we open sourced the ASP.NET web stack on CodePlex and transferred it to MS Open Tech.  Since then, the project has benefited from significant contributions from many developers from the community.  These ASP.NET technologies continue to be the foundations of one of the most heavily used project types in Visual Studio.
The ASP.NET developer ecosystem has also increasingly adopted open source technologies as core pieces of the modern ASP.NET web development platform.  In Visual Studio, we now include many of these projects as part of the default templates, including JSON.NET, OWINjQueryModernizr and Bootstrap.
TypeScript
We decided early on that we wanted TypeScript to be an open source language and compiler.  Developing TypeScript on CodePlex over the last 18 months has enabled us to evolve the language and tools rapidly toward the upcoming TypeScript 1.0. 
We've also seen a great open source community build up around TypeScript, including build system integration and IDE support in Eclipse, WebStorm and more.  One especially interesting project in the TypeScript open source community isDefinitelyTyped, which hosts a curated collection of TypeScript library typings for over 300 popular JavaScript libraries, with over 4000 contributions from over 350 people.  And in n Visual Studio 2013 Update 2, we've added features to make it easy to find these library typings, building on this great open source project.
Looking Forward
These projects are just a sampling of the places we're working with open source in our developer tools.  The trend these examples highlight is one that I fully expect to accelerate both in our developer tools and across additional platforms and applications at Microsoft.  I'm happy to see the benefits developers are seeing from our partnerships with open source over the last few years, but also looking forward to the opportunities we have ahead of us. 

Anil Kumar Pandey
Microsoft MVP, Microsoft MCC, DNS MVM

Knockout.js

Knockout.js is a JavaScript library Which works on the principal of Model – View – View Model. It allows us to bind html elements of the view with data model. The best part of Knockout is it provides a simple two-way data binding between data model and UI element. In Simple Words if you make any change in the  data model then those changes will be automatically reflected in the DOM(UI) or if there are any changes done against DOM elements those will automatically reflected to the data model.  We can say that these are similar to the Binding features present in WPF.

Some of the Key benefits of Knockout are :

Ø  Bindings of UI elements with data model. 
Ø  Dynamic data model creation is simple.  
Ø  Knockout supports event-driven programming model.  
Ø  Cross browsers are support.

Knockout was developed and maintained by Steve Sandersona Microsoft employee. This is a Open Source product. We can get the Library or files from the Below mentioned Location.

Using nu-get 

To install knockout.js, run the following command in the Package Manager Console

PM> Install-Package knockout.js         
The Latest version is knockout.js 3.1.0. It is also available on the CDN at below mentioned location.


Sample Application in Knockout  Hello, Planet Earth!

 Create the Below  Two Text Box on the HTMl page.

First name: < input data-bind="value: firstName" />
Last name: < input data-bind="value: lastName" />

Hello, data-bind="text: fullName"> !



Use the Knockout binding as below. Note the Word KO is  the short-form of Knockout. Which is reserved for referring  Knockout object.

// create data model
var ViewModel = function(first, last) {
    this.firstName = ko.observable(first);
    this.lastName = ko.observable(last);

    this.fullName = ko.computed(function() {

 // Binding will be take care by Knockout.

       return this.firstName() + " " + this.lastName();
    }, this);
};

// Relation will be bind by below satatement 
ko.applyBindings(new ViewModel("Planet", "Earth"));

You can download the sample application from Download. Please share your comments on the same. Will be happy to answer any doubts if you have. :)

 Thanks
Anil Kumar Pandey
Microsoft MVP, Microsoft MCC, DNS MVM



Kontera