Lately I did some research on mobile application development in the .NET world and the first thing that popped up was of course Xamarin.
Basics
For those of you who are not familiar with it, let me explain:
With Xamarin you can create native Android, iOS and Apps for Windows Phone - all in one!
Your backend, all the business logic you need for your project, as well as your UI, only have to be defined ones. The UI code (written in xaml) and app logic (defined in C#) are shared amongst the projects in the solution which are representing the apps for the different operating systems.
Let's get started: Developing and Testing
I developed my first Xamarin app in Visual Studio 2017 and tested it directly on my Samsung Galaxy S7, which is simply connected to my notebook via USB.
Only a few steps are necessary to begin:
- Add the extension Mobile development for .NET to your Visual Studio 2017 installation
- Create a new Mobile App (Xamarin.Forms) project
- (optional) Enable developer mode on your phone if you want to test your app directly with it, which I would recommend! After enabling, VS17 did automatically detect my phone and allowed me to select it as the target, which is used to debug the software.
What I did so far
After two days of Xamarin I created two test apps.
Weather app
Displays weather information for your city of choice.
Goal(s):
- Create your first app and install it on your phone
Result: You have to start somewhere and thatβs what I did by developing my super simple weather app. Basically what happens is you insert the name of a city and the current weather of the location is queried from https://openweathermap.org/ (which btw is a really nice service).
Coffee Counter
Keep track of your daily coffee consum!
Goal(s):
- Be able to swipe and move between pages
- Use some sort of list and bindings for the UI
- Save data permanently
My next goals
- I want the UI and business logic communication completely running over bindings using MVVM pattern.
- Read data from some sort of source (e. g.local json files)
- Learn more about the different available UI components
- Implement a drag&drop function
If you have any cool app ideas for me - please let me know in the comment section!
Conclusion
So, if you are a developer (especially .NET) and want to get into app/mobile development, Xamarin is a simple and cool way to do so.
Top comments (0)