Giter VIP home page Giter VIP logo

cage's Introduction

Put your flutter in a cage

Cage · GitHub license Pub Package Build Status codecov

Cage is an opinionated framework for developing Flutter applications. Cage aims to provide structure and guidance in a new world of cross platform mobile app development.

Cage builds onto the concepts of dependency-injection (DI), model-view-presenter (MVP) and flux-style pattern for interactions.

The command line interface (CLI) is hosted in this repository

Overview

cage consists of three fundamental foundations:

  • Modules
  • Services
  • Widgets

Modules

A module represents a modular package to be used upon other modules or bootstrapping the application. A module declares services and widgets. Modules can import other modules, so that module parts can be reused and shared.

Looking for examples?

Services

A service can be any object you like. A service can be a number, a string or a complex class instance. Services can be provided to the complete application or be isolated in your current module.

Looking for examples?

Widgets

Since Flutter is build on widgets, cage of course cannot avoid widgets. Cage wraps cages and provides separation of concern for widgets. While Flutter does not give any rules for structuring your widgets, Cage has an opinion for you. Business logic and view logic are separated, your models shall exist separately.

Looking for examples?

Don't quite like what you see?

Flutter currently does not provide any access to metadata. Thus fancy metadata/annotations used by libraries like angular currently do not work out of the box. For further development build_tools will be evaluated and may can be used productive someday. This will hopefully decrease the usage of currently needed boiletplate code.

cage's People

Contributors

rtk avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cage's Issues

Creating widgets with cage should be possible

Is your feature request related to a problem? Please describe.
Currently there is no way to create widgets and widget-wrapping structures with cage.

Describe the solution you'd like
A Model-View-Presenter Pattern should be used to separate business code and view code.

Describe alternatives you've considered
Maybe MVC?

Additional context
Add any other context or screenshots about the feature request here.

Add support for state management

Is your feature request related to a problem? Please describe.
Currently there is no clear way for data flow in cage applications. Some state management would be nice to have.

Describe the solution you'd like
State management like vuex.

Describe alternatives you've considered
Function way, but classes all the way

Additional context
Flux, Vuex, ...

Creating modules should be possible

Is your feature request related to a problem? Please describe.
Currently there is no way to declare a module. A class for creating Modules should exist. It should be exposed to the public API.

Describe the solution you'd like
A class Module which can be instantiated.

Describe alternatives you've considered
None

Additional context
Add any other context or screenshots about the feature request here.

DI: Registering dependencies should be possible

Is your feature request related to a problem? Please describe.
Currently there is no way to register and retrieve dependencies.

Describe the solution you'd like
A dependency injection service should exist, which takes dependencies and returns them.

Add integration to flutter and flutter_test

Is your feature request related to a problem? Please describe.
Currently there is no integration to flutter runtime and flutter_test runtime. Cage should add interfaces to those runtimes.

Describe the solution you'd like
A runtime class CagedFlutter? to be instantiated which calls the runApp flutter method

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.