What are the advantages and disadvantages of using XAML in Xamarin.Forms?

Technology CommunityCategory: XamarinWhat are the advantages and disadvantages of using XAML in Xamarin.Forms?
VietMX Staff asked 3 years ago

The main advantage of using XAML is it provides a clean separation of markup and code, so while the developer can concentrate on the behavior of the application (i.e. the code), the graphic designers can focus on the look and feel of the application. XAML can be compiled, and it takes full advantage of the Longhorn graphics subsystem, helping developers to produce great visual effects. In a XAML file, there is a clear hierarchy of graphical elements and it is easy to understand the GUI design of the app i.e. which element encloses which other elements. The separation of concerns ensures that any changes to the visual aspects of the application may not affect the business logic.

The drawbacks of using XAML are, XAML cannot contain any logic, all the logic has to go into separate code files. It does not directly support conditional processing or loops for repetitive processing of tasks