Author Archives: Vidya Vrat

Reached 5 million Read Count on C-SharpCorner.com

September 19th, 2017 | Posted by Vidya Vrat in Community - (0 Comments)

I want to THANK all my readers in the .NET community. Today I have reached 5 million read count at www.C-Sharpcorner.com

My C-Sharpcorner profile – http://www.c-sharpcorner.com/members/vidya-vrat-agarwal

 

 

Recap of my Sessions at Seattle Code Camp 2017

September 14th, 2017 | Posted by Vidya Vrat in Architecture | Best Practices | Community - (0 Comments)

Seattle Code Camp 2017

I spoke at Seattle Code Camp 2017 on 09/09/2017 and covered two topics.

• AntiPatterns Every Software Development Team Must Know https://lnkd.in/ebEMDBb
• DevOps: What, why and how?
https://lnkd.in/eQf3dFm

Seattle Code Camp started with a Keynote from Microsoft’s Jeremy Foster and he shared a slide with all Microsoft MVP (Most Valuable Professionals) and FTE (Full Time Employee) who were speaking at 09/09/2017 Seattle Code Camp.

Microsoft got separate printed agenda for MVP and FTE Sessions

Session Details

My 1st Session on AntiPattern was in Room#103 at 11 am -12 pm. I had a brief introduction and begin with the presentation. As already set the expectation with the audience, I kept it very interactive and many participated well to share knowledge and experiences with others.

Some of the attendees even spoke to their friends in the lunch break and recommended them to attend my next session. Some of the attendees returned for the 2nd session for DevOps at 1-2pm and some mentioned that it was the best talk they attended. Well, I thank them for their kind words and patience to provide me an opportunity to share my thoughts with them.

What people said after my sessions

Presentation Slides

Slides are available at https://github.com/vidyavrat/SeattleCodeCamp2017

Contact Me

Please connect with my via
LinkedIn : https://www.linkedin.com/in/vidyavrat/
Twiter : https://twitter.com/dotnetauthor

Send me a message using Contact Me tab on the blog.

Speaking at Seattle Code Camp 2017

September 6th, 2017 | Posted by Vidya Vrat in Community - (0 Comments)

Seattle Code Camp 2017 is here 09/09/2017 and I will be speaking  on two hot topics which will benefit software developers who really care about their craft.

• AntiPatterns Every Software Development Team Must Know https://lnkd.in/ebEMDBb
• DevOps : What, why and how?
https://lnkd.in/eQf3dFm

Register at https://lnkd.in/gZt65s6 #SeattleCodeCamp

Seattle Code Camp

Agile Principles that apply to DevOps 

July 31st, 2017 | Posted by Vidya Vrat in Agile-Scrum | ALM / DevOps - (0 Comments)

Introduction 

DevOps is a new buzzword and it promotes continuous value delivery to the end users. To know more about DevOps read my article DevOps: What, why and how? 

DevOps is a “culture”, where development, test, and operations work together in a collaborative manner to automate delivery of quality software.  DevOps culture develops “production-first mindset”. I.e. applying DevOps ensures that your code is always ready to be deployed to production. 

Agile Manifesto 

Agile manifesto and principles have an influence on DevOps. Let’s review agile manifesto: 

Manifesto for agile software development  

“We are uncovering better ways of developing software by doing it and helping others do it. Through this work we have come to value:  

  • Individuals and interactions over processes and tools 
  • Working software over comprehensive documentation 
  • Customer collaboration over contract negotiation 
  • Responding to change over following a plan 

Agile Principles 

Overall Agile Manifesto has twelve principles and four of those really gels well with DevOps. 

  • Our highest priority is to satisfy the customer through an early and continuous delivery of valuable software. 
  • Deliver working software frequently, from a couple of weeks to a couple of months, with a preference to the shorter timescale. 
  • Business people and developers must work together daily throughout the project. 
  • Working software is the primary measure of progress. 

How Agile principles apply on DevOps  

  • Our highest priority is to satisfy the customer through an early and continuous delivery of valuable software. 

  When a team adapts the DevOps culture then team works   together to deliver a high-quality software to the end users consistently over and over.  

  • Deliver working software frequently, from a couple of weeks to a couple of months, with a preference to the shorter timescale.DevOps promotes short delivery cycles over long delivery cycles. Short delivery cycles have small amount of change which is far easier to deploy and test and detect impact of changes.
     
  • Business people and developers must work together daily throughout the project.DevOps enable the business people to have look at the product early and provide candid feedback. DevOps also provides an easy and effective way of adding approval step in the CI/CD pipeline where business / product owner can approve changes for deployment to other environments.
     
  • Working software is the primary measure of progress.At the end business values working software having reliable feature delivered on time to end users. DevOps practices enable the software development teams to deliver working software on time and provided proper channel for feedback between various stages of the DevOps workflow.
     

DevOps, What , Why & How

June 7th, 2017 | Posted by Vidya Vrat in ALM / DevOps - (0 Comments)

What DevOps is not?

DevOps is not a “Packaged Solution”. I.e.  You cannot buy and install it.

What is DevOps?

“DevOps is the union of people, process, and products to enable continuous delivery of value to our end users.” – Donovan Brown, MSFT

DevOps is a “culture”, where development, test, and operations work together in a collaborative manner to automate delivery of quality software.  DevOps culture develops “production-first mindset”. I.e. applying DevOps ensures that your code is always ready to be deployed to production.

Why DevOps?

First thing DevOps offers is that, it breaks the “Wall of Confusion” between development and operations team. These two teams have different agenda and expectations when it comes to software delivery and deployment.

DevOps breaks the wall of confusion between teams and fosters better communication and collaboration throughout the application development lifecycle and results into better visibility and small frequent deployments together.

DevOps Benefits and ROI – Source, Forrester Research Inc.

  • Improved IT operations efficiency. Saving 50% of allocated IT operations support.
  • Improved developer productivity with faster, automated release processes. Developers saw a 15% improvement in productivity.
  • Improved tester productivity with faster, automated release processes. 20% productivity gain with their deployment of the Microsoft DevOps solution.
  • Faster recovery from failures and reduction in release risk. Reduce time-to-resolution per incident by 2 hours.
  • Reduced cycle time by as much as 99% and more frequent deployments. Increased customer satisfaction and also gained new business.
  • Faster speed-to-market for new features, products, and services for customers. 20x more, leading to increased sales.
  • Improved release quality. Successful releases with a reduction in errors increase in release reliability, and less time on remediation of release errors.

How to apply DevOps?

Prime objective of DevOps is to “quickly ship the highest quality software to the end customers”. To make this happen DevOps needs to be implemented across all the phases of software development and delivery.

DevOps workflow from planning to release

The workflow model below shows how teams go through four phases and contribute towards DevOps adoption.

Plan Backlog represents well-defined and prioritized user stories with proper acceptance criteria etc.

Develop & Test Development will include good quality code written, debugged, code reviewed, checked-in including unit test coverage as appropriate. Testing will include verifying the user story’s acceptance criteria, possibly followed by performance and integration tests etc.

Release – Whenever a new version is ready and a sprint end, an automated process is used for deployment.

Monitor and Learn After release team can gather information related to how customers use the application /services and continue to monitor health of application.

Collaboration – Building code and running unit tests on each check-in small or big ensures that code is ready to be deployed. Then, deploying it to at-least production like environment and successfully performing tests there ensures that Dev and Production are in collaboration.

DevOps Automation

One major key aspect of DevOps is automation of software build, test, and deploy. DevOps automation enables continuous value delivery.  Let’s see the DevOps Automation process workflow.

Development – This is where a developer writes code in their local development environment.

Version Control – This is version control team uses to check-in code to the repository. E.g. Git, TFS, SVN etc.

Build and Unit Testing – This is where DevOps Continuous Integration (CI) takes place. At this step, code will build with latest checked-in code and latest packages and dependencies as applicable. If there are unit tests then all unit tests will be executed to ensure that there are no collateral damages caused within the code base.

If Build fails then a notification will be sent to the developer who submitted the build. Many teams have various policies and channels set up for this. For example, a bug is created with details when a build fails and team’s slack channel will receive notification when a build fails.

Automated Acceptance Testing – If build succeeds then a set of acceptance tests can be executed automatically to verify that code is working fine.

Any failure in an acceptance test will trigger a feedback initiated to the team and process will again start from beginning.

User Acceptance Test – Passed automated acceptance tests ensures and triggers the code to be promoted to UAT.

Release – Upon passing UAT, code can be released to any environment or production or production like environment. Manual push of code to production is known as Continuous Delivery (CD).

DevOps Toolchain

DevOps is technology agnostic and any development environment on any platform can fully adopt DevOps culture and can continuously deliver quality software to their customers. Here some SDLC phases and tools which will fit in and can help to setup end-to-end DevOps pipeline for your technology and platform of choice.

Planning and Analysis

  • Capturing and tracking (TFS, VSTS, JIRA, ServiceNow.
  • Documentation or Wiki page (Microsoft Teams, SharePoint, Confluence.
  • Collaboration (Slack, HipChat, Microsoft Teams).

Design and Development

  • SCM (TFS, VSTS, Subversion, Git, Mercurial.
  • IDE (Eclipse, IntelliJ, Visual Studio).

Build and Release (CI/CD)

  • Repository management (Artifactory, Nuget, Nexus).
  • Build tools (MSBuild, Jenkins, Bamboo).
  • Configuration management (Chef, Puppet, Ansible).
  • Cloud (AWS, Azure,OpenStack).
  • Containers (Docker).

Integration and Testing

  • Source code verification (SonarQube).
  • Security testing (HP Fortify).
  • Functional testing (MSTest, NUnit, JUnit, Cucumber, Selenium).
  • Performance testing (SOASTA, Apache Test Bench, Microsoft Load and Performance Test).

Developers use case for .NET API Browser

April 24th, 2017 | Posted by Vidya Vrat in .NET | .NET Core - (0 Comments)

Abstract

Many times, developers need to know if a technology or feature is supported by a specific .NET version. For example, how to verify that .NET Core has Linux support or not. Well, you can always Bing that but wouldn’t it be better if this need is supported by “one stop search” and results are authentic.

Accessing .NET API Browser

.NET API Browser can be accessed by https://docs.microsoft.com/en-us/dotnet/api/

.NET API Browser allows you to search a wide range of features across following:

  • .NET Framework
  • .NET Standard
  • .NET Core
  • Xamarin
  • Azure

Let’s Search in .NET Framework

Open the API Browser and filter it to .NET Framework and choose a version from the middle dropdown. .NET Framework allows to search only for .NET 4.5 – 4.7 I.e. you can’t search features prior to .NET 4.5 in the .NET API Browser.

With the release of .NET 4.6 a new overload was introduced for System.GC.Collect(). When Searched in .NET 4.5 you will see as shown below:

But when switched the Framework Version to 4.6; then new overload can be observed as shown in the image below.

Let’s Search in .NET Standard

.NET Standard is a “specification” of .NET API which are available across all the .NET Runtimes. .NET Standards provides and supports uniformity within entire .NET ecosystem. You can refer to the list of .NET Standard libraries here https://www.nuget.org/packages/NETStandard.Library

As name explains by it-self;  this become evident that all core APIs like System, System.Collections, System.Diagnostics and System.IO etc. are natural candidates for .NET Standard as shown in the image below

Let’s Search in .NET Core

.NET Core is brand new and well accepted framework in Microsoft and non-Microsoft world. To Learn more about .NET read my blog post or C-Sharpcorner Article or watch my Channel9 Video.

A well-known fact about .NET Core is that .NET Core has support for Linux as shown in the image below.

Summary

.NET API Browser is a great feature and can become very handy to identify supported features by various platforms as shown some related to .NET in the article above. You may want to use .NET API Browser to search and learn about other APIs related to Xamarin and Azure as well, remember it’s one stop .NET API Browser.

Beginning with Git using VSTS

February 9th, 2017 | Posted by Vidya Vrat in ALM / DevOps | VSTS - (0 Comments)

Introduction

Just like TFVC (Team Foundation Version Control), Git is another Source Version Control and it’s becoming very popular. VSTS (Visual Studio Team Services) supports both TFVC and Git. Let’s assume that you have no project or Repository and wants to begin with Git on VSTS.

Create a New Project

Login to your VSTS account and click on New Project

Fill the information

Click “Create” and you will notice that Project will be Created as shown below.

Clone it in IDE

Click “Clone in Visual Studio”. New Visual Studio IDE will start a dialog like shown below will popup.

Provide the Repository path and click on “Clone”.

Switch to Team explorer and Click on “Create a new project or solution”

When prompted choose the project type. After Project is added successfully you will notice that project is added in Solution Explorer and shows (+) in front of various items and also Team Explorer’s Changes tab shows all the items listed as newly being added.

Commit Changes and Publish

After project being added into Solution Explorer it’s considered as a change to the blank repository/project you created. Hence, this change needs to be added to remote Master branch.

In Team Explorer à Changes, add a comment for check-in and click on “Commit All”

Click “Commit All” and from the next Synchronization Tab, click “Publish”

Now your Git Repository in VSTS should be updated with the code you have pushed-in to it. Refresh your VSTS page and you should be able to see your project code added.

Software Design Paradigm

January 13th, 2017 | Posted by Vidya Vrat in .NET | Architecture | MVC - (0 Comments)

Abstract

Convention over configuration is a software design paradigm which is used by many modern software framework including ASP .NET MVC and Web API. It’s also known as “Coding by Convention”.  It takes a lot of burden away from developers, which is otherwise required; to handle basic aspects of the application. For example, mapping of database tables with classes, or handling URLs etc.

Introduction

ASP.NET MVC (Model View Controller) very nicely showcases this software design paradigm via Visual Studio’s ASP.NET MVC Project template directory structure. ASP.NET MVC Project have three core folders “Controllers, Models and Views” as shown in Figure- 1 below.

Figure-1 Visual Studio MVC project folder structure

ASP.NET MVC framework’s folder structure is based on “Convention over Configuration” and that’s why practically, a class in Models folder can be safely assumed that there is a table with that name in the database. A Controller can be created with a <Name> with a suffix “Controller” (for example, EmployeeController, ProductController etc.) Similarly, an action method in Controllers folder’s controller class can be accessed with Controller class name (name without suffix Controller) for example, Details action method in EmployeeController by convention can be easily accessed via http://Your-Domain-Url/Employee/Details

Implementation

If there is no “Convention over configuration” paradigm; to make any such behavior work, developers need to specify/code some configuration rules to educate the application about interpreting a url and under which folder or where to look for the resource to serve that request.

Hence, having Convention over configuration is already baked into ASP.NET  MVC, Developers don’t need to write any code to establish communication mechanism among various application components. To have it function properly, conventions need to be followed and developers need to adhere to those conventions.

For example, all controller classes must reside under “Controllers” folder with <Controller> suffix as convention for example, Controller\HomeController, Controller\EmployeeController etc.
Views folder is known to have all the views and convention tells Controller where to look for a View(s) associated with a controller action method; as shown in Figure 2 below, each action method in Controller\HomeController refers to individual cshtml under “Views\<folder with controller name>”

Figure-2 Convention over configuration in Action
Hence, convention over configuration help developers to easily communicate with the ASP.NET MVC web framework by providing the pre-defined conventions as shown in Figure-3 below

Figure-3 Convention over configuration in action.

Note, that if you don’ follow the conventions correctly for example, create a controller class named DefaultController1.cs under Controller folder and build it; then Visual Studio IDE will not report any issues and it will build successfully.

Or simply move HomeController out of Controllers folder, under the project. Hit the route http://locathost/Home/About and you will get 404.

Building solution successfully doesn’t mean, that it will work.

No error was reported because as a developer you are given freedom to name your controller class etc. as per your wish; so you have freedom. But to have it working “Convention needs to be followed strictly” hence, it will not work. But once you adhere to the Convention by renaming DefaultController1 to “DefaultController” or moving HomeController back into Controllers folder; and you hit the route then it will start to function as expected.

How to identify which .NET Framework is installed

December 11th, 2016 | Posted by Vidya Vrat in .NET - (0 Comments)

Scenario

Are you involved in end-to-end solution delivery or got responsibility to ensure successful deployment of your .NET solution on a server box. If yes, then you need to make sure that right version of .NET Framework is installed on the deployment server(s). Many times I have observed that on premise server(s) or VMs are usually prepared by the client’s IT/Operations or Infrastructure team and they might have assured you that they have installed the correct .NET Framework Version; which application needs to have for successful execution.

What all .NET Versions could there be

Today almost every .NET application is written on .NET 4.5 or higher version (4.5.1, 4.5.2, 4.6, 4.6.1 or 4.6.2) unless you are dealing with some old .NET applications written on .NET 2.0 or 3.5 or 4.0; today all applications are built using greatest and latest .NET Framework.

Well, good to know that; let’ check

As soon as .NET Framework installation comes to mind; one location glares in the eyes C:\Windows\Microsoft.NET\Framework

The above image shows that you have .NET Framework 4.0 or may be higher version installed.

But which .NET 4.x is installed exactly

To know which .NET 4.x is installed; requires some drilling into Registry.

Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4

Under V4 folder you will see “Client” and “Full” subkey, if “Full” subkey is missing then there is no .NET 4.5 or higher version is installed.

Reading “Full” subkey

As shown in the image below read the “v4\Full” subkey and look at the Release and its value on the right hand side as highlighted in the image below.

The value shown in parentheses ( ) under Data for the Name Release and Type REG_DWORD will resolve to a specific version of the .NET Framework.

Now if you map the value 394802 to the table above, then you will come to know that .NET Framework 4.6.2 is installed. Similarly, you can map shown value as per the table above to identify which .NET Framework is installed on the machine.

 

Validity of visual studio 2017 RC

November 25th, 2016 | Posted by Vidya Vrat in Visual Studio 2017 - (0 Comments)

   Abstract

Microsoft launched Visual Studio 2017 RC on November 16, 2016 and it’s a free trial for all .NET Enthusiasts and developer community. Once a developer downloads the free trial, its only valid for certain period and this article will help you to learn how to check the validity date of VS 2017 RC.

If you have not yet installed the Visual Studio 2017 RC yet, then you might want to read my previous article on Installing Visual Studio 2017 RC

What is the benefit of Free trial?

Release Candidate is a free trail for developers to try the another latest and greatest features of new IDE and tooling around it; and that gives sufficient time to anyone learn and try what’s new in that new shiny tool and when you or your organization is ready to upgrade to a paid licensed version; you can continue to use the greatest and latest.

So when this free trial will end?

Unlike Visual Studio Community edition which is a Free download, Visual Studio 2017 Developer and Enterprise Editions are Free trial.

Free Download

Visual Studio Community is a Free Download and it remains free the whole life time of the application while it’s installed on your machine.

Free Trial

Visual Studio 2017 Professional and Enterprise are NOT FREE but offer Free Trial, which means that Trial will end after certain date and then you will be no longer able to use that product unless you buy or upgrade to a licensed version of that product.

Until when is RC Valid

Well, usually Microsoft Product Teams know well in advance and work towards releasing the product after few months of RC. But to be sure until when your installed Visual Studio 2017 RC is valid, you can follow the steps below.

  1. Launch Visual Studio 2017 RC2.Go to Help menu and click on “About Microsoft Visual Studio”3.From the opened dialog as shown below, click on “License Status”4.Now you will see a dialog as shown below and you can clearly see the final date of the end of Free trial.