Skip to main content

2 posts tagged with "typescript"

View All Tags

End-To-End Polymorphism: From Database to UI, Achieving SOLID Design

ยท 14 min read
Jiasheng
Co-founder of ZenStack

Cover image

Polymorphism Is the Key To Open-Closed Principleโ€‹

The three fundamental pillars of Object-Oriented Programming(OOP) are Encapsulation, Inheritance, and Polymorphism. Polymorphism is likely the least-mentioned concept, possibly because this term is not frequently used in daily life. However, it is actually the most important one because it is the key to achieving compliance with the Open-Closed Principle (OCP) in OOP.

How To Get Type-Safe Frontend Queries Like GraphQL Without GraphQL Using Typescript

ยท 4 min read
Jiasheng
Co-founder of ZenStack

Cover Image

Fading of APIโ€‹

I previously wrote a post about the history of APIs:

A Brief History of API: RPC, REST, GraphQL, tRPC

I still believe that GraphQL is the most efficient solution for a big project with separate or multiple front-end and back-end teams. However, after my partner and I left our last company, it was mainly just the two of us working on the full-stack project. Therefore, we prefer to leverage the "integrated" APIs of full-stack frameworks like getServerSideProps, loader, and load functions (I bet at least you know one of them ๐Ÿ˜„). When necessary, we will use tRPC as a complementary. The overall experience is quite neat as you almost forget about API design and implementation.