I agree. I would prefer to not create model classes that have methods for synchronizing with a server like the TypeScript TodoItem class in this example.
However, code like this is still seen in the wild, and I wanted a simple example. In fact, it's very common practice albeit not a good one to use ORMs on the server-side.
Your comments brings up some very valid points for discussion of code quality and software architecture.
Log in to continue
We're a place where coders share, stay up-to-date and grow their careers.
I agree. I would prefer to not create model classes that have methods for synchronizing with a server like the TypeScript TodoItem class in this example.
However, code like this is still seen in the wild, and I wanted a simple example. In fact, it's very common practice albeit not a good one to use ORMs on the server-side.
Your comments brings up some very valid points for discussion of code quality and software architecture.