Thursday, February 5, 2015

Shared project in Visual Studio 2015

Shared project is new feature that was added in Visual Studio 2013 update 2 but in visual studio 2015 it is coming by default. In this post we are going to learn about Shared Project and how it is different from class library.

Shared project in Visual Studio 2015:

Shared project is a new feature that is introduced with Visual Studio 2013 update 2 and it’s comes by default with Visual Studio 2015. So with shared project you can share your common code with any number of applications. You can use that in another project via adding project reference. So let’s see how we can use Shared project in multiple application.

To understand how Shared project works, I have create a blank solution like following.

blank-solution-for-shared-project-visual-studio-2015

Share:
Wednesday, February 4, 2015

Why coding standards are important?

Yesterday, I had a discussion with friend about coding standard are important and why you need it?  So I thought it will be a good idea to write a blog post about it. Followings are some reasons why coding standard are so important.

  • Readability:  coding standard will increase overall code readability means if you follow you coding standard defined other people also know that what you have written. They don’t need to debug the code to know what function this code will perform.
  • Code Style: Every programmer have different style of writing code. So if we don’t have coding standard then Programmer ‘A’ can write variable in camel casing while other  will prefer to use Pascal case. So different modules have different coding styles.Which makes code hard to understand.
  • Code Reviews: Code review is an important part of any software development. If you don’t have a coding standard defined then it will take more time to do code review.
  • Error handling/Exception handling : The another benefits of coding standard is standardized way of handling errors. If you don’t have coding standard defined then each programmer will handle errors in unique way that could create a problem of identification of a bug  in software development .
  • Maintenance: Large enterprise software's will have  long life span. So if there is any enhancement or maintenance work is required with the help of coding standard any people can understand code easily and easily do the some changes.
That’s it. Hope you like it. Stay tune for more!
Share:

What is MongoDB and Why MongoDB?

Recently I have playing a lot with MongoDB and it’s  one of the favourite document database. In this blog post we are going to learn about MongoDB in details.

What is MongoDB?

Those who don’t know MongoDB here is what documentation on MongoDB says about it.

MongoDB is a document database that provides high performance, high availability, and easy scalability. Document Database. Documents (objects) map nicely to programming language data types. Embedded documents and arrays reduce need for joins.
A MongoDB is one of popular database. A standard deployment can hold many databases. A database holds a set of collections. It's like similar to tables in relational databases. A collection holds a set of documents just like rows in relational database tables. A document is a set of Key value pair. It’s stores data in such a way that there is no relation is required. It was created by company called 10gen.

MongoDB supports almost all the languages and there are lits of drivers are available for MongoDB and it open sourced at Github at following location.

Share:
Sunday, February 1, 2015

Grid view row span in ASP.NET

I know for some one it will sound like a very basic code for the row span of grid view but still there are lots of people that does not about that. So I thought it will be a good idea to write a blog post about it. So in this blog post we are going to learn How we can use row span in ASP.NET Grid Views.

So what we are waiting for Let’s take a small example of sample ASP.NET Web forms application. So Let’s start by creating an empty ASP.NET Webforms application like below.

GridViewColSpan

After that I have added a page web page like below.

Share:

Project.json file in ASP.NET 5(vNext)

Recently Microsoft has released the preview version of ASP.NET 5(vNext) as a Part of Visual Studio 2015 CTP. As this whole .NET framework is rewritten from the scratch so there are lots of change there. One of most exciting changes in ASP.NET 5(vNext) is moving all changes in Project.json file instead of solution. This Project.json file will have lots information related to dependencies, configuration and lots of other stuff.

Project.json file in ASP.NET 5(vNext)

Let’s create a ASP.NET 5(vNext) application from File –> New  Project

aspnet-5-starter-app

Once you create ASP.NET 5 application, It will create a sample project with Project.json like this.

Share:
Saturday, January 31, 2015

Install Go Language and Lite IDE on Ubuntu

Note: I’m not moving to Another world. Still C# and ASP.NET is my bread and butter.
Recently I have installed Ubuntu as Virtual OS in Oracle Virtual Box. This was one of first exposure I got Linux base operating system.  Earlier I have used Linux when I was doing my masters as part of their curriculum.  So far I am having fun Ubuntu and other Linux base operating system has come far.

After installing Linux, I thought why should I try some other language which is completely different then which I am working right now. This make me Polyglot  programmer and I could learn something from trying a new language and so I gone through various language and choose Go language.

Why Go Language?

Here are the reasons why I have choose to learn GO programming language.
  • It’s backed by Google so will not go away near future.
  • High performance :  Makers of Go language claims that it will perform as fast C and C++ language.
  • Fairly easy language to run.
  • Statically typed just like C#.
  • It has Garbase collection so I don’t have to worry about memory management like C and C++
  • Concurrency is in built
To know more about go language you can visit following site. It has got ton of resources.
http://golang.org/
Share:
Monday, January 26, 2015

Setting up development environment for ASP.NET 5(vNext) on Ubuntu

I am really enjoying working on Ubuntu. In previous post, We have learn how to install Sublime Text and in this blog post we are going to learn how we can setup development environment for ASP.NET 5(vNext). So what we are waiting for let’s go.

Note: First thing you need to make sure that Python 3.0 or higher version is installed. I have installed latest version of Ubuntu which already has Python preinstalled.

Setting up package manager control:

The first thing you need to is to install/setup package manager control. To Install package control, We need to go from View- > Show console menu. It will load package control. You need to run following command from the console. It will install the package manager control.
import urllib.request,os,hashlib;
h = '2deb499853c4371624f5a07e27c334aa' + 'bf8c4e67d14fb0525ba4f89698a6d7e1';
pf = 'Package Control.sublime-package'; 
ipp = sublime.installed_packages_path();
urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) );
by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s),
please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)
You can also copy this command from the this url- https://packagecontrol.io/installation

Share:

Support this blog-Buy me a coffee

Buy me a coffeeBuy me a coffee
Search This Blog
Subscribe to my blog

  

My Mvp Profile
Follow us on facebook
Blog Archive
Total Pageviews