Skip to content

BKNorton/ContactsApp.Maui

Repository files navigation

Description

I created this project while taking a Udemy course. This was just something I made while following along with the course. I plan to use what I learned here to create the inventory app that I am working on. (I have already built the web api for it and the UI for most of it)

This app allows users to add, delete, edit, and view their contacts and persists the data in a SQLite database in local memory.

This project uses Clean Architecture and MVVM principles to keep all the layers loosely coupled.

This app was made for mobile devices not Windows.

This project contains different implementations because of how the course layerd the lessons to build on what you learned.

The Process

First this app was built to be event driven. It also only used a static repository with a predefined list of contacts.

New contacts or edits to contacts could not be persisted and all changes were lost when the program stopped running.

Then this app was modified to use clean architecture.

  • This is a buisness centric model where all other outside layers are dependant on the entities.
  • It uses Use Cases to perform actions on the Repository that is pluged in.
  • With the use of dependency injection you can consume the Use Cases without worrying about where the data is or what repository you are using.

Then the course had you add a SQLite database so the user could persit all their data into an inmemory database/

What I learned

I learned how to build UIs using XAML

  • Responsive to user input
  • Two-way data binding
  • Visually appealing and intuitive
  • Design for different device specifications

I also learned new architectures to help construct apps in ways that is more modularized to seperate the UI from the UI logic and the business logic. This is helpful in the development process so that multiple people can be working on different parts of the project at the same time.

  • MVVM or Model-View-ViewModel allows UI development to be done seperate from all logic implementation.
  • Clean Architecture layers everything around the core business logic. This allows you to seperate the dependency of the databse so if the type of database changes you can just use dependency injection to switch out the repository
    • Use Cases are the layer outside the buisness logic that use repository plugins to work with the database

Next Steps

I am on the last module of this course. The last module is where I will use entity framework with a web api to work with the database.

  1. Finish Udemy course and commit changes.
  2. Use as a refrence and continue working on my Item Inventory app.

Instructions

How to run application

  1. After cloning the repository down, open up the Solution.
  2. In the dropdown for the debugger, go into Android Device Manager and add a new Emulator. I am using Pixel 5 API33
  3. Screenshot (24)

  4. Select the emulator and run it.
    • Do not run in windows. There are bugs that crash the project in windows when I have tried it.
  5. You can add new contacts by clicking the add button
    • Name and Email are required and Email must be properly formatted.
  6. You can swipe a contact from the Contacts page to the left to access the Edit or Delete buttons for the particular Contact.
  7. You can use the searchbar to look for a specific Contact by any of its properties.

Releases

No releases published

Packages

No packages published

Languages