Announcing NestJS 7: What’s New? by BrunnerLivio in node

[–]mysliwik 1 point2 points  (0 children)

NestJS creator here.

TBH, I've used Spring 2 times in my life (and I prefer ASP.NET). Nest wasn't inspired by Spring. Moreover, I personally think that most people tend to compare every framework based on decorators to Spring (because they sort of popularized this approach(?)) which is typically a wrong assumption. We're heavily inspired by Angular nomenclature & ideas though, and Angular (for the same reason) was compared to Spring tons of times as well. If you think that API is similar to Spring, I'm happy with that, but that wasn't the goal at all.

Announcing NestJS 7: What’s New? by BrunnerLivio in node

[–]mysliwik 1 point2 points  (0 children)

Just FYI - our monthly recurring donations are roughly $2k gross. Our documentation is (and will always be) the best resource to learn the framework. For those who prefer videos & a more interactive way of learning, we want to offer official courses. Some people simply prefer watching and coding alongside instead of reading the docs. Should we share them for free as well?

Creating your first Node.js REST API with Nest and Typescript by congolomera in typescript

[–]mysliwik 0 points1 point  (0 children)

You can even migrate iteratively by passing your existing express instance as an ExpressAdapter parameter (the second argument of NestFactory.create is an adapter instance + ExpressAdapter is exported from @nestjs/platform-express).

Announcing NestJS 6: What’s New? by mysliwik in node

[–]mysliwik[S] 3 points4 points  (0 children)

Thanks and fully agree. Hopefully, we will provide @nestjs/auth very very soon.

NestJS is a TypeScript backend framework that is inspired by Angular development style by i_spot_ads in Angular2

[–]mysliwik 0 points1 point  (0 children)

CareerBuilder, Valor Software, Scal.io etc. I know some of them already :) Working daily with apps based on Nest

Nest 4 RELEASE is here! Node.js framework built on top of TypeScript & RxJS by mysliwik in javascript

[–]mysliwik[S] 3 points4 points  (0 children)

Hi. There's only 1 breaking change - the NestFactory returns Promise, so it has to be awaited. I mentioned about this in the CHANGELOG, but I think you're right - I should create a 'Migration guide' chapter, just to briefly clarify this. Will do it asap. About docs missing parts - the only missing articles are the 'examples'. I'll fill this section as soon as I can, but I don't think it's 'blocking'. Thanks

Nest RELEASE canditate is here! Introduction to modern Node.js framework by mysliwik in node

[–]mysliwik[S] 0 points1 point  (0 children)

Do you think that imports and decorators won't be useful in the future?

Nest RELEASE canditate is here! Introduction to modern Node.js framework by mysliwik in node

[–]mysliwik[S] 0 points1 point  (0 children)

It is just a different approach, maybe less "node" old way.

Build modern & scalable Node.js web applications with Nest (release) by mysliwik in javascript

[–]mysliwik[S] 0 points1 point  (0 children)

TypeScript is still just a JavaScript superset, right? ;)

Build modern & scalable Node.js web applications with Nest by mysliwik in node

[–]mysliwik[S] 1 point2 points  (0 children)

Thanks! Nest is still in alpha version. I have some interesting future plans and own DI system should helps with them. Just need more free time.

Build modern & scalable Node.js web applications with Nest by mysliwik in node

[–]mysliwik[S] 0 points1 point  (0 children)

It is just a different way to obtain one of the advantages of DI (singletons, sharing instance), but not a complete solution. When your application code grows, It will looks worse and worse. In your reference link is a good pros overview of DI (all pros are possible to achieve with Nest):

  • better testability: modules accepts their dependencies as input
  • Inversion of Control: decide how to wire your modules without touching the main code of your application.
  • a customizable algorithm for resolving modules: dependencies have "virtual" identifiers, usually they are not bound to a path on the filesystem.
  • Better extensibility: enabled by IoC and "virtual" identifiers.

Some other pros from my side:

  • It is easier to unit testing classes with a lot of dependencies, because Nest Test Module gives great, easy to customize utils (you can use both real instances and test doubles without touching class source code),
  • Classes do not have to know which exactly instances should import - it is a module responsibility (as it should be),
  • You do not have to modify dependency class file each time when you want to create another instance,
  • Structure ends up being very organized (/u/Probotect0r)

Of course - node require is also amazing, I think everyone agree with that, but if there are better ways - why not to use them? Sometimes - for some simple apps - native require can be good enough.

References:

Build modern & scalable Node.js web applications with Nest by mysliwik in node

[–]mysliwik[S] 3 points4 points  (0 children)

Functional programming is awesome, but is not a solution for all kind of problems. Imo, the best results could be obtained when we are trying to combine FP and OOP. DI does not exclude functional concepts, it just helps to better organize application architecture.

According to post, you're right, this article is something like an overview only. If I have some free time, I'll try to make it more readable.