Posts

Showing posts with the label #MVVM

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...