Giter Site home page Giter Site logo

missym2 / samplesurveyapp Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 1.0 515 KB

This .Net Maui app, divided into Core and UI projects, demonstrates a simple survey with 3 different types of questions, review, crud, change of orientation and localization

C# 100.00%
maui mvvm navigation localization orientation-detection separation-of-concerns

samplesurveyapp's Introduction

SampleSurveyApp

Overview

This appcontains 14 questions

  • single selection, multi-selection and text types
  • a review page with ability to insert user selected survey data
  • generic repository

It is a .Net 7.0, .Net Maui and Xunit app that has been created as a template that includes best practices for app development. To that end it includes the following:

  • Separation of Concerns: loosely coupling database and UI through the use of interfaces and MVVM architecture

  • DRY principles: abstractions of database operations, use of base classes

  • Modularity that allows for unit testing the data and business logic

  • Dependency Inversion: High level modules are not dependent on low level modules. The TodoSampleApp uses dependency injection, interfaces and abstraction.

    Techniques

    • MVVM architecture
    • Localization wire-up with Spanish and English
    • Shell navigation
    • CRUD services with local Sqlite db
    • Orientation detection and change of UI (Portrait and Landscape)

Structure

Solution Name: SampleSurveyApp

Projects:

  • SampleSurveyApp.Core Contains all data and logic-related folders, including all models, view models, services and database context for local Sqlite db. Question and Answer data must be added to the database with required information. A method is run at the beginning of the survey session to load all currently available questions and answers.

    • /Models - SurveyQuestionModel: contains questions, question type and all descriptive information for question - SurveyAnswerModel: contains all answers, linking field to appropriate question, navigation information for that response - SurveyModel: Contains information on created surveys - SurveyResponseModel: User selected survey responses are kept here

    • /ViewModels - MainPageVM - SurveyPageVM - BaseVM, Interfaces for services

    • /Services - Interfaces for services

  • SampleSurveyApp.Maui Contains all user interface folders, including all views, images and services directly related to the UI. These services include navigation between views, display messages and user preferences

    • /Pages
      • MainPage
      • SurveyPage
    • /Services
      • MessageService, NavigationService, UserPreferences
      • NavigationServic
      • UserPreferences
  • TodoSampleApp.Tests

    // Not complete: Contains mocks of services with verification tests. Also, contains basic test on each view model.

Libraries

  • SampleSurveyApp.Core

    • CommunityToolkit.Mvvm
    • sqlite-net-pcl
    • SQLitePCLRaw.bundle_green
    • SQLitePCLRaw.provider.dynamic_cdecl
  • SampleSurveyApp.Maui

    • Microsoft.Extensions.Logging.Debug
    • CommunityToolkit.Maui
  • SampleSurveyApp.Tests (NO TESTS, YET)

    • Microsoft.NET.Test.Sdk
    • xunit
    • xunit.runner.visualstudio
    • coverlet.collector
    • Moq
    • FluentAssertions

Other Features

  • .Core
    • Task Extension
    • Validation Rules
  • .MAUI
    • Data Triggers, Event Triggers
    • Shell Flyout Menu with Menu footer and header
    • QueryProperty
    • Use of icon library and image
    • CollectionView Grouping
    • minimal but customized SplashScreen
    • minimal but customized icon

samplesurveyapp's People

Contributors

missym2 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

dewelloper

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.