GithubHelp home page GithubHelp logo

belleradev / dynamism Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aseemwangoo/dynamism

0.0 0.0 0.0 609 KB

ศึกษาการทำ integration test

Ruby 3.77% Objective-C 0.05% Kotlin 0.35% Dart 88.72% Swift 1.92% HTML 5.19%

dynamism's Introduction

screener

  • This is a sample application.
  • Uses MVVM pattern
  • Tries to encourage the use of boundaries (by using the concept of packages)

Getting Started 🎯🎯

  • Download the repo
  • Make sure you are on the Flutter Stable Channel (1.22.6)
flutter channel stable
flutter upgrade
  • Install dependencies, when asked, after downloading the project.
  • Run the cmd
flutter run
  • You should see the app working at this point..

Architecture 🏗🏗

  • The app follows MVVM approach

  • Their is a shared folder, which comprises of all the common entities.

  • Common entites like assets, extensions, services etc

  • Take a folder, let's say home

  • It is broken down into components, models, utils (utilties if any), view and view_models

  • Let's discuss each of them

Components

  • They contain the building blocks of UI.
  • A UI may comprise of a button, or card, or a list.
  • All these items are created under their respective folders
  • Let's say for a list component,
home/components/list/xyz.component.dart

Model (from MVVM)

  • They are usually simple classes
  • For instance, let's take home
  • It would contain models folder, including all the models needed for home
home/models/xyz.model.dart

View (from MVVM)

  • These are the screens visible to the user on their device.
  • For instance, home would have views folder
home/view/xyz.view.dart
  • We have 3 views
  1. HomeView. Now home has 2 options (Egestas scleri) and (Consectur)
  2. On click of Egestas scleri, you see the PellenView
  3. On click of Consectur, you see the FringillaView

Templates

  • They are some cases, when a view has a piece of UI, that is somewhat big.

  • We extract those bits of UI, into the templates

  • Let's say for the home view, we have a template as,

home/templates/carousel/xyz.template.dart

ViewModel (from MVVM)

  • They help in transforming the data into models.
  • For instance, home would have view_models folder
home/view_models/xyz.viewmodel.dart

Utils

  • Any additional helpers or strings are put inside the utils
  • For instance, home would have utils folder, containing all the strings needed
home/utils/strings.dart

Shared

  • Their is a folder called shared, which includes all the common entities inside the app

  • For instance, all the styles, colors are placed under styles

shared/styles/xyz.dart
  • For instance, all the services are placed under the services folder
shared/services/xyz.service.dart

Data

  • Sample data files are put inside the assets
  • When needed they are fetched within the app.

Testing 🧐🧐

  • Uses golden tests https://pub.dev/packages/golden_toolkit
  • Integration tests
flutter drive \
--driver=test_driver/integration_test.dart \
--target=integration_test/app_test.dart
flutter drive \
--driver=test_driver/integration_test.dart \
--target=integration_test/app_test.dart
-d "9B4DC39F-5419-4B26-9330-0B72FE14E15E"

dynamism's People

Contributors

aseemwangoo avatar aseemwangooai avatar

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.