Build Your Own Messaging App in XAML
One of the most popular features of Xamarin.Forms is the ability to use your existing XAML experience to build UIs for iOS, Android and Windows Phone. Moments, a Snapchat clone built with Xamarin.Forms and Microsoft Azure, originally made use of the C# API for creating user interfaces. Today, I’m happy to announce that Moments has been expanded to include a XAML implementation as well, so you can build your own Snapchat clone in XAML today!
Build Cross Platform UIs in XAML
If you are coming from a Windows background, Xamarin.Forms XAML will feel right at home! If you aren’t, there are still plenty of great reasons to build your user interface using XAML.
XAML is often more succinct and readable than the equivalent code in C#. This is especially true when building complex view hierarchies with multiple layouts. Additionally, the parent-child hierarchy inherent in XML allows XAML to mimic the hierarchy of user interface objects with greater visual clarity.
Separation of Concerns
Rather than having an entire page represented in one file, XAML allows you to clearly separate views from the accompanying logic associated with the view, thus making your application more modular.
MVVM Data Binding & Commands
The Model-View-ViewModel (MVVM) architectural pattern is very common in mobile development today – and for good reason. Traditionally, MVVM allows you to further enforce separation of concerns by separating the user interface from the data, with a bridge called a view model. Typically, mobile developers can share the model and view model with all target platforms, while writing the view for each individual platform. With Xamarin.Forms, everything can be shared, including the view. XAML makes using the MVVM pattern easy through data binding and commands, which allow your view and view model to communicate with ease.
Build Your Own Snapchat Clone Today
Moments is a great sample app for seeing everything Xamarin.Forms has to offer. If you’ve ever wondered how to use custom controls from XAML, use markup extensions, implement styling, or enforce the MVVM architectural pattern through data binding and commands, Moments is the sample app for you. Moments is completely open-source and freely available under the MIT license, so building your own Snapchat clone based on Moments is easy. Follow the steps listed here, and you’ll be sending selfies to all your buddies in a matter of minutes!