1.3.3 • Published 4 years ago

unit-of-work-library v1.3.3

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

Motivation

  • Improvise microservice(s) architecture layer by introducing Unit of Work design pattern in-order to solve common problem related to handling database transactions

UoW Description

  • Problem - Irregularity of Handling database transaction in Service Layer via ORM
  • Solution - Using Design Pattern : Unit Of Work (Group one or many operation/work into Single Transaction as unit)
  • Library Responsibility -
    • Handles Database transaction operations like- create connections, commit, rollback, release connection, etc
  • Benefits of using this Library -
    • Layered Architecture
    • Uniformity of Code Guaranteed
    • Error Handling taken care
    • Plug-and-play (just import)
    • Solves Concurrency Problem
    • Structures your database transactions flow
    • Removes Code-smell i.e- Managing database transaction in Service Layer

unit-of-work-lib

  • Unit of Work pattern is used to group one or more operations (usually database operations) into a single transaction or “unit of work”, so that all operations either pass or fail as one.
  • for example of we want to save/POST data in sequential order but transactions fail in while saving the data in some table then ==> How we will handle this transaction ? (Instead of re-writting code -> Create a design pattern/ Helper functions which can be used by other feature modules while performing db transactions )
  • NOTE: Managing database transactions in your service layer as a code smell.

1.3.3

4 years ago

1.3.2

4 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.0.19

4 years ago

1.0.18

4 years ago

1.0.17

4 years ago

1.0.16

4 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.21

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago