Git Product home page Git Product logo

node-dry-pg's Introduction

Node DRY pg

Reusable utils library for our node microservices introducing pg as dependency and providing helper functionality! These package does NOT contain any business knowledge, but pure reusable functionality that would repeat over all services.

The main repository can be found here: JValue Open Data Service

How to use

Add the packages to your package.json as usual or use npm install --save <package-name>

License

Copyright 2020 Friedrich-Alexander Universität Erlangen-Nürnberg.

Node-DRY is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.

node-dry-pg's People

Contributors

georg-schwarz avatar sonallux avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

node-dry-pg's Issues

PG as runtime dependency or dev dependency?

Hey folks, how do we want to handle dependencies in our DRY packages?

Solution 1: export dependencies

We could bundle with the dependencies and export it. This would mean only our package has to be imported and here the pg package is also available in using projects. However, I think this is a bad style, right? However, this would make sure that pg is compatible with the right version with our helpers.

Solution 2: only use the types

We could also add no runtime dependency but just add types (and the dependency if necessary for testing) as dev dependencies. This would keep the package smaller, but the client has to add here the pg dependency itself. This could lead to situations where we get out of sync with the pg version. However, I guess it would be cleaner?

@lunedis @mathiaszinnen @MBuchalik @jsone-studios Opinions?

Naming of PostgresRepository

There are only two hard things in Computer Science: cache invalidation and naming things.

I would propose to change the name of the exported PostgresRepository class. For me, the Repository part does imply that it has something to do with the Repository design pattern. But that's not the case, because the class does neither have domain nor data mapping knowledge. Instead, it is just a tiny wrapper around the pg library.

I would change the name to PostgresDatabase or PostgresClient. @georg-schwarz what do you think about that or do you have other name suggestions?

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.