Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cgamesplay/vie-knex

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cgamesplay/vie-knex

implemented the VIE pattern with Knex

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

VIE - Viewer, Interactor, Entity

VIE is a design pattern for separating your data access and application logic layers. VIE fits into the traditional MVC (Model, View, Controller) pattern, by specifying how the Models should be designed. VIE does not specify how your Controllers or Views should be designed, so the developer is free to use whatever design pattern they prefer for those aspects of the system.

Core Concepts

The three components of VIE are the Viewer, Interactors, and Entities.

Entities are the basic building blocks for the application logic. An entity class typically represents a single table in a database, similar to Models in MVC. In VIE, however, the Entities are only responsible for locating and reading the records. Entities are fundamentally read-only structures and do not control modifying the underlying data source.

Interactors are methods responsible for mutating the underlying data source and may also be used to organize an otherwise complex query. The interactor is responsible for managing the access control for the mutation.

The Viewer is the owner of the underlying data source connection and is responsible for providing that connection to Entities and Interactors. The Viewer also provides authentication information to these so that they may enforce access controls as desired.

Knex implementation

This package provides a Knex implementation of the VIE pattern. See the example folder for a walkthrough of the usage and the docs folder for detailed documentation.

FAQs

Package last updated on 30 Dec 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc