One week with Xamarin.Forms

After nearly 2 years of experience working with the .Net Framework and the most awesome language, C# (I’m a junior dev so I don’t have too much experience with other language except JavaScript, and you already know what to expect from it). I came across a dilemma of what I´m going to do next; either keep as a back-end web developer or go for full-stack and learn the front-end magic.

The front-end journey

As a back-end developer, sometimes I had the opportunity to work in the front side of the magic, but only for retrieving data from the server and some dynamically content to load asynchronously, and that was some time ago. If you want to get data from a server nowadays is a different story. My journey in the front-end world didn’t go too far because the boss in the front-end is Javascript and there are just too many options and frameworks, but I wanted to expand to an area where I could use my back-end skills and also work in a visual zone where the user can see what I’ve done, and then I realised that C# is not only used on the web with ASP.NET, but also on desktop and even in mobile.

Just as the image says, we live in a world where everything is mobile and connected, so it was very clear to me what path to choose, which is mobile.

Xamarin, the perfect transition

Because I already had experience working with C#, the transition to Xamarin was not that painful. Obviously, the mobile and the web worlds have their differences, even if you are working with the same language. The hardware limitation on the mobile makes you see in another perspective compared to a web server; your code has to be more efficient and asynchronous in order to have a not-laging user experience.

Xamarin comes in two different flavors: Xamarin Native(traditional approach) and Xamarin Forms. The first one is using the Native UI of each platform (iOS, android, windows phone), and the other is using single unified UI language, which in this case is XAML. You can learn more about when to use them here.

In the final analysis I decided to go with Xamarin Forms and two weeks after starting the official xamarin book, a friend came to me with a challenge. The challenge consisted in creating an application based on a given UI design that he would provide, the time limit was one week. I’m a person who likes challenges so I accepted.

The Application

Farfetch is a mobile application that allows you to shop online from boutiques around the world.

Design

All the UI pages are in this link.

Libraries

In order to create this application I used different packages; the most important was Prism, which is a framework to create maintainable applications with XAML.

Why Prism?

One should really find a reason for not use Prism; Miguel de Icaza, one of the founder of xamarin said in the last xamarin evolve keynote “I think you should use Prism”, and he is the expert, not me. Another nice reason to use Prism is something called deep linking.

So what exactly is deep linking? I’m glad you asked. Deep linking gives you the ability to navigate to a predefined navigation stack using a simple URI.

Prism also has an IoC container which is required to accomplish the SOLID principle.

Fail or Success ?

You can be the judge of that, just checkout this repository, where you can see the desire design vs the current design side by side and also more technical details.

Thank you everyone for reading my first post, if you have any suggestion hust leave it in the comment area.