📜 ⬆️ ⬇️

What Xamarin developers should know at the beginning of 2017

We present you the Friday selection of useful guides and cheat sheets from James Montemagno for developers of different levels.



Further, the story will be conducted on behalf of the author.

I was very inspired by Scott Hanselman’s recent post on his blog about what .NET developers should know at the beginning of 2017. And I decided to go a little further and write a small guide for Xamarin developers creating iOS, Android and macOS applications in .NET. So I contacted Chris Hardy , and we jointly prepared an extensive list of concepts and useful resources related to Xamarin. Before we begin, you should definitely visit Scott's wonderful blog, as it is just full of great information. In addition, in order to make this post as useful as possible, I divided it into special sections: “need to know”, “should know” and “not bad to know”, besides I prepared special sections for iOS and Android.
')
When you're ready to get started with Xamarin, head to the portal , which is definitely the perfect place for novice developers. It was there that I began my work in the field of mobile development back in 2011. So, let's start!

Where to begin?


For those who wish to read, download, study and look at Xamarin a lot, we recommend to immediately take note of the following portals:


Must Know: Xamarin


What is Xamarin? Thanks to the Xamarin platform, developers can create fully native applications for iOS, Android, and macOS using C #, F #, or even VB.NET. At the same time, there is 100% access to the native API and the ability to share logic with other .NET applications.

We have one super-optimized .NET runtime that delivers .NET to iOS, Android, macOS, IoT, Linux, PS4, Xbox, etc. It implements the .NET API and powers the .NET Standard, so you don't have to worry about the implementation under the hood.

Traditional Xamarin development , also known as native Xamarin development, gives developers the ability to share application business logic and create native user interfaces for each platform with 100% access to each API.

Xamarin.Forms development offers developers a cross-platform abstraction user interface for iOS, Android and Windows. User interfaces can be created in XAML code or other form, and in addition, native controls are installed at runtime for each platform. In addition, MVVM (Model-View-ViewModel) features such as data binding and control are offered. Access to native APIs is possible through the project platform and dependency services.

Cross-platform code sharing




There are several ways to use common code in different applications:


Library Sources


There are many APIs available in .NET and on each platform, but sometimes you want more! And here you can get them:


Libraries


Let's take a look at some really cool libraries built or maintained by Xamarin:


Need to know: iOS


Extensions are widgets that are provided by iOS in standard circumstances, such as, for example, in the "Notification Center" when a user requests a keyboard or edits photos. All extensions are installed in conjunction with the Container application and activated from a specific “extension point” in the Host application.

watchOS is a specific version of iOS that is designed for Apple Watch devices.
tvOS - Apple released the 4th generation of Apple TV hardware, featuring a redesigned console with touch support and a new operating system (based on iOS9).

Registration profiles - when you need to install an application on a device or release it in the App Store, you need to get a developer account and create a registration profile. They must bundle devices, accounts, and development computers together.

Need to know: Android


Android Wear is a version of Android that is designed for wearable devices like smart watches.

Keystore - used to sign Android applications in order to place them in the appropriate stores.

Parsing APIs & SDKs — compiling, minimizing, planning — everything that is important and worth exploring. Check out a short video on the topic.

Must Know: Xamarin


Linker is used to reduce the size of applications for iOS and Android , performs a static analysis of the application in order to determine which nodes, types and members of classes are used in it. Thanks to this, any unused item will be discarded.

IL is a kind of intermediate language that is created during compilation. As Scott wrote: C # are apples, of which IL makes apple sauce, and JIT / AOT and the runtime are apple juice.

AOT - stands for Ahead of Time Compilation (“compile on advance”) and takes IL and compiles it into machine code in order to execute the resulting binary file in its native form. This is what Xamarin.iOS uses.

JIT - It stands for Just in Time Compilation (“instant compilation”) and accepts IL and compiles it, preparing to run as machine code. This is what Xamarin.Android uses.

You should know: iOS


Storyboard allows the developer to define both presentation controllers and navigate between them on the design surface, and also offers WYSIWYG editing the user interface of the application.

XIB is an iOS View XIB template in which you can add a standalone .xib file that can be attached to a specific inverse class.

Registrars are code that exposes managed code to Objective-C. It accomplishes this by creating a list of each managed class inherited from NSObject.

You should know: Android


Dalvik & ART . ART is an Android runtime that is used by applications and some system services on Android. ART and its predecessor Dalvik were originally created specifically for the Android project.

Multi-Dex - the Android application (APK) consists of executable bytecode files in the form of Dalvik Executable (DEX), and they contain the compiled code used to run the application. The DalvikExecutable specifications limit the total number of methods that can be referenced in a single DEX file to 65,536. Multi-Dex creates several DEX files for the APK, and thus, limitations can be circumvented.

ABI (Application Binary Interface) - one APK may contain machine code to support several different architectures. Each collection of architecture-specific code is associated with a binary application interface (ABI).

Android and Managed Callable Wrappers are what allow .NET to communicate with Java and vice versa.

Android Virtual Devices are Android emulators that are used to debug applications.

HAXM (Hardware Accelerated Execution Manager) is a software for Intel for Windows and macOS, designed for virtualization, thanks to which you get amazing AVDs.

It would be nice to know everything


Xamarin.Forms Roadmap is a great strategic plan for upcoming features and fixes for Xamarin.Forms.

The Xamarin profiler integrates with existing tools for collecting information about Xamarin applications. Use it to look for memory leaks, eliminate performance bottlenecks, and also polish your application before letting it float free.

Model-View-ViewModel (MVVM) is an architectural template that was invented with XAML into account. The template establishes the separation of the user interface XAML (provision) and the source data (model) through a class that serves as an intermediary between the view and the model (ViewModel). View and ViewModel are often linked through data bindings defined in a XAML file. The BindingContext for the view is typically an instance of the ViewModel.

Custom linker - if the set of options available by default is not enough, then you can control the linking process using an XML file, which will describe what you need from the linker.

Portals that are worth taking note



Thank you for the translation.


Alexander Alekseev - Xamarin-developer, freelancer. Works with the .NET platform since 2012. Participated in the development of a procurement automation system at Digamma. C 2015 went into freelancing and switched to mobile development using Xamarin. Currently working at StecPoint on an iOS application.

It manages the XamDev.ru resource and the Xamarin Developers community in social networks: VK , Facebook , Telegram .

Source: https://habr.com/ru/post/321092/


All Articles