Giter Site home page Giter Site logo

nathaniel-akubuo / stacked Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stacked-org/stacked

0.0 0.0 0.0 60.61 MB

A Flutter application architecture created from real world scenarios

Dart 95.38% Kotlin 0.12% Swift 0.29% Objective-C 0.02% HTML 0.27% Ruby 0.25% CMake 1.65% C++ 1.90% C 0.13%

stacked's Introduction

Stacked

An architecture developed and revised by the FilledStacks community. This architecture was initially a version of MVVM as described in this video. Since then Filledstacks app development team has built 6 production applications with various requirements. This experience along with countless requests for improvements and common functionality is what sparked the creation of this architecture package. It aims to provide common functionalities to make app development easier as well as code principles to use during development to ensure your code stays maintainable.

Here you can watch the full video series for an in depth dive of this architecture.

How it works

The architecture is very simple. It consists of 3 major pieces, everything else is up to your implementation style. These pieces are:

  • View: Shows the UI to the user. Single widgets also qualify as views (for consistency in terminology) a view, in this case, is not a "Page" it's just a UI representation.
  • ViewModel: Manages the state of the View, business logic, and any other logic as required from user interaction. It does this by making use of the services
  • Services: A wrapper of a single functionality/feature set. This is commonly used to wrap things like showing a dialog, wrapping database functionality, integrating an API, etc.

Let's go over some of those principles to follow during development.

  • Views should never MAKE USE of a service directly.
  • Views should only contain logic if necessary. If the logic is from UI only items then we do the least amount of required logic and pass the rest to the ViewModel.
  • Views should ONLY render the state in its ViewModel.
  • ViewModels for widgets that represent page views are bound to a single View only.
  • ViewModels may be re-used if the UI requires the same functionality.
  • ViewModels should not know about other ViewModels.

That's quite a bit of "rules", but they help during production. Trust me.

Stacked's place in your architecture

Stacked provides you with classes and functionalities to make it easy to implement that base architecture that this package is built for. There are additional things that you can add to your application that will make the usage of this architecture much more pleasant. This will be discussed in full on the architecture series that will come out soon. Everything from navigation, dependency injection, service location, error handling, etc.

Packages

In the effort of providing as much value with the stacked package as possible, the repo contains all of the other packages that extend the stacked functionality further and implements some of the base functionalities for you. It also contains third-party extensions that can be used with stacked.

Package Pub
stacked pub package
stacked_generator pub package
stacked_services pub package
stacked_hooks pub package
stacked_themes pub package
stacked_crashlytics pub package
stacked_firebase_auth pub package
stacked_localisation pub package
stacked_localisation_generator pub package

Each package folder contains instructions on how to use the package so please look at the README per package for detailed examples.

stacked's People

Contributors

filledstacks avatar eb-so avatar eimen2018 avatar hurbes avatar ferrarafer avatar yazeedalkhalaf avatar bats64mgutsi avatar carlomigueldy avatar saileshbro avatar isaacadariku avatar elhe26 avatar zainulhassan815 avatar scullabyte avatar daoxve avatar dvagala avatar eshetulucas avatar merfire avatar gerfaut avatar r0hit-gupta avatar sebastianbuechler avatar pgudivadadiligent avatar creativecreatorormaybenot avatar rodolfosilva avatar afsal102 avatar calvintam236 avatar hannnes1 avatar jonataslaw avatar schefferbird avatar mrseth01 avatar daniilsv 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.