Code Monkey home page Code Monkey logo

nonobvious's Introduction

nonobvious

The first python package to jump across the English Channel!

https://travis-ci.org/eykd/nonobvious.svg?branch=master https://coveralls.io/repos/eykd/nonobvious/badge.png

This package attempts to implement the "functional core, imperative shell" pattern described in Gary Bernhardt's talk on Boundaries, using some ideas found in the Ruby obvious project.

Functional Core, Imperative Shell

The basic idea is that your core domain model implements business logic using functional techniques, with immutable values and copy-on-write. The functional core is wrapped by an imperative shell which drives the core models and interacts across the boundary with the outside world through "primitive" values. The immutable domain models can be easily converted to primitive data structures whose state has no affect on the immutable core.

nonobvious.models and nonobvious.fields provide a declarative modeling language, similar to Django's model objects, but without an ORM. We can easily use validators and adaptors from the valideer project to ensure that the models are always in a valid state and can easily be constructed from standard python data structures.

By making use of concon.frozendict, concon.frozenlist, and concon.frozenset within model adaptors allows us to model complex data structures guaranteed to be correctly formed at all times.

As for the imperative shell, at present, you're on your own!

nonobvious's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.