InversifyJS
vue-property-decorator
Our great sponsors
InversifyJS | vue-property-decorator | |
---|---|---|
28 | 10 | |
10,790 | 5,525 | |
1.0% | - | |
6.5 | 3.2 | |
about 1 month ago | about 1 year ago | |
TypeScript | TypeScript | |
MIT License | MIT License |
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
-
How to Apply SOLID with Testing JS/TS Class Methods
Take a class for which we are tasked to write a unit test. This class may have a dozen methods and a dozen more attributes. In my environment we were already using inversify to dependency inject into this class, and using container snapshot and restore as setup and teardown operators, in our jest test file. But it began getting out of control even after refactoring into test cases and test runners.
-
VulcanSQL: open-source data API framework. Empowering you to construct APIs exclusively with SQL.
Inversify (https://inversify.io/) for IoC.
-
SOLID explicado com TypeScript
Alguns frameworks trabalham desta forma por padrão, como é o caso do Angular, quando este não é o padrão do framework que utilizamos podemos usar alguma biblioteca, como a Inversify ou tsyringe da Microsoft.
-
Using modern decorators in TypeScript
Using decorators required setting an --experimentalDecorators experimental compiler flag. Several popular TypeScript libraries, such as type-graphql and inversify, rely on this implementation.
-
Typesafe, (almost) Zero Cost Dependency Injection in TypeScript
inversify
- InversifyJS has reached 100,000,000 downloads on npm
-
InversifyJS has reached 100,000,000 downloads on npm 🎉 🚀
It blows 🤯 my mind to think that my #opensource project InversifyJS has reached over 100 MILLION DOWNLOADS on npm. InversifyJS is a lightweight (<50KB) but powerful Inversion Of Control (IoC) container for #JavaScript applications powered by #TypeScript. It is used to implement Dependency Injection (DI) in thousands of applications, including high-profile products like Microsoft Sway and over forty thousand open source repositories on #GitHub and over two thousand open source packages on #npm.
-
Is dependency Injection popular in Nodejs?
we use https://inversify.io/ in production, it works great.
- SOLID com Typescript: O resumo completo com exercícios
- Has anyone successfully created a Dependency Injection using typescript decorators?
vue-property-decorator
-
How often do you use Decorators, and if you do was there any push back within your team?
In my last project these two were used a lot: https://github.com/kaorun343/vue-property-decorator and https://class-component.vuejs.org/
-
Vue + TS without class component ? No way!
Designed for vue 3, do the same work like vue-class-component and vue-property-decorator.
- Any vue 3 with Typescript resources or tutorials ?
-
Objects and v-model in Vue3
When I was using Vue2 along with vue-class-component and vue-property-decorator it was easy to synchronize v-models between components simply using @ModelSync(). When Vue 3 came out with its Composition API another way was needed to achieve the same result as if Class Component was used.
-
Why I Love Vue 3's Composition API
This is still not better than Vue Class Component & Vue Property Decorator . Very easy syntax, looks like any other OOP language, and looks so much cleaner.
- Wait for Vue 3 to add Typescript?
-
Is it ready already?
vue-property-decorator: This library works hand in hand with vue-class-component so that you can define properties/methods on your class for things like watchers, properties, etc:
-
How to create a scalable vue.js setup (Part I)
The next thing to tackle for a scalable application is, that we want to have a well written component that is easy to read and to reuse. Vue components are usually single file, which has it's benefits (e.g. if you want to change some css, and then html and oh, you also need to introduce this property in typescript...). It's also easier to maintain some code standard about how large a component should possibly become, if you had single file components (e.g. >250loc => linter error). To additionally increase readability, I like to use typescript class components flavoured with vue property decorators.
-
You should be using Vue Class Component
Here, we will cover only the basics, the idea is in the future to create an article on Vue-Property-Decorator that complements the usage of this library.
-
Aprendizados de 1 ano de projeto em vue.js com escopo ultra caótico
Vue2 não é muito bom pra lidar com typescript de forma vanilla, então o próprio core team e a comunidade criaram soluções pra você ter sintaxes alternativas (nada muito diferente) que suportam os toolings mais modernos e que tiveram maior adoção no decorrer dos últimos anos, como o vue-class-component, vue-property-decorator e o vuex-class. O caso mais notório de ferramenta que tira proveito disso, com certeza é o typescript. Com essas tecnologias, usar typescript é 100% possível, e usando essas sintaxes alternativas, diria até que o código fica mais enxuto e claro do que o vue sem nada (@Action do vuex-class, pra mim, tem uma sintaxe mais agradável que mapActions do vuex cru, por exemplo). Começamos o projeto sem, mas o Brunão começou a implementar usando isso e com uma curva bem pequena de aprendizado, aderimos felizes ao novo método de escrever componentes vue2.
What are some alternatives?
Nest - A progressive Node.js framework for building efficient, scalable, and enterprise-grade server-side applications with TypeScript/JavaScript 🚀
composition-api - Composition API plugin for Vue 2
tsyringe - Lightweight dependency injection container for JavaScript/TypeScript
vue-class-component - ES / TypeScript decorator for class-style Vue components.
typedi - Simple yet powerful dependency injection tool for JavaScript and TypeScript.
class-validator - Decorator-based property validation for classes. [Moved to: https://github.com/typestack/class-validator]
awilix - Extremely powerful Inversion of Control (IoC) container for Node.JS
vuex-module-decorators - TypeScript/ES7 Decorators to create Vuex modules declaratively
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.
vitesome - A simple opinionated Vue3 Starter Template with Vite.js
mixitup - A high-performance, dependency-free library for animated filtering, sorting, insertion, removal and more
vue-cli - 🛠️ webpack-based tooling for Vue.js Development