InversifyJS VS reflect-metadata

Compare InversifyJS vs reflect-metadata and see what are their differences.

InversifyJS

A powerful and lightweight inversion of control container for JavaScript & Node.js apps powered by TypeScript. (by inversify)
SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
surveyjs.io
featured
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
InversifyJS reflect-metadata
28 3
10,821 3,129
0.6% -
6.2 7.2
9 days ago about 1 month ago
TypeScript TypeScript
MIT License Apache License 2.0
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

InversifyJS

Posts with mentions or reviews of InversifyJS. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-07-06.

reflect-metadata

Posts with mentions or reviews of reflect-metadata. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-07-07.
  • TypeScript please give us types
    10 projects | news.ycombinator.com | 7 Jul 2023
    Counter to this post, as soon as I read the title I knew what this was, & I knew it was speaking exactly to something we've wanted for a long time. This is asking for more official & better supported https://github.com/rbuckton/reflect-metadata .

    TypeScript is a compiler. It has a lot of type information during compilation. We could write that type information out into a file. Instead what we do is throw that information out when the compile ends. Taking all that typing information & throwing it away at the end of compile time is a bad dumb & silly limitation. Especially for a language like JavaScript, which historically could be semi-proud it had such a strong Everything Is An Object philosophy running through it (such as the malleable prototype-based inheritance system); so much type information should be on that Class object. Reflect-metadata for example defined new methods on Reflect to store this metadata.

    I could not be more delighted to see the pennon of this website go up. We needed a rallying point for this. We needed a rallying point for keeping class data around. A rallying point for enriching the runtime with good actionable data is a good rallying point.

    It's not what's afoot here, but I think you're a bit off-base about the impossibility of adding even some type-safety. We might not be able to get exact TS type safety. But we can definitely build some safety in. Owing to the malleable prototype-based type system in JS, we can add getters/setters to objects to do a lot of type checking. This doesn't even begin to explore the possibility of what we might do with es2015's proxies, which could allow even more interesting checks to be layered in. I also wish JS had an official AST (and renderer), so had more official options for code-rewriting that might let us weave in type checks.

    What we can do as programmers is limited by what we have at our disposal. Not throwing out all the typing information, keeping it around at runtime, opens a lot of interesting doors.

  • Using modern decorators in TypeScript
    4 projects | dev.to | 2 May 2023
    Second, TypeScript 5.0 cannot emit decorator metadata. Subsequently, it doesn’t integrate with the Reflect API and won’t work with the reflect-metadata npm package.
  • Deconstructing an Object Relationship Mapper (ORM) in Typescript
    2 projects | dev.to | 4 Feb 2022
    Database columns will be mapped to domain object properties using decorators. This will include relationships and enum types. reflect-metadata stores metadata about the classes and properties. Most of the work is a simple map for each class, renaming db column properties to domain model properties and vice versa. Reflect.defineProperty holds a list of field metadata on the target class. This is where more database ORM logic could live in the future such as column type, length, etc. A base domain model entity will use this metadata to map the models appropriately.

What are some alternatives?

When comparing InversifyJS and reflect-metadata you can also consider the following projects:

Nest - A progressive Node.js framework for building efficient, scalable, and enterprise-grade server-side applications with TypeScript/JavaScript 🚀

protobuf-ts - Protobuf and RPC for TypeScript

tsyringe - Lightweight dependency injection container for JavaScript/TypeScript

sequelize-typescript-decorators - Sequelize (SQL ORM for Node) Typescript Decorator that simplifies declarations of Sequelize models...

typedi - Simple yet powerful dependency injection tool for JavaScript and TypeScript.

arktype - TypeScript's 1:1 validator, optimized from editor to runtime

awilix - Extremely powerful Inversion of Control (IoC) container for Node.JS

di-compiler - A Custom Transformer for Typescript that enables compile-time Dependency Injection

webpack - A bundler for javascript and friends. Packs many modules into a few bundled assets. Code Splitting allows for loading parts of the application on demand. Through "loaders", modules can be CommonJs, AMD, ES6 modules, CSS, Images, JSON, Coffeescript, LESS, ... and your custom stuff.

ferocity - Write Java expression trees, statements, methods and classes with a LISP-like internal DSL

vue-property-decorator - Vue.js and Property Decorator

typescript-needs-types - TypeScript please give us types.