Static Code Analysis in .NET 4.0 using FxCop 10.0 with Custom Rules

Author: Veeresh Rudrappa. Date: July 27, 2013

FxCop is an application that analyzes managed code assemblies and reports information about the assemblies, such as possible design, localization, performance, and security improvements. You can also write custom rules to check for your own design guidelines. In this tutorial let us see how to install FxCop 10.0 and also learn how to analyze code by writing our own custom rules.

Introduction to SignalR in ASP.NET MVC 4 by building Trading Trends Application

Author: Veeresh Rudrappa. Date: March 19, 2013

In the coming days there is going to be lot of stress on building more interactive web applications. SignalR is one such framework in .NET technology which helps to build interactive, real-time, multi user applications. Let us learn what is SignalR by building a simple Application in ASP.NET MVC 4.

How to port existing MVC 3 application from windows to Linux

Author: Veeresh Rudrappa. Date: March 13, 2013

When I set out to port .NET application from windows 7 to Linux, I thought its going to be a long laborious process with lots of configurations. But surprisingly it did not take much time. Most of you might have already heard about mono-project, an open source implementation of the Microsoft .NET Framework. It is aimed at helping developers develop cross-platform applications.

How to connect to a PostgreSql Database over the network

Author: Veeresh Rudrappa. Date: March 10, 2013

If your database is stored in a different machine than your development machine then you can connect to it from your application over the network. You might have just bought a new laptop and might not want to the take the strain of setting up the database on your new machine all over again. So Let us see how to connect to PostgreSql over the network in few easy steps.

Using NHibernate with PostgreSql in ASP.NET MVC: A tutorial

Author: Veeresh Rudrappa. Date: March 9, 2013

In my previous blog I showed how to set up NHibernate with PostgreSql. Now let us move on and build a small application and learn how to do the NHibernate Mappings. I have come up with a small ASP.NET MVC 3 project just to illustrate the usage of NHibernate. In the process you will also learn:
1. How to create Database, Tables, Schema and roles in PostgreSql
2. How create a MVC 3 project and use HTML helper forms.
3. How to map model objects and save them into Database
4. How to define many to one relationship in NHibernate.
With this blog and the previous one, you should be all set to build and develop any large scale project.

How to set up NHibernate with PostgreSQL in ASP.NET

Author: Veeresh Rudrappa. Date: March 3, 2013

If you are looking for an Object Relational Mapping Solution for your .NET project then NHiberante is one framework I can vouch for. There are other ORM solutions for .NET like SubSonic , LLBLGen. NHibernate is open source and can be downloaded from here. If you are new to NHibernate, setting it up with your ASP.NET Application could be tricky. In this tutorial I will be showing you how to integrate NHibernate, PostgreSQL with ASP.NET MVC 3 application.

How to Connect Android Client to a Java Servlet

Author: Veeresh Rudrappa. Date: March 2, 2013

In this blog I'll show how to host a Java Servlet in Apache Tomcat 7.0, build a basic android APP and then establishing communication between the two. I have come up with a basic android app "Double Me" for this tutorial, which just sends an integer to server and the server doubles it and returns it back to the android app.

How to Encrypt and Decrypt Data in Android Application

Author: Veeresh Rudrappa. Date: Feb 24, 2013

Here is an easy and quick way to encrypt and decrypt data. I needed it for one of my project where I building an Anonymous Voting System on android. The technique shown here could be used else where on your Java projects as well.

How to upload a file from Java to PHP over HTTP

Author: Veeresh Rudrappa. Date: Feb 23, 2013

Here is an easy way to upload any file from your Java application to a PHP site hosted somewhere. I had to do this for one my project in which I was required to upload a bunch of files based on a schedule of once in 24 hrs. I also had to implement a retry logic if the upload failed due to loss of network or some network congestion. I will blog on that logic some other time, but for now I'll show here how to upload a file from java and receive it in the PHP site.

How to get Linux Process Cpu and Memory Usage in Java programmatically

Author: Veeresh Rudrappa. Date: Feb 17, 2013

This is a no brainer approach for getting CPU and Memory usage of the running processes under Linux. All we do is execute Linux shell commands programmatically in Java and extract its output. I had to use this when I was developing a monitoring software for Linux. Of course there are lots of libraries available to accomplish this and I ended up using them as well to complete my project. One such library is Sigar Api. Well, if you are forced to do it the crude way, you can use code below. However, it also is a good introduction for executing Linux commands from Java if you haven't done it already.

How to get the root of an application in ASP.NET

Author: Veeresh Rudrappa. Date: Feb 16, 2013

Here is an easy way to get your application path. It is very helpful to declare a String variable at the top of your cshtml or aspx page and use it to access any files with in your project.

String applicationRoot = ( Request.ApplicationPath == "/" ) ? String.Empty : Request.ApplicationPath;