1.3.3 • Published 3 years ago

unit-of-work-library v1.3.3

Weekly downloads
-
License
ISC
Repository
github
Last release
3 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

3 years ago

1.3.2

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.0.19

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.21

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago