News for hackers. Stuff that matters.
Re:Show HN: Firestorm – An ORM for Firestore by beders on Sunday August 25, 2019 @04:43PM (#20795442)
In the last few months I'm observing TypeScript being pulled into the a direction that Java developers know very well: Complexity.

All that was missing was an ORM. Annotation-based, no less. Java devs have made very painful experiences with those. For good reasons (that are easy to google)

What you gained was giving a type name to a collection of attributes and describing relationships between them. What you lost was the ability to treat the data coming from the database as - well - data. You just put it into a straight jacket (classes).

Your saving grace is a `toData()` function ;)

Re:Show HN: Firestorm – An ORM for Firestore by nine_k on Sunday August 25, 2019 @09:48PM (#20796899)
I would say that ORM, as presented by ActiveRecord and similar approaches, is an anti-pattern. Serviceable in simple circumstances, though.

Such ORMs pretend that data are objects in OOP sense, with internal mutable state stored in their fields. This leads to endless bugs with dirty vs clean state, complicated and bug-prone logic in `.save` methods, hard to debug performance problems with transparent lazy-loading of related objects, and inevitable performance loss on hydration / dehydration of all fields. (I saw and fought this all in practice.)

Better approaches, such as the one available in SQL Alchemy, do not hide the relational nature of the data. They allow to `select` arbitrary tuples, and, most importantly, to build queries from composable, reusable parts.

ORM is not the best interface to an RDBMS. But a good, ergonomic interface to an RDBMS is a very important and useful thing.

Re:Show HN: Firestorm – An ORM for Firestore by 0XAFFE on Monday August 26, 2019 @03:46AM (#20798094)
It is already here in the form of TypeORM:

https://typeorm.io/

IMO it fits realy well into the whole TypeScript cosmos and to be honest I'm quite happy with my straight jacket.