4 ms·
Mostly agree with the author. But just wanted to point out that if we're doing C#/Java style OO patterns in JS (as in the Repository example shown), the value o
by jeswin 4y ago
Mostly agree with the author. But just wanted to point out that if we're doing C#/Java style OO patterns in JS (as in the Repository example shown), the value of using JS diminishes to almost nothing. JS works better without classes (and interfaces against them if using TypeScript).
- CharlieDigital 4y agoIf you look at how major backend projects structure their code, it's almost always object-oriented TypeScript. I submit for the record: - Apollo Client: https://github.com/apollographql/apollo-client/blob/main/src/core/QueryManager.ts#L82 https://github.com/apollographql/apollo-client/blob/main/src... - Storybook: https://github.com/storybookjs/storybook/blob/next/lib/channels/src/index.ts#L35 https://github.com/storybookjs/storybook/blob/next/lib/chann... - Nest: https://github.com/nestjs/nest/blob/master/packages/core/nest-application.ts https://github.com/nestjs/nest/blob/master/packages/core/nes... - MongoDB Driver: https://github.com/mongodb/node-mongodb-native/blob/main/src/collection.ts https://github.com/mongodb/node-mongodb-native/blob/main/src... - Prisma: https://github.com/prisma/prisma/blob/main/packages/engine-core/src/library/LibraryEngine.ts#L56 https://github.com/prisma/prisma/blob/main/packages/engine-c...