Posts

Showing posts with the label #MVVM

What is .NET MAUI?

Image
What is .NET MAUI and Why It’s Important .NET Multi-platform App UI (.NET MAUI) is Microsoft’s latest and most advanced UI framework that enables developers to build cross-platform applications using a single codebase for Android , iOS , macOS , and Windows . It’s a significant evolution from Xamarin.Forms, rebuilt on top of .NET 6+ and now enhanced in .NET 9 to offer better performance, easier maintainability, and modern development patterns. Join our exclusive WhatsApp group for Xamarin and .NET MAUI developers to connect with experts, share insights, and get help with your projects. Whether you're a beginner or an experienced developer, this group is the perfect place to enhance your skills and collaborate with the community. Please, support my blog by clicking on our sponsors ad! 🧭 Why .NET MAUI? Single Project Structure One Language, One Stack Full Native Performance Hot Reload MVU and MVVM Support 🔍 Deep Dive into .NET MAUI Archit...

How the .NET MAUI Project Structure Works

Image
📦 How the .NET MAUI Project Structure Works – A Beginner's Guide .NET MAUI (Multi-platform App UI) is the evolution of Xamarin.Forms, designed to simplify cross-platform development by unifying Android, iOS, macOS, and Windows apps into a single project structure. Unlike Xamarin, where developers needed to juggle multiple projects per platform, .NET MAUI introduces a cleaner and more maintainable single-project approach . This blog will walk you through the entire structure of a MAUI project in detail, breaking down each part so you understand exactly what's happening under the hood. Join our exclusive WhatsApp group for Xamarin and .NET MAUI developers to connect with experts, share insights, and get help with your projects. Whether you're a beginner or an experienced developer, this group is the perfect place to enhance your skills and collaborate with the community. Please, support my blog by clicking on our sponsors ad! 📁 Solution Explorer: First Loo...

.Net MAUI - MVVM Pattern for Cleaner Architecture

Image
Applying the MVVM Pattern for Cleaner Architecture in .NET MAUI Building cross-platform apps in .NET MAUI is exciting — but if your code isn’t organized well, you’ll quickly end up with tangled spaghetti. That’s where MVVM (Model-View-ViewModel) comes to the rescue. Join our exclusive WhatsApp group for Xamarin and .NET MAUI developers to connect with experts, share insights, and get help with your projects. Whether you're a beginner or an experienced developer, this group is the perfect place to enhance your skills and collaborate with the community. Please, support my blog by clicking on our sponsors ad! In this blog, we’ll: Cover both basic and advanced MVVM implementation Write and explain a reusable BaseViewModel Learn how to use async APIs, loading indicators, and commands Help you prepare for interviews with a curated question list at the end 🎯 At the end of the blog, you'll find MVVM intervi...

Interview Success: Must-Know Xamarin and .NET MAUI Questions

Image
Introduction In the world of mobile development, Xamarin and .NET MAUI are powerful frameworks for building cross-platform applications. As developers delve into these technologies, they often face a series of common questions during interviews or while exploring best practices. This blog provides concise answers to frequently asked questions about Xamarin and .NET MAUI, covering various aspects from basic concepts to advanced topics. Whether you’re preparing for an interview or looking to sharpen your knowledge, these insights will help you navigate the intricacies of these frameworks with ease. Please, support my blog by clicking on our sponsors ad! 1. Introduce yourself? This is where you would introduce yourself and provide a brief overview of your background, experience, and expertise in Xamarin and .NET MAUI. 2. What is Xamarin? Xamarin is an open-source platform for building modern and performant applications for iOS, Android, and Windows with .NET. ...

Master Flutter MVVM: Easy Guide for Efficient App Development

Image
  Introduction to MVVM Architecture MVVM (Model-View-ViewModel) is a software architectural pattern widely used in building user interfaces, particularly in frameworks like WPF, Xamarin, and Flutter. It's an evolution of the MVC (Model-View-Controller) pattern, aiming to improve separation of concerns and facilitate testability and maintainability of code. In MVVM, the UI is divided into three components: Model: Represents the data and business logic of the application. It encapsulates the data and operations that manipulate that data. The model notifies the ViewModel of any changes, but it's unaware of the UI. View: Represents the user interface. It's responsible for displaying data and capturing user input. Unlike MVC, the view in MVVM is passive and doesn't directly interact with the model. Instead, it binds to properties and commands exposed by the ViewModel. ViewModel: Acts as an intermediary between the view and the model. It exposes properties and commands tha...

Taxi booking in Flutter - locationviewmodel.dart

Image
 Create a new dart file named as 'locationviewmodel.dart in lib -> viewmodels folder and paste following code. Please, support my blog by clicking on our sponsors ad! import 'package:flutter/cupertino.dart'; import 'package:myfirstproject/models/AreaSpotModel.dart'; import 'package:myfirstproject/models/locationmodel.dart'; class LocationViewModel extends ChangeNotifier { List<LocationModel> _list = []; List<LocationModel> get locationList => _list; set locationList(List<LocationModel> value) { _list = value; } void GetData() { locationList = [ LocationModel( Name: 'Mugal Garden', Img: 'https://images.hindustantimes.com/img/2022/12/03/original/fbdf0039359861ef8026921ab8fd5382_1670055785607.jpg', Distance: '25 km', Rate: '80.0', Address: '1A, Bombay Market-Punagam Rd, Krishnakunj Society, Punagam, Varachha, Surat...

MVVM MAUI Ecommerce APP Address Entry Form

Image
  Create a Address Entry Form in xamarin Please, support my blog by clicking on our sponsors ad! Watch video to understand code. For fontawesome refer this   link Lets create all Controls ImageLabel.xaml <ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="Ecommerce.UI.Template.CustomControls.ImageLabel"> <Grid RowDefinitions="Auto,Auto"> <Label x:Name="lblIcon" FontFamily="{x:DynamicResource FontAwesomeFamily}" HorizontalOptions="Center" TextColor="Gray" Grid.Column="0" Grid.Row="0"></Label> <Label x:Name="lbl" Grid.Column="0" Grid.Row="1" HorizontalOptions="FillAndExpand" HorizontalTextAlignment="Center" TextColor="Gray"></Label>...

MVVM and MAUI - Checkout page for Ecommerce APP

Image
MVVM and MAUI - Checkout page for Ecommerce APP Please, support my blog by clicking on our sponsors ad! Watch this video to understand code. For fontawesome refer this   link First We will create all template CheckoutStepTemplate.xaml <ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="Ecommerce.UI.Template.Pages.CheckOut.Template.CheckoutStepTemplate" xmlns:fontawesome="clr-namespace:Ecommerce.UI.Template.Models"> <Grid x:Name="grid" ColumnDefinitions="Auto,*,Auto,*,Auto" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"> <StackLayout Grid.Column="0" Spacing="5" > <Label x:Name="lblCartCircle" Text="{x:Static fontawesome:Solid.Circle}" HorizontalOpt...