Giter Club home page Giter Club logo

zam_block_architecture's Introduction

Block Architecture

Architecture that bridges the gap between Business Analysts and Developers.

What's inside the package

Check out all the components in detail here

How to use

class OddNumberRule extends CustomRule<int, int> {
  final int fact;
  int get value => fact;

  const OddNumberRule(this.fact);

  bool isSatisfied(int fact) {
    return fact % 2 != 0;
  }
}

class UpperBoundRule extends CustomRule<int, int> {
  final int fact;
  final int limit;
  int get value => fact;

  const UpperBoundRule(this.fact, this.limit);

  bool isSatisfied(int fact) {
    return fact < limit;
  }
}

void main() {
  final input = 13;
  final rule = SatisfyAllRule(input, input, children: [
    OddNumberRule(input),
    UpperBoundRule(input, 20),
  ]);
  final ruleResponse = rule.execute();
  print(ruleResponse.isSuccess); // prints true

  final input2 = 21;
  final rule2 = SatisfyAllRule(input2, input2, children: [
    OddNumberRule(input2),
    UpperBoundRule(input2, 20),
  ]);
  final ruleResponse2 = rule2.execute();
  print(ruleResponse2.isSuccess); // prints false
}

To learn more, move on to the example section or check out these dedicated examples in github.

Status

Build

Contributors

License

BSD 3-Clause License

zam_block_architecture's People

Contributors

amsakanna avatar

Watchers

 avatar

zam_block_architecture's Issues

Dependency Updates

Meta

Name Description
Version 0.0.1
Scope pubspec.yaml

Dependencies

  1. zam_core - 0.5.0
  2. zam_test - 0.3.0
  3. sdk - 2.13.0
  4. zam_command_pattern - 0.1.0

Infra: Template upgrade 0.5.0

Meta

Name Description
Version 0.0.1
Scope infra

Template Version

0.5.0

Changes

  1. Update issue templates.
  2. Update cicd configurations.
  3. Remove scripts directory.
  4. Fix build tag in README.md.

Bug: FromValueRule constructor valueGenerator parameter type is wrong

Description

Unable to use FromValueRule since its valueGenerator parameter doesn't accept a function with nullable return type.

Current Code

FromValueRule(this.fact, VALUE Function(FACT fact) valueGenerator)

Expected Code

FromValueRule(this.fact, VALUE? Function(FACT fact) valueGenerator)

Changes

  1. Change FromValueRule constructor valueGenerator parameter type to VALUE? Function(FACT fact)

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.