Code Monkey home page Code Monkey logo

architecture-patterns-python's Introduction

Architecture Patterns with Python

Four key design patterns:

  • Repository Pattern: abstraction over persistant storage
  • Service Layer: pattern to define the start and the end of the user cases
  • Unit of Work Pattern: provide atomic operations
  • Aggregate Pattern: to enforce the integrity of the data

Chapter 1 (DDD - Domain Model)

  • DDD in nutshell -> most important thing about software is that it provides a useful model of the problem.
  • Domain model: is the mental map that business owners have of their businesses.
  • Value object is any domain object that is uniquely identified by the data it holds.
  • Entity unlike values, have identify equality. We can change their values and still recognizbaly the same thing.

Chapter 2 (Repository Pattern)

  • Repository pattern: a simplifying abstraction over data storage, allowing us to decouple our model layer from the data layer
  • Normal ORM way: Model depends on ORM, inverting the dependency: ORM depends on Model
  • Building fakes for your abstractions is an excellent way to get design feedback: if it’s hard to fake, the abstraction is probably too complicated
  • Port is the interface between our application and whatever it is we wish to abstract away
  • Adapter: is the implementation behind that interface

architecture-patterns-python's People

Contributors

a-samir97 avatar

Watchers

 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.