O'Reilly logo

TypeScript Microservices by Parth Ghiya

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Repository pattern

In this section, we will understand the repository pattern, which gives us the power to have our code in a single place. TypeScript introduced generics (just like the feature in Java), which we are going to utilize to the full extent in our microservices. The repository pattern is one of the most widely used patterns to create an enterprise-level application. It enables us to directly work with data in the application by creating a new layer for database operations and business logic.

Combining generics and the repository pattern opens up countless advantages. Working with the JavaScript application, we need to deal with problems such as code sharing between applications and going modular. The generic repository pattern ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required