Chapter 1. Getting Started

In this first chapter, we will learn how to install Xamarin Studio and the Xamarin plugin for Microsoft Visual Studio and have a quick tour of both. Then we will move towards the creation of our first Hello World application and get it running on the emulator. We will cover the following topics:

  • Installing the Xamarin Suite
  • Building a HelloWorld App!

Introduction

Xamarin Studio is a cross-platform integrated development environment. It is works across platforms in two ways: the IDE is available on Mac OS and Windows (no Linux support announced), and it allows the development of software for Mac OS, iOS, and Android.

While its design can remind you of Xcode, the Apple IDE is only available to Mac owners, Xamarin Studio offers stunning features. Indeed, this IDE allows users to discover the new API easily through a powerful code completion enhanced by the ability to quickly learn about the method and required types. The following screenshot provides an overview of this code completion and the relevant documentation:

Introduction

While being trained as a programmer, it seems that I have not developed any artistic capabilities and certainly won't in future. This is quite a problem, and you've certainly already faced an awkward situation like this: You: "Look at these amazing features!" Project Manager/Client: "Meh. It is despicable; the colors don't match with each other. Could you try this in light blue?".

Xamarin Studio, just like any modern IDE, allows the generation of user interfaces in a WYSIWYG (What You See Is What You Get) interface. In this way, it is a tool not only for programmers but also for designers. Using Xamarin Studio, you will build classy and beautiful apps, while Visual Studio and Netbeans barely provide functioning interfaces. The following screenshot shows the user interface menus and an example of such user interfaces:

Introduction

Every programmer experienced with modern IDEs such as Visual Studio, XCode, and Eclipse generally uses, on a daily basis, a step-by-step debugger. A debugger allows you to set breakpoints to stop code execution and then walk inside the code, instruction by instruction, while inspecting the values of variables. The step-by-step debugger included in Xamarin Studio is really simple to use yet efficient. The best part about it is that it allows debugging in the emulator (a virtual Android phone on your computer; we'll come back to this later) or on an Android device, live. An example implying the introspection of a variable counting the number of clicks on a button is shown in following screenshot:

Introduction

Among a long list of other really useful and entertaining features, Xamarin Studio also excels in creating a highway to your customers' mobile devices. Indeed, publishing apps to the Play Store (the Android market) has never been simpler. The packaging, deployment and shipment to the Play Store processes are smoothly integrated inside Xamarin Studio as shown by the follwoing screenshot:

Introduction

A quick tour of Visual Studio

Visual Studio is the Microsoft IDE used to develop in any of the various languages that comprise the Microsoft ecosystem. It can serve as an IDE for pretty much anything in the Microsoft bosom, such as console and graphical interfaces, Windows Presentation Foundation apps, websites, web applications, web services, Windows Mobile, and Windows CE. Honestly, Visual Studio is an excellent IDE that could prove very useful after practicing a little; thus, it comes with a price ranging from free to $13,299 depending on the version. Nevertheless, the Xamarin Company has built a Visual Studio plugin that could definitively fit your needs to develop an Android app if you own Visual Studio and are used to it. Xamarin also costs from $999 to $1899 per platform, but it does have a free version that offers most of the features covered in this book.

After talking about the financial aspect, let's focus on features. It turns out that all Android-focused features are exactly the same and have to be used in the same ways in almost the same menus. Choosing between Visual Studio versus Xamarin Studio will, in the end, be a personal choice that we leave to the reader's discretion. However, Visual Studio consumes a lot more resources than Xamarin Studio. Therefore, if you are not equipped with good hardware, you should definitely go for Xamarin Studio.

A quick tour of Visual Studio

In the rest of this book, screenshots and paths will be based on Xamarin Studio, which we believe is most used by newcomers to Android development (who use Xamarin and C#). We will indicate Visual Studio paths and options when they are different from those in Xamarin Studio.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.73.35