Friday, November 25, 2011

Created my first Android Application using C#

I was always amazed by the beauty of Android applications, they are very light weight and they are running very smoothly. Since I am having an Android powered HTC mobile, I always wanted to write an Android application. I have seen many nice applications in Android Market, some of course comes with a price and some are totally free.

Android applications are usually developed in Java language using the Android Software Development Kit. Since I am a .NET developer and I have not used Java for like 2 years, I wanted to create an Android application using C#. I first heard about MonoDroid couple of months back, which is a software development kit that allows developers to use C# language to create mobile applications for Android-based devices.

Recently they have changed their name from MonoDroid to Mono for Android. So this Mono for Android exposes two sets of APIs, the core .NET APIs that C# developers are familiar with as well as a C# binding to Android's native APIs exposed through the "Mono.Android.*" namespace. We can use both these API's to develop applications and we can deploy applications to our personal hardware/Android simulator or we can create a package and can upload to the Android Market.

So I have created my first "Hello World!" Android application using C# and it's just great.

My Android Application

My Android Application "Hello Android!!!"

For More information on Mono for Android, visit
     Mono for Android

You can find a step by step guide to learn how to setup your computer to build Mono for Android applications using Visual Studio 2010 from following link.
     Building Mono for Android applications using Visual Studio 2010

Please note that Visual Studio 2010 Express is not supported with Mono for Android. So enjoy writing Android applications using Mono for Android. Appreciate your feedback.

Happy Coding.


Tuesday, November 1, 2011

What is IronPython

Today, it's a special day to me. Today I am writing my 50th post and it's exactly after 2 years from the first day I started blogging. It's a great feeling.

So today I would write about IronPython. If you have not heard about IronPython before, don't be surprised. I am pretty sure you must have heard Python programming language before. If you have not, it's a open source high level programming language which is used by world's largest software companies to develop world's famous systems. Here is a list of systems that is developed using Python.
    List of Python software

So what is this IronPython? Actually IronPython is the .NET version of the Python language. For a .NET developer, developer has the advantage of developing aplications using IronPython and still having the full access to the .NET Framework. Which means you can work with IronPython and other .NET languages that you already know and by that you can use the right tool for every job.

The most important thing in IronPython is, it is a dynamic language, which means that it performs many tasks during run time, rather than compile time. And of course, using a dynamic language means that your code has the advantages of static languages, such as C#.

Dynamic languages are not new to the industry. It has been there for a very long time. Dynamic languages provides many advantages. One is it has the ability to enter several statements and execute them immediately to obtain feedback. Another thing is using a dynamic language, it's easier to refactor the code and modify the code, because you don’t have to change static definitions throughout your code. You also have the possibility to call functions which you haven’t implemented yet and add an implementation later in the code when it’s needed.

In addition to the great features that Python provides, IronPython provides a few of its own. I would list some of them down here.
  • Full access to the .NET Framework.
  • Full extensibility using the .NET Framework.
  • Complete source code available.
  • Usability within Silverlight applications.
IronPython also runs on Mono, cross platform open source .NET development framework, enables IronPython to be used on Linux, Mac OS, and BSD systems.

But IronPython has few differences from the CPython (Python) implementation that everyone else uses. One major thing is IronPython is a managed application, CPython is written in C.

And that is some basic but important things that we all should know before writing applications using IronPython.

IronPython is not included in the .NET Framework. So to use it, you will have to install it.

To download and for more information, visit IronPython web site.

When you have installed IronPython in your machine, you must wonder that whether it has added some new project templates to the Visual Studio. It will not and you can find the Python Tools for Visual Studio from the following link.

So enjoy writing applications using IronPython. Appreciate your feedback.

Happy Coding.